Pointless AND, PTEST instructions are generated to force zeroing additional lanes after doing REINTERPRET_CAST operation.
For sve_whilelo operation, no need for that, because its inactive lanes are zeroed by construction.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Time | Test | |
---|---|---|
60,050 ms | x64 debian > libFuzzer.libFuzzer::minimize_crash.test |
Event Timeline
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp | ||
---|---|---|
266 | There are also other while intrinsics, which would benefit in a similar way? | |
llvm/test/CodeGen/AArch64/sve2-ptest_whilelt.ll | ||
6 | lt or lo? | |
32 | Do you need the loop to test this? Or can you just use: %0 = tail call <vscale x 4 x i1> @llvm.aarch64.sve.ptrue.nxv4i1(i32 31) %1 = tail call <vscale x 4 x i1> @llvm.aarch64.sve.whilelo.nxv4i1.i32(i32 0, i32 %width) %2 = tail call i1 @llvm.aarch64.sve.ptest.any.nxv4i1(<vscale x 4 x i1> %0, <vscale x 4 x i1> %1) ? |
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp | ||
---|---|---|
266 | Hi @hassnaa-arm, I think we should probably add the other while variants too here, since the same thing applies for whilelt, etc. | |
llvm/test/CodeGen/AArch64/sve2-ptest_whilelt.ll | ||
1 | The test file suggests this is SVE2, but in fact whilelo was introduced in SVE. Also, the file name suggests you're testing whilelt, but actually it's testing whilelo. Is it worth just renaming the file to be something like sve-ptest-removal-while.ll similar to the other existing sve-ptest-removal-xyz.ll tests? |
llvm/test/CodeGen/AArch64/sve2-ptest_whilelt.ll | ||
---|---|---|
6 | sorry, lo. |
Hi @hassnaa-arm, I think we should probably add the other while variants too here, since the same thing applies for whilelt, etc.