[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:33 PDT 2025


================
@@ -1,66 +1,91 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
 ; RUN: llc < %s -mtriple=nvptx -mcpu=sm_20 | FileCheck %s
 ; RUN: llc < %s -mtriple=nvptx64 -mcpu=sm_20 | FileCheck %s
 ; RUN: %if ptxas && !ptxas-12.0 %{ llc < %s -mtriple=nvptx -mcpu=sm_20 | %ptxas-verify %}
 ; RUN: %if ptxas %{ llc < %s -mtriple=nvptx64 -mcpu=sm_20 | %ptxas-verify %}
 
-
 ;; Integer conversions happen inplicitly by loading/storing the proper types
 
-
 ; i16
 
 define i16 @cvt_i16_i32(i32 %x) {
-; CHECK: ld.param.b16 %r[[R0:[0-9]+]], [cvt_i16_i32_param_{{[0-9]+}}]
-; CHECK: st.param.b32 [func_retval{{[0-9]+}}], %r[[R0]]
-; CHECK: ret
+; CHECK-LABEL: cvt_i16_i32(
+; CHECK:       {
+; CHECK-NEXT:    .reg .b32 %r<2>;
+; CHECK-EMPTY:
+; CHECK-NEXT:  // %bb.0:
+; CHECK-NEXT:    ld.param.b32 %r1, [cvt_i16_i32_param_0];
+; CHECK-NEXT:    st.param.b32 [func_retval0], %r1;
----------------
Prince781 wrote:

Curious, why don't we have `st.param.b16` if we're returning an `i16` here?

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


More information about the llvm-commits mailing list