[llvm] Reapply "[AMDGPU] Insert readfirstlane in the function returns in sgpr." (PR #136678)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 22 04:16:50 PDT 2025


================
@@ -1,27 +1,30 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
 ; RUN: llc -mtriple=amdgcn -mcpu=gfx900 -O0 -verify-machineinstrs < %s -debug-only=isel 2>&1 | FileCheck --check-prefixes=GCN,GCN-DEFAULT %s
 ; RUN: llc -mtriple=amdgcn -mcpu=gfx900 -O0 -verify-machineinstrs < %s -debug-only=isel -dag-dump-verbose 2>&1 | FileCheck --check-prefixes=GCN,GCN-VERBOSE %s
 
 ; REQUIRES: asserts
 
 ; GCN-LABEL: === test_sdag_dump
 ; GCN: Initial selection DAG: %bb.0 'test_sdag_dump:entry'
-; GCN: SelectionDAG has 10 nodes:
+; GCN: SelectionDAG has 11 nodes:
 
 ; GCN-DEFAULT:  t0: ch,glue = EntryToken
 ; GCN-DEFAULT:  t2: f32,ch = CopyFromReg t0, Register:f32 %0
+; GCN-DEFAULT:  t7: i32 = TargetConstant<[[VAL:[0-9]+]]>
 ; GCN-DEFAULT:      t5: f32 = fadd t2, t2
 ; GCN-DEFAULT:      t4: f32,ch = CopyFromReg # D:1 t0, Register:f32 %1
-; GCN-DEFAULT:    t6: f32 = fadd # D:1 t5, t4
-; GCN-DEFAULT:  t8: ch,glue = CopyToReg # D:1 t0, Register:f32 $vgpr0, t6
-; GCN-DEFAULT:  t9: ch = RETURN_TO_EPILOG t8, Register:f32 $vgpr0, t8:1
+; GCN-DEFAULT:   t6: f32 = fadd # D:1 t5, t4
+; GCN-DEFAULT:  t9: ch,glue = CopyToReg # D:1 t0, Register:f32 $vgpr0, t6
+; GCN-DEFAULT:  t10: ch = RETURN_TO_EPILOG t9, Register:f32 $vgpr0, t9:1
 
 ; GCN-VERBOSE:  t0: ch,glue = EntryToken # D:0
 ; GCN-VERBOSE:  t2: f32,ch = CopyFromReg [ORD=1] # D:0 t0, Register:f32 %0 # D:0
+; GCN-VERBOSE:  t7: i32 = TargetConstant<[[VAL:[0-9]+]]>
----------------
arsenm wrote:

```suggestion
; GCN-VERBOSE:  t7: i32 = TargetConstant<
```

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


More information about the llvm-commits mailing list