Nikita Popov
90ba33099c
[InstCombine] Canonicalize constant GEPs to i8 source element type ( #68882 )
...
This patch canonicalizes getelementptr instructions with constant
indices to use the `i8` source element type. This makes it easier for
optimizations to recognize that two GEPs are identical, because they
don't need to see past many different ways to express the same offset.
This is a first step towards
https://discourse.llvm.org/t/rfc-replacing-getelementptr-with-ptradd/68699 .
This is limited to constant GEPs only for now, as they have a clear
canonical form, while we're not yet sure how exactly to deal with
variable indices.
The test llvm/test/Transforms/PhaseOrdering/switch_with_geps.ll gives
two representative examples of the kind of optimization improvement we
expect from this change. In the first test SimplifyCFG can now realize
that all switch branches are actually the same. In the second test it
can convert it into simple arithmetic. These are representative of
common optimization failures we see in Rust.
Fixes https://github.com/llvm/llvm-project/issues/69841 .
2024-01-24 15:25:29 +01:00
..
2023-06-15 11:33:02 -04:00
2023-09-14 18:28:37 +00:00
2024-01-24 15:25:29 +01:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-05-18 17:01:11 +03:00
2023-08-28 12:13:42 -04:00
2023-10-24 14:02:51 +01:00
2023-11-02 17:00:33 -07:00
2023-10-24 14:02:51 +01:00
2023-11-02 17:00:33 -07:00
2023-11-02 17:00:33 -07:00
2023-11-15 15:22:12 -08:00
2023-05-18 17:01:11 +03:00
2023-05-18 17:01:11 +03:00
2024-01-11 09:46:54 +01:00
2023-10-11 09:02:24 -04:00
2023-06-12 18:38:47 +02:00
2023-08-28 12:13:42 -04:00
2023-05-18 17:01:11 +03:00
2023-08-11 16:37:42 -07:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-11-11 09:43:03 +01:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2024-01-11 09:46:54 +01:00
2024-01-11 09:46:54 +01:00
2023-06-08 10:01:28 +02:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-05-18 17:01:11 +03:00
2023-06-08 13:20:24 -07:00
2023-11-29 15:13:30 -08:00
2023-11-29 15:13:30 -08:00
2023-11-29 15:13:30 -08:00
2024-01-18 09:22:04 +08:00
2023-12-14 14:57:00 -07:00
2023-09-11 10:38:06 -07:00
2024-01-11 09:46:54 +01:00
2024-01-22 19:55:16 +01:00
2023-12-14 14:57:00 -07:00
2023-12-14 14:57:00 -07:00
2023-12-14 14:57:00 -07:00
2023-12-14 14:57:00 -07:00
2023-12-14 14:57:00 -07:00
2023-12-14 14:57:00 -07:00
2023-12-14 14:57:00 -07:00
2023-12-14 14:57:00 -07:00
2024-01-22 19:55:16 +01:00
2023-08-28 12:13:42 -04:00
2024-01-18 11:10:16 -08:00
2023-11-25 00:11:20 +01:00
2023-06-29 09:06:00 +01:00
2023-05-19 22:12:26 +03:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-06-16 20:18:50 -04:00
2023-08-09 18:33:11 -04:00
2023-05-19 22:12:26 +03:00
2023-06-08 10:01:28 +02:00
2023-09-27 21:29:56 -07:00
2023-08-09 18:33:11 -04:00
2024-01-11 09:46:54 +01:00
2023-07-19 15:20:50 -07:00
2023-05-19 22:12:26 +03:00
2023-05-25 10:56:23 -07:00
2023-08-28 12:13:42 -04:00
2024-01-11 09:46:54 +01:00
2023-07-24 13:50:45 -07:00
2023-10-30 08:48:31 -07:00
2023-05-19 22:12:26 +03:00
2023-06-30 04:50:08 -04:00
2023-05-19 22:12:26 +03:00
2023-05-19 22:12:26 +03:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-06-08 10:01:28 +02:00
2023-05-19 22:12:26 +03:00
2023-08-15 10:59:23 +03:00
2023-06-08 10:01:28 +02:00
2023-06-08 10:01:28 +02:00
2023-06-08 10:01:28 +02:00
2023-06-08 15:26:27 +02:00
2023-08-29 09:36:59 -04:00
2023-08-29 09:36:59 -04:00
2024-01-11 09:46:54 +01:00
2023-06-08 15:26:27 +02:00
2023-06-08 15:26:27 +02:00
2024-01-11 09:46:54 +01:00
2023-08-29 09:36:59 -04:00
2023-06-08 15:26:27 +02:00
2023-06-08 15:26:27 +02:00
2023-05-04 19:19:52 +02:00
2023-10-02 14:33:02 +02:00
2023-10-02 14:33:02 +02:00
2023-10-02 14:33:02 +02:00
2023-05-04 19:19:52 +02:00
2023-05-04 19:19:52 +02:00
2023-07-24 18:15:38 +02:00
2023-06-08 15:26:27 +02:00
2023-06-08 15:26:27 +02:00
2023-08-28 12:13:42 -04:00
2023-06-08 15:26:27 +02:00
2023-08-28 12:13:42 -04:00
2023-08-22 18:10:41 -07:00
2023-04-06 06:35:26 -04:00
2023-09-30 05:50:38 +08:00
2023-08-28 12:13:42 -04:00
2023-11-13 11:00:07 +01:00
2024-01-16 17:01:01 -08:00
2024-01-16 17:01:01 -08:00
2023-08-28 12:13:42 -04:00
2023-12-06 22:13:54 +00:00
2024-01-16 17:01:01 -08:00
2023-06-12 18:38:47 +02:00
2023-08-28 12:13:42 -04:00
2023-06-20 09:19:19 +01:00
2023-08-28 12:13:42 -04:00
2023-08-18 09:20:42 -07:00
2024-01-16 17:01:01 -08:00
2023-08-28 12:13:42 -04:00
2023-06-08 15:26:27 +02:00
2023-11-21 15:33:16 -08:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-06-16 00:49:59 +02:00
2023-06-08 15:26:27 +02:00
2023-08-28 12:13:42 -04:00
2023-12-06 22:13:54 +00:00
2023-10-25 10:35:03 +01:00
2023-10-25 10:35:03 +01:00
2023-08-28 12:13:42 -04:00
2023-06-12 18:38:47 +02:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2024-01-16 17:01:01 -08:00
2023-10-15 16:13:43 -07:00
2023-04-14 15:01:00 -07:00
2023-08-29 09:36:59 -04:00
2023-08-29 09:36:59 -04:00
2023-08-28 12:13:42 -04:00
2023-06-08 15:26:27 +02:00
2023-07-22 15:29:38 -07:00
2023-06-08 15:26:27 +02:00
2023-08-29 09:36:59 -04:00
2023-08-28 12:13:42 -04:00
2023-08-03 23:25:06 +01:00
2023-07-21 19:07:59 -07:00
2023-07-24 22:24:33 -07:00
2023-08-02 08:52:00 +00:00
2023-11-05 00:39:38 -07:00
2024-01-11 09:46:54 +01:00
2023-10-19 11:02:29 -07:00
2023-06-08 15:26:27 +02:00
2023-12-14 14:52:35 -07:00
2023-06-23 22:45:17 -07:00
2023-06-08 15:26:27 +02:00
2023-11-14 20:18:06 +00:00
2023-05-23 16:32:27 -07:00
2023-06-23 11:54:29 +01:00
2023-11-19 03:00:05 -05:00
2023-07-13 14:26:25 +02:00
2023-06-27 19:21:41 -07:00
2023-05-25 09:50:56 -07:00
2023-06-08 15:26:27 +02:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2024-01-11 09:46:54 +01:00
2023-08-28 12:13:42 -04:00
2023-07-26 16:13:36 -07:00
2023-08-09 18:33:11 -04:00
2023-08-09 18:33:11 -04:00
2023-08-28 12:13:42 -04:00
2023-08-09 18:33:11 -04:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-06-08 15:26:27 +02:00
2023-06-08 15:26:27 +02:00
2024-01-11 09:46:54 +01:00
2023-08-28 12:13:42 -04:00
2023-04-25 14:00:57 -07:00
2023-06-08 15:26:27 +02:00
2023-10-15 16:13:43 -07:00
2023-06-21 12:53:15 +00:00
2023-05-03 18:20:16 -07:00
2023-09-25 16:38:17 -07:00
2023-09-25 16:34:38 -07:00
2023-06-08 15:26:27 +02:00
2023-08-22 18:10:41 -07:00
2024-01-21 21:28:57 +01:00
2023-06-08 15:26:27 +02:00
2023-09-25 16:34:38 -07:00
2023-09-25 16:34:38 -07:00
2024-01-21 21:28:57 +01:00
2023-08-28 12:13:42 -04:00
2024-01-11 09:46:54 +01:00
2024-01-11 09:46:54 +01:00
2024-01-11 09:46:54 +01:00
2023-08-28 12:13:42 -04:00
2023-06-08 16:39:57 +02:00
2023-08-28 12:13:42 -04:00
2023-08-09 18:33:11 -04:00
2023-06-08 10:38:08 +02:00
2024-01-11 09:46:54 +01:00
2024-01-11 09:46:54 +01:00
2023-06-08 10:38:08 +02:00
2024-01-11 09:46:54 +01:00
2023-06-08 10:38:08 +02:00
2024-01-24 15:25:29 +01:00
2023-06-08 10:38:08 +02:00
2024-01-11 09:46:54 +01:00
2023-10-02 14:33:02 +02:00
2023-08-31 09:10:05 -07:00
2023-06-08 10:38:08 +02:00
2024-01-11 09:46:54 +01:00
2023-06-08 10:38:08 +02:00
2023-06-08 10:38:08 +02:00
2023-06-08 10:38:08 +02:00
2024-01-24 15:25:29 +01:00
2024-01-11 09:46:54 +01:00
2023-06-08 10:38:08 +02:00
2023-06-08 10:38:08 +02:00
2024-01-11 09:46:54 +01:00
2023-06-08 16:39:57 +02:00
2023-08-28 12:13:42 -04:00
2023-11-07 23:04:45 +08:00
2024-01-12 13:47:59 +08:00
2024-01-12 13:47:59 +08:00
2023-07-06 17:19:26 -07:00
2023-08-28 12:13:42 -04:00
2023-08-28 15:19:23 -07:00
2023-05-04 09:42:25 -07:00
2023-11-15 17:39:54 -08:00
2024-01-17 15:09:31 -08:00
2023-06-08 15:26:27 +02:00
2024-01-11 09:46:54 +01:00
2023-06-08 15:26:27 +02:00
2023-06-08 15:26:27 +02:00
2023-05-01 13:37:40 -07:00
2024-01-23 15:42:49 -08:00
2023-08-28 12:13:42 -04:00
2023-08-29 09:36:59 -04:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2024-01-11 09:46:54 +01:00
2023-08-28 12:13:42 -04:00
2023-06-15 11:33:02 -04:00
2024-01-12 13:47:59 +08:00
2024-01-11 09:46:54 +01:00
2024-01-15 10:18:07 -05:00
2024-01-17 15:09:31 -08:00
2023-06-08 16:39:57 +02:00
2023-06-01 08:44:30 -05:00
2023-06-08 10:01:28 +02:00
2023-06-20 14:55:12 -06:00
2023-08-28 12:13:42 -04:00
2023-09-27 14:26:49 -04:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2024-01-11 09:46:54 +01:00
2024-01-11 09:46:54 +01:00
2023-11-23 11:08:27 +08:00
2023-07-11 12:01:35 -07:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-08-14 22:25:42 +00:00
2023-08-28 12:13:42 -04:00
2024-01-11 09:46:54 +01:00
2024-01-11 09:46:54 +01:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-10-04 23:41:49 +02:00
2024-01-21 21:28:57 +01:00
2023-08-28 12:13:42 -04:00
2023-11-29 00:15:18 +00:00
2024-01-11 09:46:54 +01:00
2023-05-11 09:10:32 -07:00
2024-01-11 09:46:54 +01:00
2023-07-19 23:57:12 +01:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2024-01-11 09:46:54 +01:00
2023-08-29 11:39:59 +02:00
2024-01-11 09:46:54 +01:00
2023-09-20 17:12:19 +01:00
2023-08-28 12:13:42 -04:00
2023-11-15 17:39:54 -08:00
2023-08-28 20:44:06 +01:00
2023-08-28 20:44:06 +01:00
2023-08-28 20:44:06 +01:00
2023-09-09 07:50:35 +01:00
2023-05-20 08:24:20 -07:00
2023-08-28 12:13:42 -04:00
2024-01-11 09:46:54 +01:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-06-07 12:56:35 +02:00
2024-01-20 01:35:06 +00:00
2024-01-22 12:37:11 +00:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-11-21 11:46:34 -08:00
2023-08-09 18:33:11 -04:00
2023-08-09 18:33:11 -04:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-07-19 18:04:31 +01:00
2023-07-19 18:04:31 +01:00
2023-07-19 18:04:31 +01:00
2023-07-19 18:04:31 +01:00
2023-08-28 12:13:42 -04:00
2023-07-19 18:04:31 +01:00
2023-07-19 18:04:31 +01:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-07-19 18:04:31 +01:00
2023-07-19 18:04:31 +01:00
2023-07-19 18:04:31 +01:00
2023-11-02 11:52:57 -04:00
2023-11-02 11:52:57 -04:00
2024-01-11 09:46:54 +01:00
2023-11-11 11:59:59 +01:00
2023-08-28 12:13:42 -04:00
2023-10-02 12:40:20 +02:00
2024-01-11 09:46:54 +01:00
2024-01-11 09:46:54 +01:00