xref: /llvm-project/llvm/test/CodeGen/X86/2012-10-02-DAGCycle.ll (revision 2f448bf509432c1a19ec46ab8cbc7353c03c6280)
1; RUN: llc -mtriple=i386-apple-macosx -relocation-model=pic < %s > /dev/null
2; RUN: llc -mtriple=x86_64-apple-macosx -relocation-model=pic < %s > /dev/null
3
4; rdar://12393897
5
6%TRp = type { i32, ptr, i32, i32 }
7%TRH = type { ptr, ptr, ptr, ptr, ptr }
8
9define i32 @t(ptr inreg %rp) nounwind optsize ssp {
10entry:
11  %handler = getelementptr inbounds %TRp, ptr %rp, i32 0, i32 1
12  %0 = load ptr, ptr %handler, align 4
13  %sync = getelementptr inbounds %TRH, ptr %0, i32 0, i32 4
14  %sync12 = load ptr, ptr %sync, align 4
15  %call = tail call i32 %sync12(ptr inreg %rp) nounwind optsize
16  ret i32 %call
17}
18
19%btConeShape = type { %btConvexInternalShape, float, float, float, [3 x i32] }
20%btConvexInternalShape = type { %btConvexShape, %btVector, %btVector, float, float }
21%btConvexShape = type { %btCollisionShape }
22%btCollisionShape = type { ptr, i32, ptr }
23%btVector = type { [4 x float] }
24
25define { <2 x float>, <2 x float> } @t2(ptr %this) unnamed_addr uwtable ssp align 2 {
26entry:
27  br i1 undef, label %if.then, label %if.end17
28
29if.then:                                          ; preds = %entry
30  %vecnorm.sroa.2.8.copyload = load float, ptr undef, align 4
31  %cmp4 = fcmp olt float undef, 0x3D10000000000000
32  %vecnorm.sroa.2.8.copyload36 = select i1 %cmp4, float -1.000000e+00, float %vecnorm.sroa.2.8.copyload
33  %call.i.i.i = tail call float @sqrtf(float 0.000000e+00) nounwind readnone
34  %div.i.i = fdiv float 1.000000e+00, %call.i.i.i
35  %mul7.i.i.i = fmul float %div.i.i, %vecnorm.sroa.2.8.copyload36
36  %0 = load ptr, ptr undef, align 8
37  %call12 = tail call float %0(ptr %this)
38  %mul7.i.i = fmul float %call12, %mul7.i.i.i
39  %retval.sroa.0.4.insert = insertelement <2 x float> zeroinitializer, float undef, i32 1
40  %add13.i = fadd float undef, %mul7.i.i
41  %retval.sroa.1.8.insert = insertelement <2 x float> undef, float %add13.i, i32 0
42  br label %if.end17
43
44if.end17:                                         ; preds = %if.then, %entry
45  %retval.sroa.1.8.load3338 = phi <2 x float> [ %retval.sroa.1.8.insert, %if.then ], [ undef, %entry ]
46  %retval.sroa.0.0.load3137 = phi <2 x float> [ %retval.sroa.0.4.insert, %if.then ], [ undef, %entry ]
47  ret { <2 x float>, <2 x float> } undef
48}
49
50declare float @sqrtf(float) nounwind readnone
51