Fraser Cormack
aec9cbbeb8
[SelectionDAG] Extend FoldConstantVectorArithmetic to SPLAT_VECTOR
...
This patch extends the SelectionDAG's ability to constant-fold vector
arithmetic to include support for SPLAT_VECTOR. This is not only for
scalable-vector types but also for fixed-length vector types, which
helps Hexagon in a couple of cases.
The original RISC-V test case was in fact an infinite DAGCombine loop.
The pattern `and (truncate v1), (truncate v2)` can be combined to
`truncate (and v1, v2)` but the truncate can similarly be combined back
to `truncate (and v1, v2)` (but, crucially, only when one of `v1` or
`v2` is a constant vector).
It wasn't exposed in on fixed-length types because a TRUNCATE of a
constant BUILD_VECTOR was folded into the BUILD_VECTOR itself, whereas
this did not happen for the equivalent (scalable-vector) SPLAT_VECTOR.
Reviewed By: RKSimon, craig.topper
Differential Revision: https://reviews.llvm.org/D103246
2021-06-04 09:53:15 +01:00
..
2021-06-04 09:53:15 +01:00
2021-04-26 13:26:17 +08:00
2020-12-18 21:03:37 +00:00
2020-12-09 19:42:49 +00:00
2021-01-05 10:41:08 -08:00
2021-04-11 13:59:51 -07:00
2021-03-25 09:03:25 -07:00
2020-11-25 21:57:48 -08:00
2020-12-09 19:42:49 +00:00
2021-06-03 11:34:35 -07:00
2020-12-09 19:42:49 +00:00
2021-01-27 20:46:10 -08:00
2021-05-20 20:34:23 +01:00
2021-01-30 07:20:05 +08:00
2021-03-15 11:32:43 -07:00
2021-04-11 13:59:51 -07:00
2020-12-09 19:42:49 +00:00
2021-01-14 22:35:17 +00:00
2021-01-14 22:35:17 +00:00
2021-01-14 22:35:17 +00:00
2021-04-02 10:18:08 -07:00
2021-01-14 22:35:17 +00:00
2021-01-14 22:35:17 +00:00
2021-01-14 22:35:17 +00:00
2021-01-14 22:35:17 +00:00
2021-01-14 22:35:17 +00:00
2021-01-14 22:35:17 +00:00
2021-01-14 22:35:17 +00:00
2021-01-14 22:35:17 +00:00
2021-01-14 22:35:17 +00:00
2021-01-05 10:41:08 -08:00
2020-12-09 19:42:49 +00:00
2020-12-04 10:34:12 -08:00
2020-11-03 03:55:47 +00:00
2021-04-01 12:41:57 -07:00
2021-04-11 13:59:51 -07:00
2020-11-25 15:07:34 -08:00
2021-04-01 09:12:52 -07:00
2021-01-19 11:21:48 -08:00
2020-12-09 19:42:49 +00:00
2021-04-22 15:18:15 -07:00
2021-01-12 10:45:03 -08:00
2020-12-09 19:42:49 +00:00
2021-04-01 09:12:52 -07:00
2020-12-10 09:15:52 -08:00
2020-12-30 15:28:11 -08:00
2020-12-09 19:42:49 +00:00
2021-01-14 13:41:40 -08:00
2021-01-25 16:37:21 -08:00
2021-05-11 11:29:45 -07:00
2020-12-09 19:42:49 +00:00
2020-12-09 19:42:49 +00:00
2020-12-09 19:42:49 +00:00
2020-11-25 15:07:34 -08:00
2021-04-01 09:12:52 -07:00
2021-01-19 11:21:48 -08:00
2021-04-22 15:18:15 -07:00
2021-01-12 10:45:03 -08:00
2020-12-09 19:42:49 +00:00
2020-12-09 19:42:49 +00:00
2020-12-10 09:15:52 -08:00
2020-12-30 15:28:11 -08:00
2021-01-14 13:41:40 -08:00
2020-12-30 15:28:11 -08:00
2021-04-01 12:41:57 -07:00
2020-12-09 19:42:49 +00:00
2021-04-22 15:04:55 +07:00
2021-01-15 11:14:14 -08:00
2020-12-09 19:42:49 +00:00
2020-12-09 19:42:49 +00:00
2020-12-09 19:42:49 +00:00
2020-12-09 19:42:49 +00:00
2020-12-02 21:13:42 -08:00
2021-04-01 12:41:57 -07:00
2021-01-19 11:21:48 -08:00
2021-04-22 15:18:15 -07:00
2021-01-12 10:45:03 -08:00
2020-12-03 09:16:33 +08:00
2020-12-02 20:31:43 -08:00
2020-12-10 09:15:52 -08:00
2020-12-30 15:28:11 -08:00
2021-01-14 13:41:40 -08:00
2021-03-15 11:32:43 -07:00
2021-04-02 10:18:08 -07:00
2020-12-09 19:42:49 +00:00
2020-12-09 19:42:49 +00:00
2020-12-09 19:42:49 +00:00
2020-12-09 19:42:49 +00:00
2020-12-09 19:42:49 +00:00
2020-12-09 19:42:49 +00:00
2020-12-22 15:05:54 +00:00
2021-03-21 18:54:00 +08:00
2020-12-30 15:28:11 -08:00
2020-12-30 15:28:11 -08:00
2020-12-05 14:54:37 -08:00
2021-04-01 10:15:55 -07:00
2020-11-20 17:58:26 -05:00
2021-01-18 17:30:35 +00:00
2021-01-23 09:10:03 +00:00
2021-05-29 15:11:37 +01:00
2021-02-04 16:46:23 -08:00
2020-12-09 19:42:49 +00:00
2020-12-09 19:42:49 +00:00
2021-04-01 12:41:57 -07:00
2021-03-22 19:17:04 -07:00
2021-04-02 11:50:19 -07:00
[RISCV] Teach DAG combine to fold (and (select_cc lhs, rhs, cc, -1, c), x) -> (select_cc lhs, rhs, cc, x, (and, x, c))
2021-04-29 09:43:51 -07:00
2021-03-22 19:17:04 -07:00
2021-04-02 12:09:13 -07:00
2021-04-25 19:14:34 -07:00
2021-04-25 21:54:06 -07:00
2021-03-22 19:17:04 -07:00
2021-04-02 10:58:45 -07:00
2021-06-02 09:10:21 +08:00
[RISCV] Teach DAG combine to fold (and (select_cc lhs, rhs, cc, -1, c), x) -> (select_cc lhs, rhs, cc, x, (and, x, c))
2021-04-29 09:43:51 -07:00
2020-12-09 19:42:49 +00:00
2020-12-04 18:40:02 -08:00
2020-12-04 18:40:02 -08:00
2020-12-04 18:40:02 -08:00
2020-12-09 19:42:49 +00:00
2020-10-29 14:52:53 -07:00
2020-12-09 19:42:49 +00:00
2021-03-25 23:31:01 -07:00
2021-01-25 09:33:48 -08:00
2021-03-20 14:55:46 -07:00
2021-02-22 14:56:22 -08:00
2021-03-25 09:03:25 -07:00
2021-04-04 17:14:28 -07:00
2021-04-11 13:59:51 -07:00
2021-03-31 09:40:07 -07:00
2021-04-02 12:09:13 -07:00
2021-04-25 21:54:06 -07:00
2021-04-25 21:54:06 -07:00
2021-04-01 09:12:52 -07:00
2021-04-02 10:58:45 -07:00
2021-06-02 09:10:21 +08:00
2021-03-22 19:17:04 -07:00
2021-04-07 13:47:17 -07:00
2021-04-07 13:47:17 -07:00
2021-04-16 12:54:47 +08:00
2021-02-09 15:52:04 +08:00
2021-01-21 12:07:44 -08:00
2021-01-21 12:07:44 -08:00
[RISCV] Teach DAG combine to fold (and (select_cc lhs, rhs, cc, -1, c), x) -> (select_cc lhs, rhs, cc, x, (and, x, c))
2021-04-29 09:43:51 -07:00
2021-03-12 11:50:10 -08:00
2021-01-21 12:07:44 -08:00
2021-01-22 14:51:22 -08:00
2021-01-18 17:30:35 +00:00
2021-01-21 12:07:44 -08:00
2021-01-25 16:37:21 -08:00
2021-01-25 16:37:21 -08:00
2020-12-09 19:42:49 +00:00
2021-01-27 20:46:10 -08:00
2020-12-09 19:42:49 +00:00
2020-12-09 19:42:49 +00:00
2021-05-26 13:08:51 -07:00
2020-12-09 19:42:49 +00:00
2021-02-11 09:43:13 -08:00
2021-06-03 10:44:34 +01:00
2021-04-01 09:12:52 -07:00
2021-04-07 13:47:17 -07:00
2021-04-07 13:47:17 -07:00
2021-01-15 11:14:14 -08:00
2021-03-21 18:54:00 +08:00
2021-04-29 09:10:48 +01:00
2020-12-09 19:42:49 +00:00
2020-11-20 17:58:26 -05:00
2020-12-09 19:42:49 +00:00
2021-03-16 07:44:06 -07:00
2021-03-16 07:44:06 -07:00
2020-12-09 19:42:49 +00:00
2021-02-11 09:43:13 -08:00
2021-05-26 13:08:51 -07:00
2020-12-09 19:42:49 +00:00
2021-03-16 07:44:06 -07:00
2021-03-16 07:44:06 -07:00
2021-03-21 18:54:00 +08:00
2021-01-27 10:22:54 +00:00
2021-04-29 09:10:48 +01:00
2021-03-27 15:37:18 -07:00
2020-12-30 15:28:11 -08:00
2020-12-03 09:16:33 +08:00