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 %class.btVector3.23.221.463.485.507.573.595.683.727.749.815.837.991.1585.1607.1629.1651.1849.2047.2069.2091.2113 = type { [4 x float] }
9 ; Function Attrs: ssp uwtable
10 define void @_ZN11HullLibrary15CleanupVerticesEjPK9btVector3jRjPS0_fRS0_(%class.btVector3.23.221.463.485.507.573.595.683.727.749.815.837.991.1585.1607.1629.1651.1849.2047.2069.2091.2113* %vertices) #0 align 2 {
11 ; CHECK-LABEL: @_ZN11HullLibrary15CleanupVerticesEjPK9btVector3jRjPS0_fRS0_(
13 ; CHECK-NEXT: br i1 undef, label [[RETURN:%.*]], label [[IF_END:%.*]]
15 ; CHECK-NEXT: br label [[FOR_BODY:%.*]]
17 ; CHECK-NEXT: br i1 undef, label [[IF_THEN17_1:%.*]], label [[IF_END22_1:%.*]]
19 ; CHECK-NEXT: br label [[FOR_BODY144:%.*]]
21 ; CHECK-NEXT: br i1 undef, label [[FOR_END227:%.*]], label [[FOR_BODY144]]
23 ; CHECK-NEXT: br i1 undef, label [[FOR_END271:%.*]], label [[FOR_BODY233:%.*]]
25 ; CHECK-NEXT: br i1 undef, label [[FOR_BODY233]], label [[FOR_END271]]
27 ; CHECK-NEXT: [[TMP0:%.*]] = phi float [ 0x47EFFFFFE0000000, [[FOR_END227]] ], [ undef, [[FOR_BODY233]] ]
28 ; CHECK-NEXT: [[TMP1:%.*]] = phi float [ 0x47EFFFFFE0000000, [[FOR_END227]] ], [ undef, [[FOR_BODY233]] ]
29 ; CHECK-NEXT: [[SUB275:%.*]] = fsub float undef, [[TMP1]]
30 ; CHECK-NEXT: [[SUB279:%.*]] = fsub float undef, [[TMP0]]
31 ; CHECK-NEXT: br i1 undef, label [[IF_THEN291:%.*]], label [[RETURN]]
33 ; CHECK-NEXT: [[MUL292:%.*]] = fmul float [[SUB275]], 5.000000e-01
34 ; CHECK-NEXT: [[ADD294:%.*]] = fadd float [[TMP1]], [[MUL292]]
35 ; CHECK-NEXT: [[MUL295:%.*]] = fmul float [[SUB279]], 5.000000e-01
36 ; CHECK-NEXT: [[ADD297:%.*]] = fadd float [[TMP0]], [[MUL295]]
37 ; CHECK-NEXT: br i1 undef, label [[IF_END332:%.*]], label [[IF_ELSE319:%.*]]
39 ; CHECK-NEXT: br i1 undef, label [[IF_THEN325:%.*]], label [[IF_END327:%.*]]
41 ; CHECK-NEXT: br label [[IF_END327]]
43 ; CHECK-NEXT: br i1 undef, label [[IF_THEN329:%.*]], label [[IF_END332]]
45 ; CHECK-NEXT: br label [[IF_END332]]
47 ; CHECK-NEXT: [[DX272_1:%.*]] = phi float [ [[SUB275]], [[IF_THEN329]] ], [ [[SUB275]], [[IF_END327]] ], [ 0x3F847AE140000000, [[IF_THEN291]] ]
48 ; CHECK-NEXT: [[DY276_1:%.*]] = phi float [ undef, [[IF_THEN329]] ], [ undef, [[IF_END327]] ], [ 0x3F847AE140000000, [[IF_THEN291]] ]
49 ; CHECK-NEXT: [[SUB334:%.*]] = fsub float [[ADD294]], [[DX272_1]]
50 ; CHECK-NEXT: [[SUB338:%.*]] = fsub float [[ADD297]], [[DY276_1]]
51 ; CHECK-NEXT: [[ARRAYIDX_I_I606:%.*]] = getelementptr inbounds [[CLASS_BTVECTOR3_23_221_463_485_507_573_595_683_727_749_815_837_991_1585_1607_1629_1651_1849_2047_2069_2091_2113:%.*]], %class.btVector3.23.221.463.485.507.573.595.683.727.749.815.837.991.1585.1607.1629.1651.1849.2047.2069.2091.2113* [[VERTICES:%.*]], i64 0, i32 0, i64 0
52 ; CHECK-NEXT: store float [[SUB334]], float* [[ARRAYIDX_I_I606]], align 4
53 ; CHECK-NEXT: [[ARRAYIDX3_I607:%.*]] = getelementptr inbounds [[CLASS_BTVECTOR3_23_221_463_485_507_573_595_683_727_749_815_837_991_1585_1607_1629_1651_1849_2047_2069_2091_2113]], %class.btVector3.23.221.463.485.507.573.595.683.727.749.815.837.991.1585.1607.1629.1651.1849.2047.2069.2091.2113* [[VERTICES]], i64 0, i32 0, i64 1
54 ; CHECK-NEXT: store float [[SUB338]], float* [[ARRAYIDX3_I607]], align 4
55 ; CHECK-NEXT: br label [[RETURN]]
57 ; CHECK-NEXT: ret void
59 ; CHECK-NEXT: br label [[IF_END22_1]]
61 ; CHECK-NEXT: br i1 undef, label [[IF_THEN17_2:%.*]], label [[IF_END22_2:%.*]]
63 ; CHECK-NEXT: br label [[IF_END22_2]]
65 ; CHECK-NEXT: br i1 undef, label [[FOR_END36:%.*]], label [[FOR_BODY]]
68 br i1 undef, label %return, label %if.end
70 if.end: ; preds = %entry
73 for.body: ; preds = %if.end22.2, %if.end
74 br i1 undef, label %if.then17.1, label %if.end22.1
76 for.end36: ; preds = %if.end22.2
79 for.body144: ; preds = %for.body144, %for.end36
80 br i1 undef, label %for.end227, label %for.body144
82 for.end227: ; preds = %for.body144
83 br i1 undef, label %for.end271, label %for.body233
85 for.body233: ; preds = %for.body233, %for.end227
86 br i1 undef, label %for.body233, label %for.end271
88 for.end271: ; preds = %for.body233, %for.end227
89 %0 = phi float [ 0x47EFFFFFE0000000, %for.end227 ], [ undef, %for.body233 ]
90 %1 = phi float [ 0x47EFFFFFE0000000, %for.end227 ], [ undef, %for.body233 ]
91 %sub275 = fsub float undef, %1
92 %sub279 = fsub float undef, %0
93 br i1 undef, label %if.then291, label %return
95 if.then291: ; preds = %for.end271
96 %mul292 = fmul float %sub275, 5.000000e-01
97 %add294 = fadd float %1, %mul292
98 %mul295 = fmul float %sub279, 5.000000e-01
99 %add297 = fadd float %0, %mul295
100 br i1 undef, label %if.end332, label %if.else319
102 if.else319: ; preds = %if.then291
103 br i1 undef, label %if.then325, label %if.end327
105 if.then325: ; preds = %if.else319
108 if.end327: ; preds = %if.then325, %if.else319
109 br i1 undef, label %if.then329, label %if.end332
111 if.then329: ; preds = %if.end327
114 if.end332: ; preds = %if.then329, %if.end327, %if.then291
115 %dx272.1 = phi float [ %sub275, %if.then329 ], [ %sub275, %if.end327 ], [ 0x3F847AE140000000, %if.then291 ]
116 %dy276.1 = phi float [ undef, %if.then329 ], [ undef, %if.end327 ], [ 0x3F847AE140000000, %if.then291 ]
117 %sub334 = fsub float %add294, %dx272.1
118 %sub338 = fsub float %add297, %dy276.1
119 %arrayidx.i.i606 = getelementptr inbounds %class.btVector3.23.221.463.485.507.573.595.683.727.749.815.837.991.1585.1607.1629.1651.1849.2047.2069.2091.2113, %class.btVector3.23.221.463.485.507.573.595.683.727.749.815.837.991.1585.1607.1629.1651.1849.2047.2069.2091.2113* %vertices, i64 0, i32 0, i64 0
120 store float %sub334, float* %arrayidx.i.i606, align 4
121 %arrayidx3.i607 = getelementptr inbounds %class.btVector3.23.221.463.485.507.573.595.683.727.749.815.837.991.1585.1607.1629.1651.1849.2047.2069.2091.2113, %class.btVector3.23.221.463.485.507.573.595.683.727.749.815.837.991.1585.1607.1629.1651.1849.2047.2069.2091.2113* %vertices, i64 0, i32 0, i64 1
122 store float %sub338, float* %arrayidx3.i607, align 4
125 return: ; preds = %if.end332, %for.end271, %entry
128 if.then17.1: ; preds = %for.body
131 if.end22.1: ; preds = %if.then17.1, %for.body
132 br i1 undef, label %if.then17.2, label %if.end22.2
134 if.then17.2: ; preds = %if.end22.1
137 if.end22.2: ; preds = %if.then17.2, %if.end22.1
138 br i1 undef, label %for.end36, label %for.body
141 attributes #0 = { ssp uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-frame-pointer-elim-non-leaf"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="false" "use-soft-float"="false" }