Skip to content

Commit c2ee61b

Browse files
author
Greg Roth
committed
Clean up test mistakes that failed on other platforms
I don't know why the order of the extractelements varies, but it does even for the same build depending on whether a debugger is attached. It would seem to be an unordered container object, but there is no such. It just generates them as it goes and never touches them again which would suggest the opposite order in a few cases. They are constant expressions, that's probably why they move around, but I can't find where to make them consistent.
1 parent d480caa commit c2ee61b

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

tools/clang/test/CodeGenDXIL/passes/longvec-operators-vec1-scalarizer.ll

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ bb:
114114
; CHECK: [[adr0:%.*]] = getelementptr inbounds [11 x <1 x float>], [11 x <1 x float>]* %things, i32 0, i32 0
115115
; CHECK: [[ld0:%.*]] = load <1 x float>, <1 x float>* [[adr0]], align 4
116116
; CHECK: [[zero:%.*]] = extractelement <1 x float> <float -0.000000e+00>, i32 0
117-
; CHECK: [[val0:%.*]] = extractelement <1 x float> [[ld0:%.*]], i32 0
117+
; CHECK: [[val0:%.*]] = extractelement <1 x float> [[ld0]], i32 0
118118
; CHECK: [[sub0:%.*]] = fsub fast float [[zero]], [[val0]]
119119
; CHECK: [[res0:%.*]] = insertelement <1 x float> undef, float [[sub0]], i32 0
120120
%tmp = getelementptr inbounds [11 x <1 x float>], [11 x <1 x float>]* %things, i32 0, i32 0
@@ -206,8 +206,8 @@ bb:
206206

207207
; CHECK: [[adr7:%.*]] = getelementptr inbounds [11 x <1 x float>], [11 x <1 x float>]* %things, i32 0, i32 7
208208
; CHECK: [[ld7:%.*]] = load <1 x float>, <1 x float>* [[adr7]], align 4
209-
; CHECK: [[val7:%.*]] = extractelement <1 x float> [[ld7]], i32 0
210-
; CHECK: [[pos1:%.*]] = extractelement <1 x float> <float 1.000000e+00>, i32 0
209+
; CHECK-DAG: [[val7:%.*]] = extractelement <1 x float> [[ld7]], i32 0
210+
; CHECK-DAG: [[pos1:%.*]] = extractelement <1 x float> <float 1.000000e+00>, i32 0
211211
; CHECK: [[add6:%.*]] = fadd fast float [[val7]], [[pos1]]
212212
; CHECK: [[res6:%.*]] = insertelement <1 x float> undef, float [[add6]], i32 0
213213
%tmp37 = getelementptr inbounds [11 x <1 x float>], [11 x <1 x float>]* %things, i32 0, i32 7
@@ -217,8 +217,8 @@ bb:
217217

218218
; CHECK: [[adr8:%.*]] = getelementptr inbounds [11 x <1 x float>], [11 x <1 x float>]* %things, i32 0, i32 8
219219
; CHECK: [[ld8:%.*]] = load <1 x float>, <1 x float>* [[adr8]], align 4
220-
; CHECK: [[val8:%.*]] = extractelement <1 x float> [[ld8]], i32 0
221-
; CHECK: [[neg1:%.*]] = extractelement <1 x float> <float -1.000000e+00>, i32 0
220+
; CHECK-DAG: [[val8:%.*]] = extractelement <1 x float> [[ld8]], i32 0
221+
; CHECK-DAG: [[neg1:%.*]] = extractelement <1 x float> <float -1.000000e+00>, i32 0
222222
; CHECK: [[add7:%.*]] = fadd fast float [[val8]], [[neg1]]
223223
; CHECK: [[res7:%.*]] = insertelement <1 x float> undef, float [[add7]], i32 0
224224
%tmp40 = extractelement <1 x float> %tmp38, i64 0
@@ -229,8 +229,8 @@ bb:
229229

230230
; CHECK: [[adr9:%.*]] = getelementptr inbounds [11 x <1 x float>], [11 x <1 x float>]* %things, i32 0, i32 9
231231
; CHECK: [[ld9:%.*]] = load <1 x float>, <1 x float>* [[adr9]], align 4
232-
; CHECK: [[val9:%.*]] = extractelement <1 x float> [[ld9]], i32 0
233-
; CHECK: [[pos1:%.*]] = extractelement <1 x float> <float 1.000000e+00>, i32 0
232+
; CHECK-DAG: [[val9:%.*]] = extractelement <1 x float> [[ld9]], i32 0
233+
; CHECK-DAG: [[pos1:%.*]] = extractelement <1 x float> <float 1.000000e+00>, i32 0
234234
; CHECK: [[add8:%.*]] = fadd fast float [[val9]], [[pos1]]
235235
; CHECK: [[res8:%.*]] = insertelement <1 x float> undef, float [[add8]], i32 0
236236
%tmp44 = extractelement <1 x float> %tmp42, i64 0
@@ -241,8 +241,8 @@ bb:
241241

242242
; CHECK: [[adr10:%.*]] = getelementptr inbounds [11 x <1 x float>], [11 x <1 x float>]* %things, i32 0, i32 10
243243
; CHECK: [[ld10:%.*]] = load <1 x float>, <1 x float>* [[adr10]], align 4
244-
; CHECK: [[val10:%.*]] = extractelement <1 x float> [[ld10]], i32 0
245-
; CHECK: [[neg1:%.*]] = extractelement <1 x float> <float -1.000000e+00>, i32 0
244+
; CHECK-DAG: [[val10:%.*]] = extractelement <1 x float> [[ld10]], i32 0
245+
; CHECK-DAG: [[neg1:%.*]] = extractelement <1 x float> <float -1.000000e+00>, i32 0
246246
; CHECK: [[add9:%.*]] = fadd fast float [[val10]], [[neg1]]
247247
; CHECK: [[res9:%.*]] = insertelement <1 x float> undef, float [[add9]], i32 0
248248
%tmp48 = extractelement <1 x float> %tmp47, i64 0

tools/clang/test/CodeGenDXIL/passes/longvec-operators.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ export vector<bool,NUM> logic(vector<bool,NUM> truth[10], vector<TYPE, NUM> cons
175175
// CHECK: [[adr0:%.*]] = getelementptr inbounds [10 x <[[NUM]] x i32>], [10 x <[[NUM]] x i32>]* %truth, i32 0, i32 0
176176
// CHECK: [[vec0:%.*]] = load <[[NUM]] x i32>, <[[NUM]] x i32>* [[adr0]]
177177
// CHECK: [[bvec0:%.*]] = icmp ne <[[NUM]] x i32> [[vec0]], zeroinitializer
178-
// CHECK: [[bres0:%.*]] = icmp eq <[[NUM]] x i1> %4, zeroinitializer
178+
// CHECK: [[bres0:%.*]] = icmp eq <[[NUM]] x i1> [[bvec0]], zeroinitializer
179179
// CHECK: [[adr0:%.*]] = getelementptr inbounds [10 x <[[NUM]] x i32>], [10 x <[[NUM]] x i32>]* %res, i32 0, i32 0
180180
// CHECK: [[res0:%.*]] = zext <[[NUM]] x i1> [[bres0]] to <[[NUM]] x i32>
181181
// CHECK: store <[[NUM]] x i32> [[res0]], <[[NUM]] x i32>* [[adr0]]

0 commit comments

Comments
 (0)