Craig Topper
fe1f0de003
[RISCV][WebAssembly][TargetLowering] Allow expandCTLZ/expandCTTZ to rely on CTPOP expansion for vectors.
...
Our fallback expansion for CTLZ/CTTZ relies on CTPOP. If CTPOP
isn't legal or custom for a vector type we would scalarize the
CTLZ/CTTZ. This is different than CTPOP itself which would use a
vector expansion.
This patch teaches expandCTLZ/CTTZ to rely on the vector CTPOP
expansion instead of scalarizing. To do this I had to add additional
checks to make sure the operations used by CTPOP expansions are all
supported. Some of the operations were already needed for the CTLZ/CTTZ
expansion.
This is a huge improvement to the RISCV which doesn't have a scalar
ctlz or cttz in the base ISA.
For WebAssembly, I've added Custom lowering to keep the scalarizing
behavior. I've also extended the scalarizing to CTPOP.
Differential Revision: https://reviews.llvm.org/D111919
2021-10-20 07:46:41 -07:00
..
2021-10-19 09:30:13 +08:00
2021-10-20 07:46:41 -07:00
2021-08-18 10:22:00 -07:00
2021-08-18 11:07:11 -07:00
2021-10-08 01:26:29 +00:00
2021-06-29 09:45:13 -07:00
2021-08-04 12:45:18 -07:00
2021-06-27 10:33:43 -07:00
2021-04-11 13:59:51 -07:00
2021-08-26 10:20:19 -07:00
2021-08-18 10:22:00 -07:00
2021-09-24 10:26:11 -07:00
2021-09-24 10:26:11 -07:00
2021-10-14 09:25:03 -07:00
2021-03-15 11:32:43 -07:00
2021-09-24 15:10:25 -07:00
2021-10-19 09:30:13 +08:00
2021-08-18 10:25:12 -07:00
2021-08-18 10:22:00 -07:00
2021-07-22 09:55:26 +01:00
2021-10-19 09:30:13 +08:00
2021-10-19 09:30:13 +08:00
2021-08-26 10:20:19 -07:00
2021-06-30 16:54:13 -04:00
2021-08-18 10:22:00 -07:00
2021-04-01 09:12:52 -07:00
2021-09-02 09:47:58 -05:00
2021-10-19 09:30:13 +08:00
2021-09-22 14:25:40 -07:00
2021-07-06 11:43:22 -07:00
2021-07-20 09:22:06 -07:00
2021-10-19 09:30:13 +08:00
2021-09-02 09:47:58 -05:00
2021-05-11 11:29:45 -07:00
2021-07-22 09:55:26 +01:00
2021-10-19 09:30:13 +08:00
2021-06-17 09:51:09 -07:00
2021-06-17 09:51:09 -07:00
2021-04-01 09:12:52 -07:00
2021-09-02 09:47:58 -05:00
2021-09-22 14:25:40 -07:00
2021-07-06 11:43:22 -07:00
2021-07-20 09:22:06 -07:00
2021-04-01 12:41:57 -07:00
2021-04-22 15:04:55 +07:00
2021-09-02 09:47:58 -05:00
2021-08-08 18:30:48 -07:00
2021-09-02 09:47:58 -05:00
2021-09-22 14:24:26 -07:00
2021-07-06 11:43:22 -07:00
2021-07-20 09:22:06 -07:00
2021-10-04 17:01:59 -07:00
2021-10-15 06:46:41 +00:00
2021-07-13 09:30:09 -07:00
2021-06-23 15:38:11 -07:00
2021-03-21 18:54:00 +08:00
2021-09-09 07:32:30 +02:00
2021-09-24 10:26:11 -07:00
2021-08-31 11:23:56 -07:00
2021-05-29 15:11:37 +01:00
2021-07-28 09:05:45 -07:00
2021-07-20 08:53:55 -07:00
2021-09-24 10:26:11 -07:00
2021-10-07 20:47:17 -07:00
2021-10-07 20:47:17 -07:00
2021-10-07 20:47:17 -07:00
2021-10-07 20:47:17 -07:00
2021-10-07 20:47:17 -07:00
2021-10-07 20:47:17 -07:00
2021-10-07 20:47:17 -07:00
2021-10-07 20:47:17 -07:00
2021-04-02 10:58:45 -07:00
2021-10-07 20:47:17 -07:00
2021-10-07 20:47:17 -07:00
2021-07-20 09:22:06 -07:00
2021-07-24 10:50:43 -07:00
2021-07-24 10:50:43 -07:00
2021-07-24 10:50:43 -07:00
2021-08-18 10:22:00 -07:00
2021-09-16 11:03:35 -07:00
2021-06-17 09:38:28 +02:00
2021-08-18 10:22:00 -07:00
2021-08-18 10:22:00 -07:00
2021-10-07 20:47:17 -07:00
2021-10-07 20:47:17 -07:00
2021-10-07 20:47:17 -07:00
2021-10-07 20:47:17 -07:00
2021-10-07 20:47:17 -07:00
2021-10-07 20:47:17 -07:00
2021-10-07 20:47:17 -07:00
2021-10-07 20:47:17 -07:00
2021-04-02 10:58:45 -07:00
2021-10-07 20:47:17 -07:00
2021-10-07 20:47:17 -07:00
2021-08-19 16:08:07 +01:00
2021-08-19 16:08:07 +01:00
2021-04-16 12:54:47 +08:00
2021-02-09 15:52:04 +08:00
[RISCV] Fold (add (select lhs, rhs, cc, 0, y), x) -> (select lhs, rhs, cc, x, (add x, y))
2021-08-10 09:02:56 -07:00
2021-08-13 18:00:09 -07:00
2021-09-08 12:41:51 +01:00
2021-10-19 09:30:13 +08:00
2021-08-18 10:44:25 -07:00
2021-08-18 10:22:00 -07:00
2021-09-23 14:18:07 -07:00
2021-08-18 10:22:00 -07:00
2021-10-08 09:57:57 +08:00
2021-10-14 14:53:03 +00:00
2021-09-02 12:14:04 -05:00
2021-07-23 09:12:05 -07:00
2021-08-18 10:44:25 -07:00
2021-09-16 11:03:35 -07:00
2021-10-19 09:30:13 +08:00
2021-09-24 10:26:11 -07:00
2021-08-19 16:08:07 +01:00
2021-08-19 16:08:07 +01:00
2021-03-21 18:54:00 +08:00
2021-04-29 09:10:48 +01:00
2021-09-14 21:00:29 -04:00
2021-07-13 09:46:21 -07:00
2021-08-18 10:22:00 -07:00
2021-03-16 07:44:06 -07:00
2021-08-31 11:23:56 -07:00
2021-08-18 10:22:00 -07:00
2021-10-19 09:30:13 +08:00
2021-09-24 10:26:11 -07:00
2021-08-18 10:22:00 -07:00
2021-03-16 07:44:06 -07:00
2021-08-18 10:44:25 -07:00
2021-06-27 10:33:43 -07:00
2021-06-30 16:54:13 -04:00
2021-08-31 11:23:56 -07:00