[PATCH] D91153: [IndVarSimplify] Fix Modified status when handling dead PHI nodes
Ta-Wei Tu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 18 03:01:59 PST 2020
TaWeiTu added a comment.
IIRC the bug is not MIPS-specific, the following test has the same assertion failure with `opt -S -indvars` on X86 machines:
@ptr = external global i64
define dso_local void @hoge() local_unnamed_addr {
entry: ; preds = %entry
%n = sdiv exact i64 undef, 40
br label %header
header: ; preds = %latch, %entry
%idx = phi i64 [ %idx.next, %latch ], [ undef, %entry ]
%cond = icmp sgt i64 %n, %idx
br i1 %cond, label %end, label %inner
inner: ; preds = %inner, %header
%i = phi i64 [ %i.next, %inner ], [ 0, %header ]
%j = phi i64 [ %j.next, %inner ], [ %n, %header ]
%i.next = add nsw i64 %i, 1
%j.next = add nsw i64 %j, 1
store i64 undef, i64* @ptr
%cond1 = icmp slt i64 %j, %idx
br i1 %cond1, label %inner, label %inner_exit
inner_exit: ; preds = %inner
%indvar = phi i64 [ %i.next, %inner ]
%indvar_use = add i64 %indvar, 1
br label %latch
latch: ; preds = %inner_exit
%idx.next = add nsw i64 %idx, -1
br label %header
end: ; preds = %header
ret void
}
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91153/new/
https://reviews.llvm.org/D91153
More information about the llvm-commits
mailing list