xref: /aosp_15_r20/external/llvm/test/CodeGen/AMDGPU/rename-disconnected-bug.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc -verify-machineinstrs -o /dev/null %s
2*9880d681SAndroid Build Coastguard Worker; Check that renameDisconnectedComponents() does not create vregs without a
3*9880d681SAndroid Build Coastguard Worker; definition on every path (there should at least be IMPLICIT_DEF instructions).
4*9880d681SAndroid Build Coastguard Workertarget triple = "amdgcn--"
5*9880d681SAndroid Build Coastguard Worker
6*9880d681SAndroid Build Coastguard Workerdefine void @func() {
7*9880d681SAndroid Build Coastguard WorkerB0:
8*9880d681SAndroid Build Coastguard Worker  br i1 undef, label %B1, label %B2
9*9880d681SAndroid Build Coastguard Worker
10*9880d681SAndroid Build Coastguard WorkerB1:
11*9880d681SAndroid Build Coastguard Worker  br label %B2
12*9880d681SAndroid Build Coastguard Worker
13*9880d681SAndroid Build Coastguard WorkerB2:
14*9880d681SAndroid Build Coastguard Worker  %v0 = phi <4 x float> [ zeroinitializer, %B1 ], [ <float 0.0, float 0.0, float 0.0, float undef>, %B0 ]
15*9880d681SAndroid Build Coastguard Worker  br i1 undef, label %B20.1, label %B20.2
16*9880d681SAndroid Build Coastguard Worker
17*9880d681SAndroid Build Coastguard WorkerB20.1:
18*9880d681SAndroid Build Coastguard Worker  br label %B20.2
19*9880d681SAndroid Build Coastguard Worker
20*9880d681SAndroid Build Coastguard WorkerB20.2:
21*9880d681SAndroid Build Coastguard Worker  %v2 = phi <4 x float> [ zeroinitializer, %B20.1 ], [ %v0, %B2 ]
22*9880d681SAndroid Build Coastguard Worker  br i1 undef, label %B30.1, label %B30.2
23*9880d681SAndroid Build Coastguard Worker
24*9880d681SAndroid Build Coastguard WorkerB30.1:
25*9880d681SAndroid Build Coastguard Worker  %sub = fsub <4 x float> %v2, undef
26*9880d681SAndroid Build Coastguard Worker  br label %B30.2
27*9880d681SAndroid Build Coastguard Worker
28*9880d681SAndroid Build Coastguard WorkerB30.2:
29*9880d681SAndroid Build Coastguard Worker  %v3 = phi <4 x float> [ %sub, %B30.1 ], [ %v2, %B20.2 ]
30*9880d681SAndroid Build Coastguard Worker  %ve0 = extractelement <4 x float> %v3, i32 0
31*9880d681SAndroid Build Coastguard Worker  store float %ve0, float addrspace(3)* undef, align 4
32*9880d681SAndroid Build Coastguard Worker  ret void
33*9880d681SAndroid Build Coastguard Worker}
34