[PATCH] D145510: [SCEV] Fix finite loop non-strict predicate simplification (PR60944)
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 11 15:04:53 PDT 2023
efriedma added a comment.
I'm seeing a regression for the following loop:
define void @foo1(ptr %A, i32 %m, i32 %n) mustprogress {
entry:
br label %for.body
for.body: ; preds = %entry, %for.body
%i.06 = phi i32 [ 0, %entry ], [ %inc, %for.body ]
%inc = add i32 %i.06, 1
%cmp.not = icmp ugt i32 %inc, %m
br i1 %cmp.not, label %for.end, label %for.body
for.end: ; preds = %for.body
ret void
}
We used to produce a backedge-taken count of `%m`, but now we produce `(-1 + (1 umax (1 + %m)))`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145510/new/
https://reviews.llvm.org/D145510
More information about the llvm-commits
mailing list