when the predicate used by last{a,b} specifies a known vector length.
For example:
aarch64_sve_lasta(VL1, D) -> extractelement(D, #1) aarch64_sve_lastb(VL1, D) -> extractelement(D, #0)
Co-authored-by: Paul Walker <paul.walker@arm.com>
Paths
| Differential D100476
[AArch64][SVEIntrinsicOpts] Replace last{a,b} intrinsic calls with extracts... ClosedPublic Authored by joechrisellis on Apr 14 2021, 6:38 AM.
Details Summary when the predicate used by last{a,b} specifies a known vector length. For example: aarch64_sve_lasta(VL1, D) -> extractelement(D, #1) aarch64_sve_lastb(VL1, D) -> extractelement(D, #0) Co-authored-by: Paul Walker <paul.walker@arm.com>
Diff Detail
Event TimelineHerald added subscribers: hiraditya, kristof.beyls, tschuett. · View Herald TranscriptApr 14 2021, 6:38 AM
joechrisellis added inline comments.
joechrisellis marked an inline comment as done. Comment ActionsAddress review comments.
Comment Actions Thanks for the change. This looks very sensible to me, so long as the other SVE folks agree. paulwalker-arm added inline comments.
This revision is now accepted and ready to land.Apr 19 2021, 2:28 AM Closed by commit rGc91cd4f3bb53: [AArch64][SVE][InstCombine] Replace last{a,b} intrinsics with extracts... (authored by joechrisellis). · Explain WhyApr 20 2021, 3:02 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 338153 llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h
llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
llvm/test/Transforms/InstCombine/AArch64/sve-intrinsic-opts-lasta-lastb.ll
|
Are these needed? I can only see one use of either within the IsAfter block but then the following code falls back to II.getArgOperand calls. It'll be nice to unify to one or the other.