1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -basicaa -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(%"struct.btTypedConstraint::btConstraintInfo1.17.157.357.417.477.960"* 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: [[M_NUMCONSTRAINTROWS4:%.*]] = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo1.17.157.357.417.477.960", %"struct.btTypedConstraint::btConstraintInfo1.17.157.357.417.477.960"* [[INFO:%.*]], i64 0, i32 0
17 ; CHECK-NEXT: [[NUB5:%.*]] = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo1.17.157.357.417.477.960", %"struct.btTypedConstraint::btConstraintInfo1.17.157.357.417.477.960"* [[INFO]], i64 0, i32 1
18 ; CHECK-NEXT: br i1 undef, label [[LAND_LHS_TRUE_I_1:%.*]], label [[IF_THEN7_1:%.*]]
19 ; CHECK: land.lhs.true.i.1:
20 ; CHECK-NEXT: br i1 undef, label [[FOR_INC_1:%.*]], label [[IF_THEN7_1]]
22 ; CHECK-NEXT: [[INC_1:%.*]] = add nsw i32 0, 1
23 ; CHECK-NEXT: store i32 [[INC_1]], i32* [[M_NUMCONSTRAINTROWS4]], align 4
24 ; CHECK-NEXT: [[DEC_1:%.*]] = add nsw i32 6, -1
25 ; CHECK-NEXT: store i32 [[DEC_1]], i32* [[NUB5]], align 4
26 ; CHECK-NEXT: br label [[FOR_INC_1]]
28 ; CHECK-NEXT: [[TMP0:%.*]] = phi i32 [ [[DEC_1]], [[IF_THEN7_1]] ], [ 6, [[LAND_LHS_TRUE_I_1]] ]
29 ; CHECK-NEXT: [[TMP1:%.*]] = phi i32 [ [[INC_1]], [[IF_THEN7_1]] ], [ 0, [[LAND_LHS_TRUE_I_1]] ]
30 ; CHECK-NEXT: [[INC_2:%.*]] = add nsw i32 [[TMP1]], 1
31 ; CHECK-NEXT: store i32 [[INC_2]], i32* [[M_NUMCONSTRAINTROWS4]], align 4
32 ; CHECK-NEXT: [[DEC_2:%.*]] = add nsw i32 [[TMP0]], -1
33 ; CHECK-NEXT: store i32 [[DEC_2]], i32* [[NUB5]], align 4
34 ; CHECK-NEXT: unreachable
37 br i1 undef, label %if.else, label %if.then
39 if.then: ; preds = %entry
42 if.else: ; preds = %entry
43 %m_numConstraintRows4 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo1.17.157.357.417.477.960", %"struct.btTypedConstraint::btConstraintInfo1.17.157.357.417.477.960"* %info, i64 0, i32 0
44 %nub5 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo1.17.157.357.417.477.960", %"struct.btTypedConstraint::btConstraintInfo1.17.157.357.417.477.960"* %info, i64 0, i32 1
45 br i1 undef, label %land.lhs.true.i.1, label %if.then7.1
47 land.lhs.true.i.1: ; preds = %if.else
48 br i1 undef, label %for.inc.1, label %if.then7.1
50 if.then7.1: ; preds = %land.lhs.true.i.1, %if.else
51 %inc.1 = add nsw i32 0, 1
52 store i32 %inc.1, i32* %m_numConstraintRows4, align 4
53 %dec.1 = add nsw i32 6, -1
54 store i32 %dec.1, i32* %nub5, align 4
57 for.inc.1: ; preds = %if.then7.1, %land.lhs.true.i.1
58 %0 = phi i32 [ %dec.1, %if.then7.1 ], [ 6, %land.lhs.true.i.1 ]
59 %1 = phi i32 [ %inc.1, %if.then7.1 ], [ 0, %land.lhs.true.i.1 ]
60 %inc.2 = add nsw i32 %1, 1
61 store i32 %inc.2, i32* %m_numConstraintRows4, align 4
62 %dec.2 = add nsw i32 %0, -1
63 store i32 %dec.2, i32* %nub5, align 4
67 %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] }
68 %class.btVector3.5.30.65.90.115.140.175.185.260.280.330 = type { [4 x float] }
69 %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 }
71 define void @_ZN30GIM_TRIANGLE_CALCULATION_CACHE18triangle_collisionERK9btVector3S2_S2_fS2_S2_S2_fR25GIM_TRIANGLE_CONTACT_DATA(%class.GIM_TRIANGLE_CALCULATION_CACHE.9.34.69.94.119.144.179.189.264.284.332* %this) {
72 ; CHECK-LABEL: @_ZN30GIM_TRIANGLE_CALCULATION_CACHE18triangle_collisionERK9btVector3S2_S2_fS2_S2_S2_fR25GIM_TRIANGLE_CONTACT_DATA(
74 ; CHECK-NEXT: [[ARRAYIDX26:%.*]] = getelementptr inbounds [[CLASS_GIM_TRIANGLE_CALCULATION_CACHE_9_34_69_94_119_144_179_189_264_284_332:%.*]], %class.GIM_TRIANGLE_CALCULATION_CACHE.9.34.69.94.119.144.179.189.264.284.332* [[THIS:%.*]], i64 0, i32 2, i64 0, i32 0, i64 1
75 ; CHECK-NEXT: [[ARRAYIDX36:%.*]] = getelementptr inbounds [[CLASS_GIM_TRIANGLE_CALCULATION_CACHE_9_34_69_94_119_144_179_189_264_284_332]], %class.GIM_TRIANGLE_CALCULATION_CACHE.9.34.69.94.119.144.179.189.264.284.332* [[THIS]], i64 0, i32 2, i64 0, i32 0, i64 2
76 ; CHECK-NEXT: [[TMP0:%.*]] = load float, float* [[ARRAYIDX36]], align 4
77 ; CHECK-NEXT: [[ADD587:%.*]] = fadd float undef, undef
78 ; CHECK-NEXT: [[SUB600:%.*]] = fsub float [[ADD587]], undef
79 ; CHECK-NEXT: store float [[SUB600]], float* undef, align 4
80 ; CHECK-NEXT: [[SUB613:%.*]] = fsub float [[ADD587]], [[SUB600]]
81 ; CHECK-NEXT: store float [[SUB613]], float* [[ARRAYIDX26]], align 4
82 ; CHECK-NEXT: [[ADD626:%.*]] = fadd float [[TMP0]], undef
83 ; CHECK-NEXT: [[SUB639:%.*]] = fsub float [[ADD626]], undef
84 ; CHECK-NEXT: [[SUB652:%.*]] = fsub float [[ADD626]], [[SUB639]]
85 ; CHECK-NEXT: store float [[SUB652]], float* [[ARRAYIDX36]], align 4
86 ; CHECK-NEXT: br i1 undef, label [[IF_ELSE1609:%.*]], label [[IF_THEN1595:%.*]]
88 ; CHECK-NEXT: br i1 undef, label [[RETURN:%.*]], label [[FOR_BODY_LR_PH_I_I1702:%.*]]
89 ; CHECK: for.body.lr.ph.i.i1702:
90 ; CHECK-NEXT: unreachable
92 ; CHECK-NEXT: unreachable
94 ; CHECK-NEXT: ret void
97 %arrayidx26 = getelementptr inbounds %class.GIM_TRIANGLE_CALCULATION_CACHE.9.34.69.94.119.144.179.189.264.284.332, %class.GIM_TRIANGLE_CALCULATION_CACHE.9.34.69.94.119.144.179.189.264.284.332* %this, i64 0, i32 2, i64 0, i32 0, i64 1
98 %arrayidx36 = getelementptr inbounds %class.GIM_TRIANGLE_CALCULATION_CACHE.9.34.69.94.119.144.179.189.264.284.332, %class.GIM_TRIANGLE_CALCULATION_CACHE.9.34.69.94.119.144.179.189.264.284.332* %this, i64 0, i32 2, i64 0, i32 0, i64 2
99 %0 = load float, float* %arrayidx36, align 4
100 %add587 = fadd float undef, undef
101 %sub600 = fsub float %add587, undef
102 store float %sub600, float* undef, align 4
103 %sub613 = fsub float %add587, %sub600
104 store float %sub613, float* %arrayidx26, align 4
105 %add626 = fadd float %0, undef
106 %sub639 = fsub float %add626, undef
107 %sub652 = fsub float %add626, %sub639
108 store float %sub652, float* %arrayidx36, align 4
109 br i1 undef, label %if.else1609, label %if.then1595
111 if.then1595: ; preds = %entry
112 br i1 undef, label %return, label %for.body.lr.ph.i.i1702
114 for.body.lr.ph.i.i1702: ; preds = %if.then1595
117 if.else1609: ; preds = %entry
120 return: ; preds = %if.then1595
124 define void @_Z8dBoxBox2RK9btVector3PKfS1_S1_S3_S1_RS_PfPiiP12dContactGeomiRN36btDiscreteCollisionDetectorInterface6ResultE() {
125 ; CHECK-LABEL: @_Z8dBoxBox2RK9btVector3PKfS1_S1_S3_S1_RS_PfPiiP12dContactGeomiRN36btDiscreteCollisionDetectorInterface6ResultE(
127 ; CHECK-NEXT: br i1 undef, label [[RETURN:%.*]], label [[IF_END:%.*]]
129 ; CHECK-NEXT: br i1 undef, label [[RETURN]], label [[IF_END111:%.*]]
131 ; CHECK-NEXT: br i1 undef, label [[RETURN]], label [[IF_END136:%.*]]
133 ; CHECK-NEXT: br i1 undef, label [[RETURN]], label [[IF_END162:%.*]]
135 ; CHECK-NEXT: br i1 undef, label [[RETURN]], label [[IF_END189:%.*]]
137 ; CHECK-NEXT: br i1 undef, label [[RETURN]], label [[IF_END216:%.*]]
139 ; CHECK-NEXT: br i1 undef, label [[IF_THEN218:%.*]], label [[IF_END225:%.*]]
141 ; CHECK-NEXT: br label [[IF_END225]]
143 ; CHECK-NEXT: br i1 undef, label [[RETURN]], label [[IF_END248:%.*]]
145 ; CHECK-NEXT: br i1 undef, label [[RETURN]], label [[IF_END304:%.*]]
147 ; CHECK-NEXT: br i1 undef, label [[RETURN]], label [[IF_END361:%.*]]
149 ; CHECK-NEXT: br i1 undef, label [[IF_THEN370:%.*]], label [[IF_END395:%.*]]
151 ; CHECK-NEXT: br i1 undef, label [[IF_THEN374:%.*]], label [[IF_END395]]
153 ; CHECK-NEXT: br label [[IF_END395]]
155 ; CHECK-NEXT: unreachable
157 ; CHECK-NEXT: ret void
160 %add8.i2343 = fadd float undef, undef
161 %add8.i2381 = fadd float undef, undef
162 br i1 undef, label %return, label %if.end
164 if.end: ; preds = %entry
165 br i1 undef, label %return, label %if.end111
167 if.end111: ; preds = %if.end
168 br i1 undef, label %return, label %if.end136
170 if.end136: ; preds = %if.end111
171 br i1 undef, label %return, label %if.end162
173 if.end162: ; preds = %if.end136
174 br i1 undef, label %return, label %if.end189
176 if.end189: ; preds = %if.end162
177 br i1 undef, label %return, label %if.end216
179 if.end216: ; preds = %if.end189
180 br i1 undef, label %if.then218, label %if.end225
182 if.then218: ; preds = %if.end216
185 if.end225: ; preds = %if.then218, %if.end216
186 br i1 undef, label %return, label %if.end248
188 if.end248: ; preds = %if.end225
189 br i1 undef, label %return, label %if.end304
191 if.end304: ; preds = %if.end248
192 %mul341 = fmul float undef, %add8.i2343
193 %mul344 = fmul float undef, %add8.i2381
194 %sub345 = fsub float %mul341, %mul344
195 br i1 undef, label %return, label %if.end361
197 if.end361: ; preds = %if.end304
198 %mul364 = fmul float %add8.i2381, %add8.i2381
199 br i1 undef, label %if.then370, label %if.end395
201 if.then370: ; preds = %if.end361
202 br i1 undef, label %if.then374, label %if.end395
204 if.then374: ; preds = %if.then370
205 %cmp392 = fcmp olt float %sub345, 0.000000e+00
208 if.end395: ; preds = %if.then374, %if.then370, %if.end361
211 return: ; preds = %if.end304, %if.end248, %if.end225, %if.end189, %if.end162, %if.end136, %if.end111, %if.end, %entry