[PATCH] D141397: [AArch64][SVE]: Optimize using ptest with whilelo
Sander de Smalen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 10 09:13:41 PST 2023
sdesmalen added inline comments.
================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:266
return false;
+ case Intrinsic::aarch64_sve_whilelo:
case Intrinsic::aarch64_sve_ptrue:
----------------
There are also other while intrinsics, which would benefit in a similar way?
================
Comment at: llvm/test/CodeGen/AArch64/sve2-ptest_whilelt.ll:6
+
+define void @test_svwhilelt_with_ptest(i32 noundef %width) #0 {
+; CHECK-LABEL: test_svwhilelt_with_ptest:
----------------
lt or lo?
================
Comment at: llvm/test/CodeGen/AArch64/sve2-ptest_whilelt.ll:32
+
+for.body: ; preds = %for.body.lr.ph, %for.body
+ %5 = phi <vscale x 4 x i1> [ %1, %for.body.lr.ph ], [ %6, %for.body ]
----------------
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)
?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141397/new/
https://reviews.llvm.org/D141397
More information about the llvm-commits
mailing list