1 ; RUN: llc -march=amdgcn -verify-machineinstrs < %s | FileCheck -check-prefix=GCN %s
3 ; GCN-LABEL: {{^}}test_dont_clobber_scc:
6 ; GCN: s_cmp_eq_u32 s0, 0
7 ; GCN: s_cbranch_scc1 [[PREEXIT:BB[0-9_]+]]
10 ; GCN: s_xor_b64 s[{{[0-9:]+}}], exec, -1
11 ; GCN: s_cmp_eq_u32 s1, 0
12 ; GCN: s_cbranch_scc1 [[EXIT:BB[0-9_]+]]
17 define amdgpu_vs float @test_dont_clobber_scc(i32 inreg %uni, i32 inreg %uni2) #0 {
19 %cc.uni = icmp eq i32 %uni, 0
20 br i1 %cc.uni, label %exit, label %blocka
23 call void asm sideeffect "; dummy a", ""()
24 %cc.uni2 = icmp eq i32 %uni2, 0
25 br i1 %cc.uni2, label %exit, label %blockb
28 call void asm sideeffect "; dummy b", ""()
32 %cc.phi = phi i1 [ true, %entry ], [ false, %blocka ], [ false, %blockb ]
33 call void asm sideeffect "; dummy exit", ""()
34 %r = select i1 %cc.phi, float 1.0, float 2.0
38 attributes #0 = { nounwind }