David Sherwood
4e69258bf3
[LoopVectorize] Add cost of generating tail-folding mask to the loop ( #130565 )
...
At the moment if we decide to enable tail-folding we do not include
the cost of generating the mask per VF. This can mean we make some
poor choices of VF, which is definitely true for SVE-enabled AArch64
targets where mask generation for fixed-width vectors is more
expensive than for scalable vectors.
I've added a VPInstruction::computeCost function to return the costs
of the ActiveLaneMask and ExplicitVectorLength operations.
Unfortunately, in order to prevent asserts firing I've also had to
duplicate the same code in the legacy cost model to make sure the
chosen VFs match up. I've wrapped this up in a ifndef NDEBUG for
now. The alternative would be to disable the assert completely when
tail-folding, which I imagine is just as bad.
New tests added:
Transforms/LoopVectorize/AArch64/sve-tail-folding-cost.ll
Transforms/LoopVectorize/RISCV/tail-folding-cost.ll
2025-03-21 09:24:56 +00:00
..
2025-03-21 09:24:56 +00:00
2025-03-04 17:19:06 -06:00
2025-03-15 21:32:48 +00:00
2025-01-14 22:07:38 +00:00
2025-03-19 15:13:43 +00:00
2025-03-19 15:13:43 +00:00
2025-03-21 09:24:56 +00:00
2025-01-29 16:56:47 +01:00
2025-01-31 10:33:31 +00:00
2025-03-18 22:35:18 +00:00
2024-11-21 08:06:56 +00:00
2024-05-15 14:03:21 +01:00
2024-11-06 11:53:33 +00:00
2025-02-27 17:43:24 +00:00
2024-12-29 19:05:08 +00:00
2024-11-06 11:53:33 +00:00
2024-11-06 11:53:33 +00:00
2024-09-04 16:28:39 +05:30
2025-03-15 21:32:48 +00:00
2024-09-19 09:41:25 +01:00
2025-02-26 13:57:51 +00:00
2025-01-24 17:49:54 +08:00
2025-01-23 22:29:30 +00:00
2025-02-09 11:20:20 +00:00
2025-01-05 15:50:42 +00:00
2025-03-07 21:18:49 +00:00
2025-02-13 20:41:23 +01:00
2025-02-23 18:21:22 +00:00
2025-03-13 18:35:07 +00:00
2024-11-06 11:53:33 +00:00
2024-11-06 11:53:33 +00:00
2025-01-30 10:37:00 +00:00
2025-02-09 11:20:20 +00:00
2025-03-07 21:18:49 +00:00
2025-02-09 11:20:20 +00:00
2025-02-09 11:20:20 +00:00
2025-01-14 22:07:38 +00:00
2025-03-12 22:03:19 +00:00
2025-01-29 08:09:50 +00:00
2025-01-29 08:09:50 +00:00
2025-01-29 08:09:50 +00:00
2024-08-28 19:12:05 +01:00
2024-12-05 14:36:40 +01:00
2024-12-29 19:05:08 +00:00
2025-03-15 21:32:48 +00:00
2025-02-26 13:57:51 +00:00
2024-09-21 19:47:37 +01:00
2024-11-06 11:53:33 +00:00
2024-07-21 14:03:40 +01:00
2024-12-29 19:05:08 +00:00
2025-02-26 13:57:51 +00:00
2024-07-05 10:08:42 +01:00
2025-03-12 22:03:19 +00:00
2024-07-05 10:08:42 +01:00
2024-12-05 14:36:40 +01:00
2025-02-09 11:20:20 +00:00
2024-08-27 11:55:47 +01:00
2024-12-05 14:36:40 +01:00
2025-03-14 15:50:49 +00:00
2024-12-15 20:46:52 +00:00
2024-11-21 08:06:56 +00:00
2025-02-09 11:20:20 +00:00
2025-02-27 17:43:24 +00:00
2025-02-27 17:43:24 +00:00
2024-11-06 11:53:33 +00:00
2025-02-27 17:43:24 +00:00
2025-03-07 21:18:49 +00:00
2024-11-21 08:06:56 +00:00
2024-11-06 11:53:33 +00:00
2024-01-31 13:31:28 +00:00
2025-03-12 22:03:19 +00:00
2024-01-31 13:31:28 +00:00
2025-03-12 22:03:19 +00:00
2025-02-27 17:43:24 +00:00
2025-01-14 22:07:38 +00:00
2024-12-06 16:28:49 +00:00
2025-01-29 16:56:47 +01:00
2025-02-09 11:20:20 +00:00
2024-12-17 13:48:50 +01:00
2024-07-01 09:26:01 +02:00
2025-02-09 11:20:20 +00:00
2024-06-14 17:18:20 -04:00
2025-02-10 16:29:42 +00:00
2025-03-11 21:19:14 +00:00
2025-02-26 13:57:51 +00:00
2025-01-14 22:07:38 +00:00
2025-01-29 16:56:47 +01:00
2024-12-12 16:48:31 +08:00
2024-12-29 19:05:08 +00:00
2024-12-12 16:48:31 +08:00
2024-12-10 20:09:18 +08:00
2024-12-12 16:48:31 +08:00
2024-12-12 16:48:31 +08:00
2024-02-05 11:57:34 +01:00
2025-03-07 21:18:49 +00:00
2025-01-27 21:35:36 +00:00
2025-02-27 17:43:24 +00:00
2025-03-07 21:18:49 +00:00
2024-12-05 14:36:40 +01:00
2025-01-29 08:09:50 +00:00
2025-02-20 17:01:49 +01:00
2025-03-17 13:45:09 +09:00
2024-11-28 10:12:41 +00:00
2024-12-18 09:25:45 +00:00
2024-12-18 09:25:45 +00:00
2024-12-18 19:06:34 +01:00
2025-02-28 12:56:12 +00:00
2025-02-09 11:20:20 +00:00
2025-02-26 13:57:51 +00:00
2024-08-11 20:38:36 +02:00
2025-02-09 11:20:20 +00:00
2024-12-18 19:06:34 +01:00
2025-01-29 08:09:50 +00:00
2024-07-05 21:41:31 +01:00
2024-11-21 08:06:56 +00:00
2025-03-15 21:32:48 +00:00
2025-01-29 08:09:50 +00:00
2025-02-09 11:20:20 +00:00
2025-01-29 08:09:50 +00:00
2025-02-09 11:20:20 +00:00
2025-02-09 11:20:20 +00:00
2024-10-02 10:28:54 +01:00
2025-03-09 15:05:35 +00:00
2024-12-16 11:55:48 +08:00
2024-11-06 11:53:33 +00:00
2024-11-06 11:53:33 +00:00
2025-03-09 18:13:06 +00:00
2024-11-06 11:53:33 +00:00
2025-02-17 16:40:37 +01:00
2024-11-06 11:53:33 +00:00
2025-03-16 11:37:58 +00:00
2024-03-26 16:01:57 +01:00
2025-03-15 21:32:48 +00:00
2025-02-09 11:20:20 +00:00
2025-02-09 11:20:20 +00:00
2024-11-07 14:09:45 +01:00
2024-07-07 20:08:01 +01:00
2025-01-29 16:56:47 +01:00
2024-11-06 11:53:33 +00:00
2024-11-21 08:06:56 +00:00
2024-09-14 21:21:55 +01:00
2025-03-11 21:19:14 +00:00
2024-07-01 09:52:56 -07:00
2024-11-06 11:53:33 +00:00
2024-11-06 11:53:33 +00:00
2025-02-09 11:20:20 +00:00
2024-11-06 11:53:33 +00:00
2024-11-28 10:12:41 +00:00
2024-11-28 10:12:41 +00:00
2025-02-09 11:20:20 +00:00
2025-02-09 11:20:20 +00:00
2024-11-28 10:12:41 +00:00
2025-03-11 21:19:14 +00:00
2024-10-10 20:04:46 +01:00
2025-02-15 21:54:16 +01:00
2025-02-15 21:54:16 +01:00
2024-11-06 11:53:33 +00:00
2025-03-15 21:32:48 +00:00
2024-12-27 10:37:21 +08:00
2024-11-06 11:53:33 +00:00
2025-02-09 11:20:20 +00:00
2025-01-29 16:56:47 +01:00
2025-01-29 16:56:47 +01:00
2024-11-28 10:12:41 +00:00
2025-03-05 19:13:23 +08:00
2025-03-14 09:08:32 +08:00
2024-09-22 22:08:46 +01:00
2024-11-21 08:06:56 +00:00
2024-11-28 10:12:41 +00:00
2025-03-11 21:19:14 +00:00
2024-11-06 11:53:33 +00:00
2024-12-05 14:36:40 +01:00
2024-09-19 09:41:25 +01:00
2025-01-29 16:56:47 +01:00
2025-02-09 11:20:20 +00:00
2025-02-09 11:20:20 +00:00
2025-02-09 11:20:20 +00:00
2025-02-09 11:20:20 +00:00
2025-02-09 11:20:20 +00:00
2024-10-02 11:45:00 +02:00
2025-02-09 11:20:20 +00:00
2025-01-12 20:10:28 +00:00
2025-02-26 13:57:51 +00:00
2024-12-29 19:05:08 +00:00
2025-02-26 13:57:51 +00:00
2024-11-21 11:21:12 +00:00
2024-11-21 11:21:12 +00:00
2024-11-21 11:21:12 +00:00
2024-09-20 11:22:03 +01:00
2025-01-29 08:09:50 +00:00
2024-12-05 14:36:40 +01:00
2024-11-06 11:53:33 +00:00
2025-01-29 08:09:50 +00:00
2025-02-15 21:54:16 +01:00
2025-03-17 21:26:51 +00:00
2025-02-09 11:20:20 +00:00
2025-03-06 16:20:03 +08:00
2025-03-07 21:18:49 +00:00
2024-12-12 16:48:31 +08:00
2025-03-07 21:18:49 +00:00
2024-12-29 19:05:08 +00:00
2025-01-15 10:10:11 +08:00
2025-03-13 21:42:32 +00:00
2024-10-17 16:50:59 +01:00
2025-02-15 21:54:16 +01:00
2025-03-07 21:18:49 +00:00
2024-11-06 11:53:33 +00:00
2025-02-09 11:20:20 +00:00
2024-12-29 19:05:08 +00:00
2025-02-07 20:50:46 +00:00
2025-02-17 09:51:35 +00:00
2024-11-28 10:12:41 +00:00
2024-11-06 11:53:33 +00:00
2025-01-08 15:17:26 +08:00
2024-11-28 10:12:41 +00:00
2024-11-06 11:53:33 +00:00
2024-11-06 11:53:33 +00:00
2024-09-20 11:22:03 +01:00
2024-12-05 14:36:40 +01:00
2024-11-06 11:53:33 +00:00
2024-11-08 17:21:05 -06:00
2025-01-30 10:37:00 +00:00
2025-01-29 08:09:50 +00:00
2024-11-06 11:53:33 +00:00
2024-11-06 11:53:33 +00:00
2024-11-06 11:53:33 +00:00
2024-11-06 11:53:33 +00:00
2024-11-06 11:53:33 +00:00
2024-08-21 12:02:54 +02:00
2025-01-08 15:17:26 +08:00
2024-08-19 12:40:20 +01:00
2024-12-11 21:11:05 +00:00
2025-02-27 17:43:24 +00:00
2024-10-16 06:10:19 +01:00
2024-01-31 13:31:28 +00:00
2025-01-29 08:09:50 +00:00
2024-09-19 18:50:10 +01:00
2024-12-05 14:36:40 +01:00
2024-11-06 11:53:33 +00:00
2025-03-18 20:28:28 +00:00
2025-01-19 19:15:45 +00:00
2025-03-18 22:35:18 +00:00
2024-09-06 11:20:14 +02:00
2024-04-16 09:48:13 -04:00
2025-02-09 11:20:20 +00:00
2024-02-20 16:43:57 +00:00
2024-12-12 15:58:16 +00:00
2024-04-04 18:30:17 -04:00
2024-07-07 20:08:01 +01:00
2024-12-29 19:05:08 +00:00
2025-03-10 20:28:56 +00:00
2025-03-13 18:35:07 +00:00
2025-02-15 21:54:16 +01:00
2025-03-09 15:05:35 +00:00
2025-03-15 18:46:26 +00:00
2025-01-14 22:07:38 +00:00
2025-03-19 00:09:15 +08:00
2025-01-29 08:09:50 +00:00
2024-11-06 11:53:33 +00:00
2025-03-19 21:35:15 +00:00
2025-02-26 13:57:51 +00:00
2025-02-17 09:51:35 +00:00
2024-09-20 11:22:03 +01:00