Commit 3d94f83
authored
[X86] Update test to not iterate past array boundaries. (llvm#163991)
This test has loop iterating past (`61`) the array boundaries (`58`). So
far this didn't seem to matter, but recently with this change
llvm#155253 the constraint
elimination in swift has been able to figure this out and is
transforming the loop into an infinite one like this
```
*** IR Dump After ConstraintEliminationPass on test_known_trip_count ***
define void @test_known_trip_count() local_unnamed_addr {
entry:
br label %for.body
for.body: ; preds = %entry, %for.body
%indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
%arrayidx = getelementptr inbounds nuw double, ptr @b, i64 %indvars.iv
%0 = load double, ptr %arrayidx, align 8
%arrayidx2 = getelementptr inbounds nuw double, ptr @c, i64 %indvars.iv
%1 = load double, ptr %arrayidx2, align 8
%add = fadd double %0, %1
%arrayidx4 = getelementptr inbounds nuw double, ptr @A, i64 %indvars.iv
store double %add, ptr %arrayidx4, align 8
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
br i1 false, label %exit, label %for.body
exit: ; preds = %for.body
ret void
}%
```
causing the test to fail. This is trying to address the root cause here.1 parent 5a112de commit 3d94f83
File tree
1 file changed
+8
-12
lines changed- llvm/test/Transforms/PhaseOrdering/X86
1 file changed
+8
-12
lines changedLines changed: 8 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
| 127 | + | |
| 128 | + | |
137 | 129 | | |
138 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
139 | 135 | | |
140 | 136 | | |
141 | 137 | | |
142 | 138 | | |
143 | 139 | | |
144 | 140 | | |
145 | 141 | | |
146 | | - | |
| 142 | + | |
147 | 143 | | |
148 | 144 | | |
149 | 145 | | |
| |||
0 commit comments