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 <2 x i32> <i32 1, i32 5>, ptr [[INFO]], align 4
22 ; CHECK-NEXT: br label [[FOR_INC_1]]
24 ; CHECK-NEXT: [[TMP0:%.*]] = phi i32 [ 5, [[IF_THEN7_1]] ], [ 6, [[LAND_LHS_TRUE_I_1]] ]
25 ; CHECK-NEXT: [[TMP1:%.*]] = phi i32 [ 1, [[IF_THEN7_1]] ], [ 0, [[LAND_LHS_TRUE_I_1]] ]
26 ; CHECK-NEXT: [[INC_2:%.*]] = add nsw i32 [[TMP1]], 1
27 ; CHECK-NEXT: store i32 [[INC_2]], ptr [[INFO]], align 4
28 ; CHECK-NEXT: [[DEC_2:%.*]] = add nsw i32 [[TMP0]], -1
29 ; CHECK-NEXT: store i32 [[DEC_2]], ptr [[NUB5]], align 4
30 ; CHECK-NEXT: unreachable
33 br i1 undef, label %if.else, label %if.then
35 if.then: ; preds = %entry
38 if.else: ; preds = %entry
39 %nub5 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo1.17.157.357.417.477.960", ptr %info, i64 0, i32 1
40 br i1 undef, label %land.lhs.true.i.1, label %if.then7.1
42 land.lhs.true.i.1: ; preds = %if.else
43 br i1 undef, label %for.inc.1, label %if.then7.1
45 if.then7.1: ; preds = %land.lhs.true.i.1, %if.else
46 %inc.1 = add nsw i32 0, 1
47 store i32 %inc.1, ptr %info, align 4
48 %dec.1 = add nsw i32 6, -1
49 store i32 %dec.1, ptr %nub5, align 4
52 for.inc.1: ; preds = %if.then7.1, %land.lhs.true.i.1
53 %0 = phi i32 [ %dec.1, %if.then7.1 ], [ 6, %land.lhs.true.i.1 ]
54 %1 = phi i32 [ %inc.1, %if.then7.1 ], [ 0, %land.lhs.true.i.1 ]
55 %inc.2 = add nsw i32 %1, 1
56 store i32 %inc.2, ptr %info, align 4
57 %dec.2 = add nsw i32 %0, -1
58 store i32 %dec.2, ptr %nub5, align 4
62 %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] }
63 %class.btVector3.5.30.65.90.115.140.175.185.260.280.330 = type { [4 x float] }
64 %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 }
66 define void @_ZN30GIM_TRIANGLE_CALCULATION_CACHE18triangle_collisionERK9btVector3S2_S2_fS2_S2_S2_fR25GIM_TRIANGLE_CONTACT_DATA(ptr %this) {
67 ; CHECK-LABEL: @_ZN30GIM_TRIANGLE_CALCULATION_CACHE18triangle_collisionERK9btVector3S2_S2_fS2_S2_S2_fR25GIM_TRIANGLE_CONTACT_DATA(
69 ; 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
70 ; 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
71 ; CHECK-NEXT: [[TMP0:%.*]] = load float, ptr [[ARRAYIDX36]], align 4
72 ; CHECK-NEXT: [[TMP1:%.*]] = insertelement <2 x float> <float undef, float poison>, float [[TMP0]], i32 1
73 ; CHECK-NEXT: [[TMP2:%.*]] = fadd <2 x float> [[TMP1]], undef
74 ; CHECK-NEXT: [[TMP3:%.*]] = fsub <2 x float> [[TMP2]], undef
75 ; CHECK-NEXT: [[TMP4:%.*]] = extractelement <2 x float> [[TMP3]], i32 0
76 ; CHECK-NEXT: store float [[TMP4]], ptr undef, align 4
77 ; CHECK-NEXT: [[TMP5:%.*]] = fsub <2 x float> [[TMP2]], [[TMP3]]
78 ; CHECK-NEXT: store <2 x float> [[TMP5]], ptr [[ARRAYIDX26]], align 4
79 ; CHECK-NEXT: br i1 undef, label [[IF_ELSE1609:%.*]], label [[IF_THEN1595:%.*]]
81 ; CHECK-NEXT: br i1 undef, label [[RETURN:%.*]], label [[FOR_BODY_LR_PH_I_I1702:%.*]]
82 ; CHECK: for.body.lr.ph.i.i1702:
83 ; CHECK-NEXT: unreachable
85 ; CHECK-NEXT: unreachable
87 ; CHECK-NEXT: ret void
90 %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
91 %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
92 %0 = load float, ptr %arrayidx36, align 4
93 %add587 = fadd float undef, undef
94 %sub600 = fsub float %add587, undef
95 store float %sub600, ptr undef, align 4
96 %sub613 = fsub float %add587, %sub600
97 store float %sub613, ptr %arrayidx26, align 4
98 %add626 = fadd float %0, undef
99 %sub639 = fsub float %add626, undef
100 %sub652 = fsub float %add626, %sub639
101 store float %sub652, ptr %arrayidx36, align 4
102 br i1 undef, label %if.else1609, label %if.then1595
104 if.then1595: ; preds = %entry
105 br i1 undef, label %return, label %for.body.lr.ph.i.i1702
107 for.body.lr.ph.i.i1702: ; preds = %if.then1595
110 if.else1609: ; preds = %entry
113 return: ; preds = %if.then1595
117 define void @_Z8dBoxBox2RK9btVector3PKfS1_S1_S3_S1_RS_PfPiiP12dContactGeomiRN36btDiscreteCollisionDetectorInterface6ResultE() {
118 ; CHECK-LABEL: @_Z8dBoxBox2RK9btVector3PKfS1_S1_S3_S1_RS_PfPiiP12dContactGeomiRN36btDiscreteCollisionDetectorInterface6ResultE(
120 ; CHECK-NEXT: br i1 undef, label [[RETURN:%.*]], label [[IF_END:%.*]]
122 ; CHECK-NEXT: br i1 undef, label [[RETURN]], label [[IF_END111:%.*]]
124 ; CHECK-NEXT: br i1 undef, label [[RETURN]], label [[IF_END136:%.*]]
126 ; CHECK-NEXT: br i1 undef, label [[RETURN]], label [[IF_END162:%.*]]
128 ; CHECK-NEXT: br i1 undef, label [[RETURN]], label [[IF_END189:%.*]]
130 ; CHECK-NEXT: br i1 undef, label [[RETURN]], label [[IF_END216:%.*]]
132 ; CHECK-NEXT: br i1 undef, label [[IF_THEN218:%.*]], label [[IF_END225:%.*]]
134 ; CHECK-NEXT: br label [[IF_END225]]
136 ; CHECK-NEXT: br i1 undef, label [[RETURN]], label [[IF_END248:%.*]]
138 ; CHECK-NEXT: br i1 undef, label [[RETURN]], label [[IF_END304:%.*]]
140 ; CHECK-NEXT: br i1 undef, label [[RETURN]], label [[IF_END361:%.*]]
142 ; CHECK-NEXT: br i1 undef, label [[IF_THEN370:%.*]], label [[IF_END395:%.*]]
144 ; CHECK-NEXT: br i1 undef, label [[IF_THEN374:%.*]], label [[IF_END395]]
146 ; CHECK-NEXT: br label [[IF_END395]]
148 ; CHECK-NEXT: unreachable
150 ; CHECK-NEXT: ret void
153 %add8.i2343 = fadd float undef, undef
154 %add8.i2381 = fadd float undef, undef
155 br i1 undef, label %return, label %if.end
157 if.end: ; preds = %entry
158 br i1 undef, label %return, label %if.end111
160 if.end111: ; preds = %if.end
161 br i1 undef, label %return, label %if.end136
163 if.end136: ; preds = %if.end111
164 br i1 undef, label %return, label %if.end162
166 if.end162: ; preds = %if.end136
167 br i1 undef, label %return, label %if.end189
169 if.end189: ; preds = %if.end162
170 br i1 undef, label %return, label %if.end216
172 if.end216: ; preds = %if.end189
173 br i1 undef, label %if.then218, label %if.end225
175 if.then218: ; preds = %if.end216
178 if.end225: ; preds = %if.then218, %if.end216
179 br i1 undef, label %return, label %if.end248
181 if.end248: ; preds = %if.end225
182 br i1 undef, label %return, label %if.end304
184 if.end304: ; preds = %if.end248
185 %mul341 = fmul float undef, %add8.i2343
186 %mul344 = fmul float undef, %add8.i2381
187 %sub345 = fsub float %mul341, %mul344
188 br i1 undef, label %return, label %if.end361
190 if.end361: ; preds = %if.end304
191 %mul364 = fmul float %add8.i2381, %add8.i2381
192 br i1 undef, label %if.then370, label %if.end395
194 if.then370: ; preds = %if.end361
195 br i1 undef, label %if.then374, label %if.end395
197 if.then374: ; preds = %if.then370
198 %cmp392 = fcmp olt float %sub345, 0.000000e+00
201 if.end395: ; preds = %if.then374, %if.then370, %if.end361
204 return: ; preds = %if.end304, %if.end248, %if.end225, %if.end189, %if.end162, %if.end136, %if.end111, %if.end, %entry