[llvm] [NVPTX] Fixup v2i8 parameter and return lowering (PR #145585)

Princeton Ferro via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 26 11:46:34 PDT 2025


================
@@ -14,7 +14,7 @@ define i1 @and_ord(float %a, float %b) {
 ; CHECK-NEXT:    ld.param.b32 %r1, [and_ord_param_0];
 ; CHECK-NEXT:    ld.param.b32 %r2, [and_ord_param_1];
 ; CHECK-NEXT:    setp.num.f32 %p1, %r1, %r2;
-; CHECK-NEXT:    selp.b32 %r3, 1, 0, %p1;
+; CHECK-NEXT:    selp.b32 %r3, -1, 0, %p1;
----------------
Prince781 wrote:

I think this is due to the setting we have in `NVPTXISelLowering()`:

https://github.com/llvm/llvm-project/blob/ca2f50c1fffe8cb7b3f6a651c7ae24d8c282b2b6/llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp#L532-L533

However, in the ISA docs, the description of semantics for instructions like `set` suggest we should use `ZeroOrOneBooleanContent`.

https://github.com/llvm/llvm-project/pull/145585


More information about the llvm-commits mailing list