For vectors that are exactly equal to getMaxSVEVectorSizeInBits, just use
AArch64SVEPredPattern::all, which can enable the use of unpredicated ptrue when available.
TestPlan: check-llvm
Paths
| Differential D108706
[AArch64][SVE] Optimize ptrue predicate pattern with known sve register width. ClosedPublic Authored by junparser on Aug 25 2021, 8:12 AM.
Details Summary For vectors that are exactly equal to getMaxSVEVectorSizeInBits, just use TestPlan: check-llvm
Diff Detail
Unit TestsFailed Event TimelineHerald added subscribers: ctetreau, psnobl, hiraditya and 2 others. · View Herald TranscriptAug 25 2021, 8:12 AM
Comment Actions I know the patch triggers existing test changes but I'd prefer to have an explicit test for this functionality. Noting complicated, perhaps just a 512bit vector add/fadd test for each element type. You can probably just copy them from sve-fixed-length-{int,fp}-arith.ll (i.e. add_v256i8, add_v128i16 ...) and let update_llc_test_checks.py do its stuff. This revision is now accepted and ready to land.Aug 27 2021, 3:10 AM This revision was landed with ongoing or failed builds.Aug 27 2021, 5:04 AM Closed by commit rG15b2a8e7faf6: [AArch64][SVE] Optimize ptrue predicate pattern with known sve register width. (authored by junparser). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 368832 llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/test/CodeGen/AArch64/insert-subvector-res-legalization.ll
llvm/test/CodeGen/AArch64/sve-extract-vector.ll
llvm/test/CodeGen/AArch64/sve-insert-vector.ll
llvm/test/CodeGen/AArch64/sve-vscale-attr.ll
|
There should already be placeholder for this logic. If you look at getPredicateForFixedLengthVector you'll see a TODO comment.