diff --git a/llvm/test/CodeGen/RISCV/rvv/allone-masked-to-unmasked.ll b/llvm/test/CodeGen/RISCV/rvv/allone-masked-to-unmasked.ll --- a/llvm/test/CodeGen/RISCV/rvv/allone-masked-to-unmasked.ll +++ b/llvm/test/CodeGen/RISCV/rvv/allone-masked-to-unmasked.ll @@ -90,3 +90,31 @@ ret %a } + +declare @llvm.riscv.vmflt.mask.nxv1f32( + , + , + , + , + iXLen); + +; FIXME: Make sure we preserve the passthrough on mask pseudos without policy +; operands +define @test4(ptr %0, %1, %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 @llvm.riscv.vmset.nxv1i1( + iXLen %3); + %passthru = load , ptr %0 + %a = call @llvm.riscv.vmflt.mask.nxv1f32( + %passthru, + %1, + %2, + %allone, + iXLen %3) + ret %a +}