David Sherwood
f575b18fdc
[LV] Add support for partial reductions without a binary op ( #133922 )
...
Consider IR such as this:
for.body:
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
%accum = phi i32 [ 0, %entry ], [ %add, %for.body ]
%gep.a = getelementptr i8, ptr %a, i64 %iv
%load.a = load i8, ptr %gep.a, align 1
%ext.a = zext i8 %load.a to i32
%add = add i32 %ext.a, %accum
%iv.next = add i64 %iv, 1
%exitcond.not = icmp eq i64 %iv.next, 1025
br i1 %exitcond.not, label %for.exit, label %for.body
Conceptually we can vectorise this using partial reductions too,
although the current loop vectoriser implementation requires the
accumulation of a multiply. For AArch64 this is easily done with
a udot or sdot with an identity operand, i.e. a vector of (i16 1).
In order to do this I had to teach getScaledReductions that the
accumulated value may come from a unary op, hence there is only
one extension to consider. Similarly, I updated the vplan and
AArch64 TTI cost model to understand the possible unary op.
---------
Co-authored-by: Matt Devereau <matthew.devereau@arm.com >
2025-07-02 13:05:51 +01:00
..
2025-07-02 13:05:51 +01:00
2025-03-04 17:19:06 -06:00
2025-07-01 20:44:50 +01:00
2025-01-14 22:07:38 +00:00
2025-06-02 17:40:50 +01:00
2025-06-09 20:59:12 +01:00
2025-07-02 18:16:02 +08:00
2025-05-20 14:16:01 +01:00
2025-03-25 12:57:24 +00:00
2025-06-30 22:39:17 +01:00
2025-04-04 15:44:26 +01:00
2025-02-27 17:43:24 +00:00
2025-06-19 10:49:40 +01:00
2025-03-26 21:03:50 +00:00
2025-06-16 10:02:38 +01:00
2025-04-14 17:11:13 +02:00
2025-05-20 14:16:01 +01:00
2025-05-28 11:00:14 +02:00
2025-03-25 12:57:24 +00:00
2025-04-29 21:40:42 +01:00
2025-01-23 22:29:30 +00:00
2025-04-04 15:44:26 +01:00
2025-05-20 14:16:01 +01:00
2025-04-28 20:01:37 +01:00
2025-06-20 13:05:19 +01:00
2025-04-04 15:34:45 +02:00
2025-03-26 21:03:50 +00:00
2025-04-04 15:44:26 +01:00
2025-06-27 10:39:33 +01:00
2025-06-27 10:39:33 +01:00
2025-06-09 20:59:12 +01:00
2025-06-17 18:24:07 +01:00
2025-06-30 22:39:17 +01:00
2025-03-25 12:57:24 +00:00
2025-01-14 22:07:38 +00:00
2025-03-26 21:03:50 +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
2025-03-25 12:57:24 +00:00
2025-06-07 21:49:54 +01:00
2025-06-15 21:24:10 +01:00
2025-03-25 12:57:24 +00:00
2025-06-20 21:08:14 +01:00
2025-06-15 22:00:47 +01:00
2025-03-25 12:57:24 +00:00
2025-06-18 16:03:20 +08:00
2025-06-24 21:48:58 +01:00
2025-06-26 11:19:09 +01:00
2025-04-21 18:36:43 +01:00
2025-03-25 12:57:24 +00:00
2025-06-22 20:35:38 +01:00
2025-06-22 20:35:38 +01:00
2025-04-14 17:11:13 +02:00
2025-03-25 12:57:24 +00:00
2025-03-14 15:50:49 +00:00
2025-05-27 16:07:56 +01:00
2025-05-14 14:56:35 +01:00
2025-02-27 17:43:24 +00:00
2025-04-05 16:22:47 +01:00
2025-06-09 20:59:12 +01:00
2025-06-03 18:13:51 +01:00
2025-03-25 12:57:24 +00:00
2025-03-26 21:03:50 +00:00
2025-03-25 12:57:24 +00:00
2025-04-02 17:23:00 +01:00
2025-06-09 20:59:12 +01:00
2025-03-25 12:57:24 +00:00
2025-06-21 10:23:53 +01:00
2025-03-26 21:03:50 +00:00
2025-01-29 16:56:47 +01:00
2025-02-09 11:20:20 +00:00
2025-03-25 12:57:24 +00:00
2025-04-14 17:11:13 +02:00
2025-03-25 12:57:24 +00:00
2025-06-26 11:19:09 +01:00
2025-02-26 13:57:51 +00:00
2025-04-02 10:26:48 +01:00
2025-06-26 11:19:09 +01:00
2025-06-29 11:17:03 +01:00
2025-03-26 21:03:50 +00:00
2025-03-25 12:57:24 +00:00
2025-06-23 15:27:49 +01:00
2025-06-23 15:27:49 +01:00
2025-06-26 11:19:09 +01:00
2025-01-27 21:35:36 +00:00
2025-06-20 13:05:19 +01:00
2025-04-21 18:36:43 +01:00
2025-04-28 20:01:37 +01:00
2025-01-29 08:09:50 +00:00
2025-02-20 17:01:49 +01:00
2025-03-27 20:29:37 +09:00
2025-04-04 15:44:26 +01:00
2025-04-14 21:51:15 +02:00
2025-06-01 22:39:37 +01:00
2025-04-28 11:16:36 +01:00
2025-06-27 10:39:33 +01:00
2025-06-27 10:39:33 +01:00
2025-02-28 12:56:12 +00:00
2025-03-25 12:57:24 +00:00
2025-06-27 15:42:42 +01:00
2025-05-14 14:56:35 +01:00
2025-03-25 12:57:24 +00:00
2025-01-29 08:09:50 +00:00
2025-03-25 12:57:24 +00:00
2025-01-29 08:09:50 +00:00
2025-03-25 12:57:24 +00:00
2025-01-29 08:09:50 +00:00
2025-03-25 12:57:24 +00:00
2025-06-15 22:00:47 +01:00
2025-03-09 15:05:35 +00:00
2025-06-19 13:24:39 +01:00
2025-04-28 20:01:37 +01:00
2025-02-17 16:40:37 +01:00
2025-05-14 14:56:35 +01:00
2025-03-16 11:37:58 +00:00
2025-03-26 21:03:50 +00:00
2025-06-17 18:24:07 +01:00
2025-03-26 21:03:50 +00:00
2025-03-25 12:57:24 +00:00
2025-01-29 16:56:47 +01:00
2025-03-25 12:57:24 +00:00
2025-03-25 12:57:24 +00:00
2025-03-25 12:57:24 +00:00
2025-03-23 09:06:01 +00:00
2025-04-17 11:50:49 +01:00
2025-04-04 15:44:26 +01:00
2025-02-09 11:20:20 +00:00
2025-03-25 12:57:24 +00:00
2025-04-04 15:44:26 +01:00
2025-05-14 14:56:35 +01:00
2025-02-15 21:54:16 +01:00
2025-02-15 21:54:16 +01:00
2025-04-29 09:47:38 +01:00
2025-05-08 11:49:54 +01:00
2025-03-26 21:03:50 +00:00
2025-06-20 14:01:48 +01:00
2025-03-15 21:32:48 +00:00
2024-12-27 10:37:21 +08:00
2025-03-25 12:57:24 +00:00
2025-02-09 11:20:20 +00:00
2025-04-14 17:11:13 +02:00
2025-01-29 16:56:47 +01:00
2025-06-17 18:24:07 +01:00
2025-04-14 17:11:13 +02:00
2025-05-29 11:15:16 +08:00
2025-03-26 21:03:50 +00:00
2025-04-14 17:11:13 +02:00
2025-06-30 22:39:17 +01:00
2025-03-25 12:57:24 +00:00
2025-05-14 14:56:35 +01:00
2025-03-25 12:57:24 +00:00
2025-03-26 21:03:50 +00:00
2025-03-25 12:57:24 +00:00
2025-03-25 12:57:24 +00:00
2025-04-02 17:22:40 +01:00
2025-03-25 12:57:24 +00:00
2025-04-02 17:22:40 +01:00
2025-03-25 12:57:24 +00:00
2025-01-12 20:10:28 +00:00
2025-06-19 13:24:39 +01:00
2025-06-19 13:24:39 +01:00
2025-06-19 13:24:39 +01:00
2025-06-19 13:24:39 +01:00
2025-06-19 13:24:39 +01:00
2025-06-20 11:37:27 -07:00
2025-06-30 22:39:17 +01:00
2025-06-19 13:24:39 +01:00
2025-01-29 08:09:50 +00:00
2025-03-26 21:03:50 +00:00
2025-01-29 08:09:50 +00:00
2025-03-25 12:57:24 +00:00
2025-03-25 12:57:24 +00:00
2025-04-21 18:36:43 +01:00
2025-04-21 18:36:43 +01:00
2025-04-28 20:01:37 +01:00
2025-06-08 22:34:07 +01:00
2025-04-28 20:01:37 +01:00
2025-04-04 15:44:26 +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-03-25 12:57:24 +00:00
2025-06-27 10:39:33 +01:00
2025-06-27 10:39:33 +01:00
2025-06-27 10:39:33 +01:00
2025-06-27 10:02:57 +01:00
2025-06-27 10:39:33 +01:00
2025-06-12 21:06:58 +08:00
2025-05-14 14:56:35 +01:00
2025-05-28 11:00:14 +02:00
2025-04-04 15:44:26 +01:00
2025-04-04 15:44:26 +01:00
2025-03-26 21:03:50 +00:00
2025-06-26 11:19:09 +01:00
2025-06-22 13:48:25 +01:00
2025-04-04 15:44:26 +01:00
2025-05-14 14:56:35 +01:00
2025-04-04 15:44:26 +01:00
2025-04-04 15:44:26 +01:00
2025-04-24 08:37:49 +01:00
2025-04-21 18:36:43 +01:00
2025-03-25 12:57:24 +00:00
2025-03-25 12:57:24 +00:00
2025-03-25 12:57:24 +00:00
2025-03-25 12:57:24 +00:00
2025-06-27 10:39:33 +01:00
2025-01-29 08:09:50 +00:00
2025-06-20 19:10:26 +01:00
2025-06-20 19:10:26 +01:00
2025-06-20 19:10:26 +01:00
2025-06-20 19:10:26 +01:00
2025-06-20 19:10:26 +01:00
2025-06-26 11:19:09 +01:00
2025-03-26 21:03:50 +00:00
2025-06-27 10:39:33 +01:00
2025-03-25 12:57:24 +00:00
2025-03-25 12:57:24 +00:00
2025-03-25 12:57:24 +00:00
2025-01-29 08:09:50 +00:00
2025-03-25 12:57:24 +00:00
2025-06-14 16:48:44 +01:00
2025-06-27 10:39:33 +01:00
2025-05-28 11:00:14 +02:00
2025-05-28 11:00:14 +02:00
2025-06-19 13:24:39 +01:00
2025-05-28 11:00:14 +02:00
2025-04-18 21:52:05 +01:00
2025-06-07 21:49:54 +01:00
2025-06-20 19:18:49 +01:00
2025-03-10 20:28:56 +00:00
2025-06-07 21:49:54 +01:00
2025-06-07 21:49:54 +01:00
2025-05-08 20:56:48 +01:00
2025-07-01 20:44:50 +01:00
2025-06-07 21:49:54 +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-02-26 13:57:51 +00:00
2025-05-27 16:07:56 +01:00
2025-05-24 17:32:05 +01:00
2025-05-01 01:25:41 +08:00