1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -passes=slp-vectorizer,dce -S -mtriple=x86_64-apple-macosx10.8.0 -mcpu=corei7 | FileCheck %s
4 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
5 target triple = "x86_64-apple-macosx10.8.0"
7 %"struct.btTypedConstraint::btConstraintInfo1.17.157.357.417.477.960" = type { i32, i32 }
9 define void @_ZN23btGeneric6DofConstraint8getInfo1EPN17btTypedConstraint17btConstraintInfo1E(ptr nocapture %info) {
10 ; CHECK-LABEL: @_ZN23btGeneric6DofConstraint8getInfo1EPN17btTypedConstraint17btConstraintInfo1E(
12 ; CHECK-NEXT: br i1 undef, label [[IF_ELSE:%.*]], label [[IF_THEN:%.*]]
14 ; CHECK-NEXT: ret void
16 ; CHECK-NEXT: [[NUB5:%.*]] = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo1.17.157.357.417.477.960", ptr [[INFO:%.*]], i64 0, i32 1
17 ; CHECK-NEXT: br i1 undef, label [[LAND_LHS_TRUE_I_1:%.*]], label [[IF_THEN7_1:%.*]]
18 ; CHECK: land.lhs.true.i.1:
19 ; CHECK-NEXT: br i1 undef, label [[FOR_INC_1:%.*]], label [[IF_THEN7_1]]
21 ; CHECK-NEXT: store i32 1, ptr [[INFO]], align 4
22 ; CHECK-NEXT: store i32 5, ptr [[NUB5]], align 4
23 ; CHECK-NEXT: br label [[FOR_INC_1]]
25 ; CHECK-NEXT: [[TMP0:%.*]] = phi <2 x i32> [ <i32 1, i32 5>, [[IF_THEN7_1]] ], [ <i32 0, i32 6>, [[LAND_LHS_TRUE_I_1]] ]
26 ; CHECK-NEXT: [[TMP1:%.*]] = add nsw <2 x i32> [[TMP0]], <i32 1, i32 -1>
27 ; CHECK-NEXT: store <2 x i32> [[TMP1]], ptr [[INFO]], align 4
28 ; CHECK-NEXT: unreachable
31 br i1 undef, label %if.else, label %if.then
33 if.then: ; preds = %entry
36 if.else: ; preds = %entry
37 %nub5 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo1.17.157.357.417.477.960", ptr %info, i64 0, i32 1
38 br i1 undef, label %land.lhs.true.i.1, label %if.then7.1
40 land.lhs.true.i.1: ; preds = %if.else
41 br i1 undef, label %for.inc.1, label %if.then7.1
43 if.then7.1: ; preds = %land.lhs.true.i.1, %if.else
44 %inc.1 = add nsw i32 0, 1
45 store i32 %inc.1, ptr %info, align 4
46 %dec.1 = add nsw i32 6, -1
47 store i32 %dec.1, ptr %nub5, align 4
50 for.inc.1: ; preds = %if.then7.1, %land.lhs.true.i.1
51 %0 = phi i32 [ %dec.1, %if.then7.1 ], [ 6, %land.lhs.true.i.1 ]
52 %1 = phi i32 [ %inc.1, %if.then7.1 ], [ 0, %land.lhs.true.i.1 ]
53 %inc.2 = add nsw i32 %1, 1
54 store i32 %inc.2, ptr %info, align 4
55 %dec.2 = add nsw i32 %0, -1
56 store i32 %dec.2, ptr %nub5, align 4
60 %class.GIM_TRIANGLE_CALCULATION_CACHE.9.34.69.94.119.144.179.189.264.284.332 = type { float, [3 x %class.btVector3.5.30.65.90.115.140.175.185.260.280.330], [3 x %class.btVector3.5.30.65.90.115.140.175.185.260.280.330], %class.btVector4.7.32.67.92.117.142.177.187.262.282.331, %class.btVector4.7.32.67.92.117.142.177.187.262.282.331, %class.btVector3.5.30.65.90.115.140.175.185.260.280.330, %class.btVector3.5.30.65.90.115.140.175.185.260.280.330, %class.btVector3.5.30.65.90.115.140.175.185.260.280.330, %class.btVector3.5.30.65.90.115.140.175.185.260.280.330, [4 x float], float, float, [4 x float], float, float, [16 x %class.btVector3.5.30.65.90.115.140.175.185.260.280.330], [16 x %class.btVector3.5.30.65.90.115.140.175.185.260.280.330], [16 x %class.btVector3.5.30.65.90.115.140.175.185.260.280.330] }
61 %class.btVector3.5.30.65.90.115.140.175.185.260.280.330 = type { [4 x float] }
62 %class.btVector4.7.32.67.92.117.142.177.187.262.282.331 = type { %class.btVector3.5.30.65.90.115.140.175.185.260.280.330 }
64 define void @_ZN30GIM_TRIANGLE_CALCULATION_CACHE18triangle_collisionERK9btVector3S2_S2_fS2_S2_S2_fR25GIM_TRIANGLE_CONTACT_DATA(ptr %this) {
65 ; CHECK-LABEL: @_ZN30GIM_TRIANGLE_CALCULATION_CACHE18triangle_collisionERK9btVector3S2_S2_fS2_S2_S2_fR25GIM_TRIANGLE_CONTACT_DATA(
67 ; CHECK-NEXT: [[ARRAYIDX26:%.*]] = getelementptr inbounds [[CLASS_GIM_TRIANGLE_CALCULATION_CACHE_9_34_69_94_119_144_179_189_264_284_332:%.*]], ptr [[THIS:%.*]], i64 0, i32 2, i64 0, i32 0, i64 1
68 ; CHECK-NEXT: [[ARRAYIDX36:%.*]] = getelementptr inbounds [[CLASS_GIM_TRIANGLE_CALCULATION_CACHE_9_34_69_94_119_144_179_189_264_284_332]], ptr [[THIS]], i64 0, i32 2, i64 0, i32 0, i64 2
69 ; CHECK-NEXT: [[TMP0:%.*]] = load float, ptr [[ARRAYIDX36]], align 4
70 ; CHECK-NEXT: [[TMP1:%.*]] = insertelement <2 x float> <float undef, float poison>, float [[TMP0]], i32 1
71 ; CHECK-NEXT: [[TMP2:%.*]] = fadd <2 x float> [[TMP1]], undef
72 ; CHECK-NEXT: [[TMP3:%.*]] = fsub <2 x float> [[TMP2]], undef
73 ; CHECK-NEXT: [[TMP4:%.*]] = extractelement <2 x float> [[TMP3]], i32 0
74 ; CHECK-NEXT: store float [[TMP4]], ptr undef, align 4
75 ; CHECK-NEXT: [[TMP5:%.*]] = fsub <2 x float> [[TMP2]], [[TMP3]]
76 ; CHECK-NEXT: store <2 x float> [[TMP5]], ptr [[ARRAYIDX26]], align 4
77 ; CHECK-NEXT: br i1 undef, label [[IF_ELSE1609:%.*]], label [[IF_THEN1595:%.*]]
79 ; CHECK-NEXT: br i1 undef, label [[RETURN:%.*]], label [[FOR_BODY_LR_PH_I_I1702:%.*]]
80 ; CHECK: for.body.lr.ph.i.i1702:
81 ; CHECK-NEXT: unreachable
83 ; CHECK-NEXT: unreachable
85 ; CHECK-NEXT: ret void
88 %arrayidx26 = getelementptr inbounds %class.GIM_TRIANGLE_CALCULATION_CACHE.9.34.69.94.119.144.179.189.264.284.332, ptr %this, i64 0, i32 2, i64 0, i32 0, i64 1
89 %arrayidx36 = getelementptr inbounds %class.GIM_TRIANGLE_CALCULATION_CACHE.9.34.69.94.119.144.179.189.264.284.332, ptr %this, i64 0, i32 2, i64 0, i32 0, i64 2
90 %0 = load float, ptr %arrayidx36, align 4
91 %add587 = fadd float undef, undef
92 %sub600 = fsub float %add587, undef
93 store float %sub600, ptr undef, align 4
94 %sub613 = fsub float %add587, %sub600
95 store float %sub613, ptr %arrayidx26, align 4
96 %add626 = fadd float %0, undef
97 %sub639 = fsub float %add626, undef
98 %sub652 = fsub float %add626, %sub639
99 store float %sub652, ptr %arrayidx36, align 4
100 br i1 undef, label %if.else1609, label %if.then1595
102 if.then1595: ; preds = %entry
103 br i1 undef, label %return, label %for.body.lr.ph.i.i1702
105 for.body.lr.ph.i.i1702: ; preds = %if.then1595
108 if.else1609: ; preds = %entry
111 return: ; preds = %if.then1595
115 define void @_Z8dBoxBox2RK9btVector3PKfS1_S1_S3_S1_RS_PfPiiP12dContactGeomiRN36btDiscreteCollisionDetectorInterface6ResultE() {
116 ; CHECK-LABEL: @_Z8dBoxBox2RK9btVector3PKfS1_S1_S3_S1_RS_PfPiiP12dContactGeomiRN36btDiscreteCollisionDetectorInterface6ResultE(
118 ; CHECK-NEXT: br i1 undef, label [[RETURN:%.*]], label [[IF_END:%.*]]
120 ; CHECK-NEXT: br i1 undef, label [[RETURN]], label [[IF_END111:%.*]]
122 ; CHECK-NEXT: br i1 undef, label [[RETURN]], label [[IF_END136:%.*]]
124 ; CHECK-NEXT: br i1 undef, label [[RETURN]], label [[IF_END162:%.*]]
126 ; CHECK-NEXT: br i1 undef, label [[RETURN]], label [[IF_END189:%.*]]
128 ; CHECK-NEXT: br i1 undef, label [[RETURN]], label [[IF_END216:%.*]]
130 ; CHECK-NEXT: br i1 undef, label [[IF_THEN218:%.*]], label [[IF_END225:%.*]]
132 ; CHECK-NEXT: br label [[IF_END225]]
134 ; CHECK-NEXT: br i1 undef, label [[RETURN]], label [[IF_END248:%.*]]
136 ; CHECK-NEXT: br i1 undef, label [[RETURN]], label [[IF_END304:%.*]]
138 ; CHECK-NEXT: br i1 undef, label [[RETURN]], label [[IF_END361:%.*]]
140 ; CHECK-NEXT: br i1 undef, label [[IF_THEN370:%.*]], label [[IF_END395:%.*]]
142 ; CHECK-NEXT: br i1 undef, label [[IF_THEN374:%.*]], label [[IF_END395]]
144 ; CHECK-NEXT: br label [[IF_END395]]
146 ; CHECK-NEXT: unreachable
148 ; CHECK-NEXT: ret void
151 %add8.i2343 = fadd float undef, undef
152 %add8.i2381 = fadd float undef, undef
153 br i1 undef, label %return, label %if.end
155 if.end: ; preds = %entry
156 br i1 undef, label %return, label %if.end111
158 if.end111: ; preds = %if.end
159 br i1 undef, label %return, label %if.end136
161 if.end136: ; preds = %if.end111
162 br i1 undef, label %return, label %if.end162
164 if.end162: ; preds = %if.end136
165 br i1 undef, label %return, label %if.end189
167 if.end189: ; preds = %if.end162
168 br i1 undef, label %return, label %if.end216
170 if.end216: ; preds = %if.end189
171 br i1 undef, label %if.then218, label %if.end225
173 if.then218: ; preds = %if.end216
176 if.end225: ; preds = %if.then218, %if.end216
177 br i1 undef, label %return, label %if.end248
179 if.end248: ; preds = %if.end225
180 br i1 undef, label %return, label %if.end304
182 if.end304: ; preds = %if.end248
183 %mul341 = fmul float undef, %add8.i2343
184 %mul344 = fmul float undef, %add8.i2381
185 %sub345 = fsub float %mul341, %mul344
186 br i1 undef, label %return, label %if.end361
188 if.end361: ; preds = %if.end304
189 %mul364 = fmul float %add8.i2381, %add8.i2381
190 br i1 undef, label %if.then370, label %if.end395
192 if.then370: ; preds = %if.end361
193 br i1 undef, label %if.then374, label %if.end395
195 if.then374: ; preds = %if.then370
196 %cmp392 = fcmp olt float %sub345, 0.000000e+00
199 if.end395: ; preds = %if.then374, %if.then370, %if.end361
202 return: ; preds = %if.end304, %if.end248, %if.end225, %if.end189, %if.end162, %if.end136, %if.end111, %if.end, %entry