@@ -129,8 +129,8 @@ define float @reduction_sum_float_only_reassoc(i32 %n, float* %array) {
129
129
; CHECK-NEXT: br label [[VECTOR_BODY:%.*]]
130
130
; CHECK: vector.body:
131
131
; CHECK-NEXT: [[INDEX:%.*]] = phi i32 [ 0, [[VECTOR_PH]] ], [ [[INDEX_NEXT:%.*]], [[VECTOR_BODY]] ]
132
- ; CHECK-NEXT: [[VEC_PHI:%.*]] = phi <4 x float> [ zeroinitializer , [[VECTOR_PH]] ], [ [[TMP8:%.*]], [[VECTOR_BODY]] ]
133
- ; CHECK-NEXT: [[VEC_PHI1:%.*]] = phi <4 x float> [ zeroinitializer , [[VECTOR_PH]] ], [ [[TMP9:%.*]], [[VECTOR_BODY]] ]
132
+ ; CHECK-NEXT: [[VEC_PHI:%.*]] = phi <4 x float> [ <float -0.000000e+00, float -0.000000e+00, float -0.000000e+00, float -0.000000e+00> , [[VECTOR_PH]] ], [ [[TMP8:%.*]], [[VECTOR_BODY]] ]
133
+ ; CHECK-NEXT: [[VEC_PHI1:%.*]] = phi <4 x float> [ <float -0.000000e+00, float -0.000000e+00, float -0.000000e+00, float -0.000000e+00> , [[VECTOR_PH]] ], [ [[TMP9:%.*]], [[VECTOR_BODY]] ]
134
134
; CHECK-NEXT: [[TMP0:%.*]] = add i32 [[INDEX]], 0
135
135
; CHECK-NEXT: [[TMP1:%.*]] = add i32 [[INDEX]], 4
136
136
; CHECK-NEXT: [[TMP2:%.*]] = getelementptr float, float* [[ARRAY:%.*]], i32 [[TMP0]]
@@ -153,7 +153,7 @@ define float @reduction_sum_float_only_reassoc(i32 %n, float* %array) {
153
153
; CHECK-NEXT: br i1 [[CMP_N]], label [[LOOP_EXIT_LOOPEXIT:%.*]], label [[SCALAR_PH]]
154
154
; CHECK: scalar.ph:
155
155
; CHECK-NEXT: [[BC_RESUME_VAL:%.*]] = phi i32 [ 4096, [[MIDDLE_BLOCK]] ], [ 0, [[LOOP_PREHEADER]] ]
156
- ; CHECK-NEXT: [[BC_MERGE_RDX:%.*]] = phi float [ 0.000000e+00, [[LOOP_PREHEADER]] ], [ [[TMP11]], [[MIDDLE_BLOCK]] ]
156
+ ; CHECK-NEXT: [[BC_MERGE_RDX:%.*]] = phi float [ - 0.000000e+00, [[LOOP_PREHEADER]] ], [ [[TMP11]], [[MIDDLE_BLOCK]] ]
157
157
; CHECK-NEXT: br label [[LOOP:%.*]]
158
158
; CHECK: loop:
159
159
; CHECK-NEXT: [[IDX:%.*]] = phi i32 [ [[IDX_INC:%.*]], [[LOOP]] ], [ [[BC_RESUME_VAL]], [[SCALAR_PH]] ]
@@ -168,7 +168,7 @@ define float @reduction_sum_float_only_reassoc(i32 %n, float* %array) {
168
168
; CHECK-NEXT: [[SUM_INC_LCSSA:%.*]] = phi float [ [[SUM_INC]], [[LOOP]] ], [ [[TMP11]], [[MIDDLE_BLOCK]] ]
169
169
; CHECK-NEXT: br label [[LOOP_EXIT]]
170
170
; CHECK: loop.exit:
171
- ; CHECK-NEXT: [[SUM_LCSSA:%.*]] = phi float [ 0.000000e+00, [[ENTRY:%.*]] ], [ [[SUM_INC_LCSSA]], [[LOOP_EXIT_LOOPEXIT]] ]
171
+ ; CHECK-NEXT: [[SUM_LCSSA:%.*]] = phi float [ - 0.000000e+00, [[ENTRY:%.*]] ], [ [[SUM_INC_LCSSA]], [[LOOP_EXIT_LOOPEXIT]] ]
172
172
; CHECK-NEXT: ret float [[SUM_LCSSA]]
173
173
;
174
174
entry:
@@ -177,7 +177,7 @@ entry:
177
177
178
178
loop:
179
179
%idx = phi i32 [ 0 , %entry ], [ %idx.inc , %loop ]
180
- %sum = phi float [ 0 .000000e+00 , %entry ], [ %sum.inc , %loop ]
180
+ %sum = phi float [ - 0 .000000e+00 , %entry ], [ %sum.inc , %loop ]
181
181
%address = getelementptr float , float * %array , i32 %idx
182
182
%value = load float , float * %address
183
183
%sum.inc = fadd reassoc float %sum , %value
@@ -186,7 +186,7 @@ loop:
186
186
br i1 %be.cond , label %loop , label %loop.exit
187
187
188
188
loop.exit:
189
- %sum.lcssa = phi float [ %sum.inc , %loop ], [ 0 .000000e+00 , %entry ]
189
+ %sum.lcssa = phi float [ %sum.inc , %loop ], [ - 0 .000000e+00 , %entry ]
190
190
ret float %sum.lcssa
191
191
}
192
192
@@ -201,8 +201,8 @@ define float @reduction_sum_float_only_reassoc_and_contract(i32 %n, float* %arra
201
201
; CHECK-NEXT: br label [[VECTOR_BODY:%.*]]
202
202
; CHECK: vector.body:
203
203
; CHECK-NEXT: [[INDEX:%.*]] = phi i32 [ 0, [[VECTOR_PH]] ], [ [[INDEX_NEXT:%.*]], [[VECTOR_BODY]] ]
204
- ; CHECK-NEXT: [[VEC_PHI:%.*]] = phi <4 x float> [ zeroinitializer , [[VECTOR_PH]] ], [ [[TMP8:%.*]], [[VECTOR_BODY]] ]
205
- ; CHECK-NEXT: [[VEC_PHI1:%.*]] = phi <4 x float> [ zeroinitializer , [[VECTOR_PH]] ], [ [[TMP9:%.*]], [[VECTOR_BODY]] ]
204
+ ; CHECK-NEXT: [[VEC_PHI:%.*]] = phi <4 x float> [ <float -0.000000e+00, float -0.000000e+00, float -0.000000e+00, float -0.000000e+00> , [[VECTOR_PH]] ], [ [[TMP8:%.*]], [[VECTOR_BODY]] ]
205
+ ; CHECK-NEXT: [[VEC_PHI1:%.*]] = phi <4 x float> [ <float -0.000000e+00, float -0.000000e+00, float -0.000000e+00, float -0.000000e+00> , [[VECTOR_PH]] ], [ [[TMP9:%.*]], [[VECTOR_BODY]] ]
206
206
; CHECK-NEXT: [[TMP0:%.*]] = add i32 [[INDEX]], 0
207
207
; CHECK-NEXT: [[TMP1:%.*]] = add i32 [[INDEX]], 4
208
208
; CHECK-NEXT: [[TMP2:%.*]] = getelementptr float, float* [[ARRAY:%.*]], i32 [[TMP0]]
@@ -225,7 +225,7 @@ define float @reduction_sum_float_only_reassoc_and_contract(i32 %n, float* %arra
225
225
; CHECK-NEXT: br i1 [[CMP_N]], label [[LOOP_EXIT_LOOPEXIT:%.*]], label [[SCALAR_PH]]
226
226
; CHECK: scalar.ph:
227
227
; CHECK-NEXT: [[BC_RESUME_VAL:%.*]] = phi i32 [ 4096, [[MIDDLE_BLOCK]] ], [ 0, [[LOOP_PREHEADER]] ]
228
- ; CHECK-NEXT: [[BC_MERGE_RDX:%.*]] = phi float [ 0.000000e+00, [[LOOP_PREHEADER]] ], [ [[TMP11]], [[MIDDLE_BLOCK]] ]
228
+ ; CHECK-NEXT: [[BC_MERGE_RDX:%.*]] = phi float [ - 0.000000e+00, [[LOOP_PREHEADER]] ], [ [[TMP11]], [[MIDDLE_BLOCK]] ]
229
229
; CHECK-NEXT: br label [[LOOP:%.*]]
230
230
; CHECK: loop:
231
231
; CHECK-NEXT: [[IDX:%.*]] = phi i32 [ [[IDX_INC:%.*]], [[LOOP]] ], [ [[BC_RESUME_VAL]], [[SCALAR_PH]] ]
@@ -240,7 +240,7 @@ define float @reduction_sum_float_only_reassoc_and_contract(i32 %n, float* %arra
240
240
; CHECK-NEXT: [[SUM_INC_LCSSA:%.*]] = phi float [ [[SUM_INC]], [[LOOP]] ], [ [[TMP11]], [[MIDDLE_BLOCK]] ]
241
241
; CHECK-NEXT: br label [[LOOP_EXIT]]
242
242
; CHECK: loop.exit:
243
- ; CHECK-NEXT: [[SUM_LCSSA:%.*]] = phi float [ 0.000000e+00, [[ENTRY:%.*]] ], [ [[SUM_INC_LCSSA]], [[LOOP_EXIT_LOOPEXIT]] ]
243
+ ; CHECK-NEXT: [[SUM_LCSSA:%.*]] = phi float [ - 0.000000e+00, [[ENTRY:%.*]] ], [ [[SUM_INC_LCSSA]], [[LOOP_EXIT_LOOPEXIT]] ]
244
244
; CHECK-NEXT: ret float [[SUM_LCSSA]]
245
245
;
246
246
entry:
@@ -249,7 +249,7 @@ entry:
249
249
250
250
loop:
251
251
%idx = phi i32 [ 0 , %entry ], [ %idx.inc , %loop ]
252
- %sum = phi float [ 0 .000000e+00 , %entry ], [ %sum.inc , %loop ]
252
+ %sum = phi float [ - 0 .000000e+00 , %entry ], [ %sum.inc , %loop ]
253
253
%address = getelementptr float , float * %array , i32 %idx
254
254
%value = load float , float * %address
255
255
%sum.inc = fadd reassoc contract float %sum , %value
@@ -258,7 +258,7 @@ loop:
258
258
br i1 %be.cond , label %loop , label %loop.exit
259
259
260
260
loop.exit:
261
- %sum.lcssa = phi float [ %sum.inc , %loop ], [ 0 .000000e+00 , %entry ]
261
+ %sum.lcssa = phi float [ %sum.inc , %loop ], [ - 0 .000000e+00 , %entry ]
262
262
ret float %sum.lcssa
263
263
}
264
264
0 commit comments