[llvm] [NVPTX] Improve device function byval parameter lowering (PR #129188)

Alex MacLean via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 28 10:04:34 PST 2025


================
@@ -27,16 +27,15 @@ define [2 x i128] @foo(i64 %a, i32 %b) {
 define [2 x i128] @foo2(ptr byval([2 x i128]) %a) {
 ; CHECK-LABEL: foo2(
 ; CHECK:       {
-; CHECK-NEXT:    .reg .b64 %rd<6>;
+; CHECK-NEXT:    .reg .b64 %rd<9>;
 ; CHECK-EMPTY:
 ; CHECK-NEXT:  // %bb.0:
-; CHECK-NEXT:    mov.b64 %rd1, foo2_param_0;
----------------
AlexMaclean wrote:

This is happening because 3 extra registers get added for instructions that then get removed by NVPTXForwardParams. This sort of thing happens a lot throughout the backend and I won't have any impact on the final generated code. 

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


More information about the llvm-commits mailing list