[llvm] [NVPTX] Attempt to load params using symbol addition node directly (PR #119935)

Artem Belevich via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 8 12:15:58 PST 2025


================
@@ -0,0 +1,44 @@
+; RUN: llc < %s -march=nvptx64 --debug-counter=dagcombine=0 | FileCheck %s
+; RUN: %if ptxas %{ llc < %s -march=nvptx64 | %ptxas-verify %}
+
+%struct.8float = type <{ [8 x float] }>
+
+declare i32 @callee(%struct.8float %a)
+
+define i32 @test(%struct.8float alignstack(32) %data) {
+  ;CHECK-NOT: add.
+  ;CHECK-DAG: ld.param.u8 %r{{.*}}, [test_param_0];
+  ;CHECK-DAG: ld.param.u8 %r{{.*}}, [test_param_0+1];
----------------
Artem-B wrote:

Thank you for digging to the root cause of the divergence. It's unfortunate that it's done that way, but at least we know that the changes are intentional.

> the final SelectionDAG is unoptimized. This is the extent of the debug counter's impact.

This kind of effect should have a separate option to control it. Anyways, that's a discussion somewhat tangential to the issue at hand.

It now boils down to "NVPTX mishandles a valid, but unusual DAG". Even if in this case such DAG is produced by debug code with assertions enabled, there may be other ways to construct such a DAG.


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


More information about the llvm-commits mailing list