David Sherwood
13d8ba7dea
[LV][TTI] Calculate cost of extracting last index in a scalable vector ( #144086 )
...
There are a couple of places in the loop vectoriser where we
want to calculate the cost of extracting the last lane in a
vector. However, we wrongly assume that asking for the cost
of extracting lane (VF.getKnownMinValue() - 1) is an accurate
representation of the cost of extracting the last lane. For
SVE at least, this is non-trivial as it requires the use of
whilelo and lastb instructions.
To solve this problem I have added a new
getReverseVectorInstrCost interface where the index is used
in reverse from the end of the vector. Suppose a vector has
a given ElementCount EC, the extracted/inserted lane would be
EC - 1 - Index. For scalable vectors this index is unknown at
compile time. I've added a AArch64 hook that better represents
the cost, and also a RISCV hook that maintains compatibility
with the behaviour prior to this PR.
I've also taken the liberty of adding support in vplan for
calculating the cost of VPInstruction::ExtractLastElement.
2025-08-19 09:31:37 +01:00
..
2025-08-19 09:31:37 +01:00
2025-07-26 17:16:36 +01:00
2025-08-16 18:54:27 +01:00
2025-08-08 11:09:34 +02:00
2025-08-16 18:54:27 +01:00
2025-08-08 11:09:34 +02:00
2025-08-16 18:54:27 +01:00
2025-08-16 18:54:27 +01:00
2025-03-25 12:57:24 +00:00
2025-08-18 18:04:53 +01:00
2025-04-04 15:44:26 +01:00
2025-08-05 18:48:10 +01:00
2025-07-26 17:16:36 +01:00
2025-08-11 09:52:54 +01:00
2025-07-26 17:16:36 +01:00
2025-03-26 21:03:50 +00:00
2025-07-26 17:16:36 +01:00
2025-07-30 17:55:00 +02:00
2025-08-16 18:54:27 +01:00
2025-08-16 18:54:27 +01:00
2025-08-16 18:54:27 +01:00
2025-08-16 18:54:27 +01:00
2025-08-10 21:21:16 +01:00
2025-08-16 18:54:27 +01:00
2025-07-27 13:53:26 +01:00
2025-08-16 18:54:27 +01:00
2025-08-06 15:43:51 -04:00
2025-04-04 15:34:45 +02:00
2025-08-16 18:54:27 +01:00
2025-08-10 21:21:16 +01:00
2025-06-27 10:39:33 +01:00
2025-07-14 08:17:33 +01:00
2025-07-27 13:53:26 +01:00
2025-07-27 13:53:26 +01:00
2025-08-05 21:06:41 +01:00
2025-07-27 13:53:26 +01:00
2025-07-27 13:53:26 +01:00
2025-07-27 13:53:26 +01:00
2025-06-07 21:49:54 +01:00
2025-07-27 13:53:26 +01:00
2025-07-27 13:53:26 +01:00
2025-08-16 18:54:27 +01:00
2025-08-16 18:54:27 +01:00
2025-08-16 18:54:27 +01:00
2025-08-10 21:21:16 +01:00
2025-06-24 21:48:58 +01:00
2025-08-16 18:54:27 +01:00
2025-07-26 17:16:36 +01:00
2025-08-16 18:54:27 +01:00
2025-08-11 16:35:21 +08:00
2025-08-11 16:35:21 +08:00
2025-08-11 16:35:21 +08:00
2025-07-26 17:16:36 +01:00
2025-07-27 13:53:26 +01:00
2025-07-14 21:21:22 +01:00
2025-08-08 11:00:00 +01:00
2025-05-27 16:07:56 +01:00
2025-05-14 14:56:35 +01:00
2025-07-27 13:53:26 +01:00
2025-08-16 18:54:27 +01:00
2025-07-27 13:53:26 +01:00
2025-07-27 13:53:26 +01:00
2025-08-16 18:54:27 +01:00
2025-03-26 21:03:50 +00:00
2025-08-16 18:54:27 +01:00
2025-04-02 17:23:00 +01:00
2025-08-16 18:54:27 +01:00
2025-08-16 18:54:27 +01:00
2025-07-26 17:16:36 +01:00
2025-08-16 18:54:27 +01:00
2025-08-18 17:48:42 +01:00
2025-08-18 17:48:42 +01:00
2025-08-16 18:54:27 +01:00
2025-07-30 17:55:00 +02:00
2025-07-30 17:55:00 +02:00
2025-08-07 12:07:29 +01:00
2025-07-27 13:53:26 +01:00
2025-06-26 11:19:09 +01:00
2025-08-16 18:54:27 +01:00
2025-08-16 18:54:27 +01:00
2025-08-16 18:54:27 +01:00
2025-07-27 13:53:26 +01:00
2025-07-27 13:53:26 +01:00
2025-08-16 18:54:27 +01:00
2025-07-27 13:53:26 +01:00
2025-07-26 17:16:36 +01:00
2025-08-08 11:09:34 +02:00
2025-08-16 18:54:27 +01:00
2025-08-16 18:54:27 +01:00
2025-07-27 13:53:26 +01:00
2025-08-16 18:54:27 +01:00
2025-08-10 21:21:16 +01:00
2025-08-16 18:54:27 +01:00
2025-08-10 21:21:16 +01:00
2025-08-16 18:54:27 +01:00
2025-07-27 13:53:26 +01:00
2025-08-16 18:54:27 +01:00
2025-07-18 21:58:19 +01:00
2025-06-27 10:39:33 +01:00
2025-06-27 10:39:33 +01:00
2025-07-26 17:16:36 +01:00
2025-07-27 13:53:26 +01:00
2025-07-26 17:16:36 +01:00
2025-07-27 13:53:26 +01:00
2025-07-27 13:53:26 +01:00
2025-08-16 18:54:27 +01:00
2025-07-27 13:53:26 +01:00
2025-07-27 13:53:26 +01:00
2025-07-27 13:53:26 +01:00
2025-08-16 18:54:27 +01:00
2025-08-16 18:54:27 +01:00
2025-08-05 18:01:02 +01:00
2025-04-28 20:01:37 +01:00
2025-08-06 14:43:03 +01:00
2025-07-26 17:16:36 +01:00
2025-07-27 13:53:26 +01:00
2025-07-26 17:16:36 +01:00
2025-08-07 10:54:24 +08:00
2025-03-26 21:03:50 +00:00
2025-07-27 13:53:26 +01:00
2025-07-27 13:53:26 +01:00
2025-08-16 18:54:27 +01:00
2025-03-25 12:57:24 +00:00
2025-07-27 13:53:26 +01:00
2025-08-16 18:54:27 +01:00
2025-07-27 13:53:26 +01:00
2025-08-14 21:21:03 +01:00
2025-08-10 21:21:16 +01:00
2025-08-10 21:21:16 +01:00
2025-07-26 17:16:36 +01:00
2025-07-27 13:53:26 +01:00
2025-08-10 21:21:16 +01:00
2025-08-16 18:54:27 +01:00
2025-07-26 17:16:36 +01:00
2025-08-16 18:54:27 +01:00
2025-04-29 09:47:38 +01:00
2025-05-08 11:49:54 +01:00
2025-08-19 04:10:53 +00:00
2025-08-16 18:54:27 +01:00
2025-08-10 21:21:16 +01:00
2025-08-16 18:54:27 +01:00
2025-07-27 13:53:26 +01:00
2025-07-31 14:35:10 +01:00
2025-07-26 17:16:36 +01:00
2025-07-31 14:35:10 +01:00
2025-07-31 14:35:10 +01:00
2025-08-12 10:22:41 +01:00
2025-07-27 13:53:26 +01:00
2025-04-14 17:11:13 +02:00
2025-06-30 22:39:17 +01:00
2025-07-27 13:53:26 +01:00
2025-07-26 17:16:36 +01:00
2025-08-16 18:54:27 +01:00
2025-07-31 16:33:25 +01:00
2025-08-16 18:54:27 +01:00
2025-07-26 15:39:21 +01:00
2025-07-27 13:53:26 +01:00
2025-08-14 21:21:03 +01:00
2025-07-27 13:53:26 +01:00
2025-08-08 11:44:32 +01:00
2025-07-27 13:53:26 +01:00
2025-04-02 17:22:40 +01:00
2025-07-27 13:53:26 +01:00
2025-08-14 19:27:51 +01:00
2025-08-16 18:54:27 +01:00
2025-08-12 14:13:13 +01:00
2025-08-14 19:27:51 +01:00
2025-08-14 19:27:51 +01:00
2025-08-14 19:27:51 +01:00
2025-08-14 19:27:51 +01:00
2025-08-14 19:27:51 +01:00
2025-08-14 19:27:51 +01:00
2025-07-27 13:53:26 +01:00
2025-08-16 18:54:27 +01:00
2025-08-07 10:54:24 +08:00
2025-07-27 13:53:26 +01:00
2025-07-27 13:53:26 +01:00
2025-07-27 13:53:26 +01:00
2025-06-08 22:34:07 +01:00
2025-08-16 18:54:27 +01:00
2025-08-16 18:54:27 +01:00
2025-08-10 21:21:16 +01:00
2025-06-08 22:34:07 +01:00
2025-06-08 22:34:07 +01:00
2025-06-08 22:34:07 +01:00
2025-06-08 22:34:07 +01:00
2025-06-08 22:34:07 +01:00
2025-07-27 13:53:26 +01:00
2025-08-16 18:54:27 +01:00
2025-07-26 17:16:36 +01:00
2025-08-16 18:54:27 +01:00
2025-08-16 21:19:20 +01:00
2025-08-16 18:54:27 +01:00
2025-08-16 18:54:27 +01:00
2025-08-16 18:54:27 +01:00
2025-08-02 19:49:59 +01:00
2025-08-16 18:54:27 +01:00
2025-07-27 13:53:26 +01:00
2025-08-10 21:21:16 +01:00
2025-08-10 21:21:16 +01:00
2025-08-16 18:54:27 +01:00
2025-07-27 13:53:26 +01:00
2025-06-22 13:48:25 +01:00
2025-08-10 21:21:16 +01:00
2025-05-14 14:56:35 +01:00
2025-08-10 21:21:16 +01:00
2025-08-10 21:21:16 +01:00
2025-08-10 21:21:16 +01:00
2025-07-27 13:53:26 +01:00
2025-08-16 18:54:27 +01:00
2025-08-16 18:54:27 +01:00
2025-07-26 17:16:36 +01:00
2025-08-16 18:54:27 +01:00
2025-08-16 18:54:27 +01:00
2025-06-27 10:39:33 +01:00
2025-07-31 14:03:08 +01:00
2025-07-27 13:53:26 +01:00
2025-07-27 13:53:26 +01:00
2025-07-27 13:53:26 +01:00
2025-07-27 13:53:26 +01:00
2025-08-16 18:54:27 +01:00
2025-03-26 21:03:50 +00:00
2025-06-27 10:39:33 +01:00
2025-08-16 18:54:27 +01:00
2025-07-27 13:53:26 +01:00
2025-03-25 12:57:24 +00:00
2025-07-31 15:56:31 -04:00
2025-08-04 11:31:00 +01:00
2025-07-27 13:53:26 +01:00
2025-07-27 13:53:26 +01:00
2025-08-16 18:54:27 +01:00
2025-08-16 18:54:27 +01:00
2025-08-10 21:21:16 +01:00
2025-08-14 19:27:51 +01:00
2025-07-27 13:53:26 +01:00
2025-04-18 21:52:05 +01:00
2025-06-07 21:49:54 +01:00
2025-08-16 18:54:27 +01:00
2025-08-12 14:13:13 +01:00
2025-08-12 14:13:13 +01:00
2025-08-06 14:43:03 +01:00
2025-07-01 20:44:50 +01:00
2025-07-16 08:14:12 +01:00
2025-06-07 21:49:54 +01:00
2025-06-07 21:49:54 +01:00
2025-05-27 16:07:56 +01:00
2025-03-19 21:35:15 +00:00
2025-08-15 15:53:19 +01:00
2025-05-27 16:07:56 +01:00
2025-08-16 18:54:27 +01:00
2025-08-16 18:54:27 +01:00