[PATCH] D153278: [RISCV] Add test for un-maskable pseudo without policy operand
Luke Lau via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 19 07:46:41 PDT 2023
luke created this revision.
luke added reviewers: reames, craig.topper, kito-cheng, arcbbb, frasercrmck.
Herald added subscribers: jobnoorman, asb, pmatos, VincentWu, vkmr, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, niosHD, sabuasal, simoncook, johnrusso, rbar, arichardson.
Herald added a project: All.
luke requested review of this revision.
Herald added subscribers: llvm-commits, wangpc, eopXD, MaskRay.
Herald added a project: LLVM.
The passthrough operand is dropped here when it should be preserved (for both tail undisturbed and tail agnostic semantics)
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D153278
Files:
llvm/test/CodeGen/RISCV/rvv/allone-masked-to-unmasked.ll
Index: llvm/test/CodeGen/RISCV/rvv/allone-masked-to-unmasked.ll
===================================================================
--- llvm/test/CodeGen/RISCV/rvv/allone-masked-to-unmasked.ll
+++ llvm/test/CodeGen/RISCV/rvv/allone-masked-to-unmasked.ll
@@ -90,3 +90,30 @@
ret <vscale x 1 x i8> %a
}
+
+declare <vscale x 1 x i1> @llvm.riscv.vmflt.mask.nxv1f32(
+ <vscale x 1 x i1>,
+ <vscale x 1 x float>,
+ <vscale x 1 x float>,
+ <vscale x 1 x i1>,
+ iXLen);
+
+; Make sure we preserve the passthrough on mask pseudos without policy operands
+define <vscale x 1 x i1> @test4(ptr %0, <vscale x 1 x float> %1, <vscale x 1 x float> %2, iXLen %3) {
+; CHECK-LABEL: test4:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
+; CHECK-NEXT: vmflt.vv v0, v8, v9
+; CHECK-NEXT: ret
+entry:
+ %allone = call <vscale x 1 x i1> @llvm.riscv.vmset.nxv1i1(
+ iXLen %3);
+ %passthru = load <vscale x 1 x i1>, ptr %0
+ %a = call <vscale x 1 x i1> @llvm.riscv.vmflt.mask.nxv1f32(
+ <vscale x 1 x i1> %passthru,
+ <vscale x 1 x float> %1,
+ <vscale x 1 x float> %2,
+ <vscale x 1 x i1> %allone,
+ iXLen %3)
+ ret <vscale x 1 x i1> %a
+}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153278.532653.patch
Type: text/x-patch
Size: 1195 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230619/9d62dc58/attachment.bin>
More information about the llvm-commits
mailing list