aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/SourceManager.cpp
diff options
context:
space:
mode:
authorDavid Sherwood <david.sherwood@arm.com>2025-07-02 13:05:51 +0100
committerGitHub <noreply@github.com>2025-07-02 13:05:51 +0100
commitf575b18fdc8359bddc8747dbb8b16e5d10705dda (patch)
tree76ec7a8d04d3a29b6565921e812c09841532ec5e /clang/lib/Basic/SourceManager.cpp
parentdea4f3213d84507ca9741faccab789f48c44e00d (diff)
downloadllvm-f575b18fdc8359bddc8747dbb8b16e5d10705dda.zip
llvm-f575b18fdc8359bddc8747dbb8b16e5d10705dda.tar.gz
llvm-f575b18fdc8359bddc8747dbb8b16e5d10705dda.tar.bz2
[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>
Diffstat (limited to 'clang/lib/Basic/SourceManager.cpp')
0 files changed, 0 insertions, 0 deletions