diff options
| author | Julian Nagele <j.nagele@apple.com> | 2025-10-20 17:15:48 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-20 17:15:48 +0100 |
| commit | 3d94f837f7270d50fcb7aed64fe31dc39bd77fb0 (patch) | |
| tree | fb9e5ee1f66167b3339d484c6d0ddb10a528c881 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | |
| parent | 5a112dedff3be9485940dfe5b14b574b08a0d9a1 (diff) | |
| download | llvm-3d94f837f7270d50fcb7aed64fe31dc39bd77fb0.zip llvm-3d94f837f7270d50fcb7aed64fe31dc39bd77fb0.tar.gz llvm-3d94f837f7270d50fcb7aed64fe31dc39bd77fb0.tar.bz2 | |
[X86] Update test to not iterate past array boundaries. (#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
https://github.com/llvm/llvm-project/pull/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.
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
0 files changed, 0 insertions, 0 deletions
