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-04-17 11:50:49 +01:00
2025-05-14 14:56:35 +01:00
2025-05-28 11:00:14 +02:00
2025-07-01 13:23:38 +01:00
2025-06-19 13:24:39 +01:00
2025-06-19 13:24:39 +01:00
2025-05-28 11:00:14 +02:00
2025-06-19 13:24:39 +01:00
2025-03-25 12:57:24 +00:00
2025-06-27 10:39:33 +01:00
2025-06-19 13:24:39 +01:00
2025-06-17 18:24:07 +01:00
2025-03-26 21:03:50 +00:00
2025-03-26 21:03:50 +00:00
2025-03-25 12:57:24 +00:00
2025-04-29 09:18:07 +08:00
2025-04-04 15:44:26 +01:00
2025-03-26 21:03:50 +00:00
2025-06-22 20:35:38 +01:00
2025-05-30 13:25:55 +02:00
2025-03-26 21:03:50 +00:00
2025-03-27 21:15:32 +00:00
2025-06-19 13:24:39 +01:00
2025-06-02 17:40:50 +01:00
2025-06-19 13:24:39 +01:00
2025-06-15 22:00:47 +01:00
2025-03-26 21:03:50 +00:00
2025-03-04 08:43:08 +00:00
2025-02-09 11:20:20 +00:00
2025-03-25 12:57:24 +00:00
2025-03-26 21:03:50 +00:00
2025-03-26 21:03:50 +00:00
2025-02-09 11:20:20 +00:00
2025-06-28 19:02:22 +01:00
2025-06-15 22:00:47 +01:00
2025-06-19 13:24:39 +01:00
2025-03-05 18:19:39 +00:00
2025-04-28 20:01:37 +01:00
2025-06-19 13:24:39 +01:00
2025-04-28 20:01:37 +01:00
2025-02-03 17:01:02 +00:00
2025-02-28 12:56:12 +00:00
2025-01-29 08:09:50 +00:00
2025-05-22 07:59:57 +03:00
2025-06-19 13:24:39 +01:00
2025-06-19 13:24:39 +01:00
2025-07-02 13:05:51 +01:00
2025-06-19 13:24:39 +01:00
2025-07-02 13:05:51 +01:00
2025-06-15 21:24:10 +01:00
2025-07-02 13:05:51 +01:00
2025-06-19 13:26:19 +01:00
2025-04-23 13:19:18 +01:00
2025-06-19 13:24:39 +01:00
2025-07-02 13:05:51 +01:00
2025-06-19 13:24:39 +01:00
2025-04-04 15:44:26 +01:00
2025-06-19 13:24:39 +01:00
2025-06-02 17:40:50 +01:00
2025-06-19 13:24:39 +01:00
2025-03-25 12:57:24 +00:00
2025-06-19 13:24:39 +01:00
2025-06-19 13:24:39 +01:00
2025-02-17 09:51:35 +00:00
2025-01-29 08:09:50 +00:00
2025-01-29 08:09:50 +00:00
2025-06-08 22:34:07 +01:00
2025-06-27 10:39:33 +01:00
2025-06-27 10:39:33 +01:00
2025-04-17 13:26:15 +01:00
2025-06-19 13:24:39 +01:00
2025-03-25 12:57:24 +00:00
2025-01-29 08:09:50 +00:00
2025-02-27 17:43:24 +00:00
2025-02-17 09:51:35 +00:00
2025-06-19 13:24:39 +01:00
2025-01-29 08:09:50 +00:00
2025-06-19 13:24:39 +01:00
2025-06-07 21:49:54 +01:00
2025-04-23 19:06:38 +01:00
2025-03-31 12:40:41 +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-19 13:24:39 +01:00
2025-06-19 13:24:39 +01:00
2025-04-07 14:09:43 +01:00
2025-06-19 13:24:39 +01:00
2025-03-31 12:40:41 +01:00
2025-06-19 13:24:39 +01:00
2025-06-19 13:24:39 +01:00
2025-07-02 18:16:02 +08: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-19 13:24:39 +01:00
2025-04-28 20:01:37 +01:00
2025-05-29 11:15:16 +08:00
2025-03-21 09:24:56 +00:00
2025-06-19 13:24:39 +01:00
2025-06-19 13:24:39 +01:00
2025-04-04 15:44:26 +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-19 13:24:39 +01:00
2025-03-13 07:16:04 -07:00
2025-06-19 13:24:39 +01:00
2025-03-28 21:48:59 +00:00
2025-06-07 21:49:54 +01:00
2025-04-28 20:01:37 +01:00
2025-06-20 11:37:27 -07:00
2025-06-22 08:45:40 +01:00
2025-06-29 21:29:12 +01:00
2025-06-29 14:40:03 +01:00
2025-05-09 11:19:12 +01:00
2025-06-17 18:24:07 +01:00
2025-04-06 22:14:24 +01:00
2025-03-26 21:03:50 +00:00
2025-03-25 20:57:10 +00:00
2025-01-29 16:56:47 +01:00
2025-06-19 13:24:39 +01:00
2025-06-17 11:07:43 +01:00
2025-06-17 11:07:43 +01:00
2025-06-13 21:01:12 +01:00
2025-06-24 21:48:58 +01:00
2025-06-07 21:49:54 +01:00
2025-06-19 13:24:39 +01:00