[PATCH] D71164: [InstCombine] Fix infinite loop due to bitcast <-> phi transforms
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 9 05:26:53 PST 2019
spatel accepted this revision.
spatel added a comment.
This revision is now accepted and ready to land.
I don't know if this is enough to solve the bug completely, but since it's a 1-liner and works on this case, LGTM.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp:2321
+ // Make sure the old phis are cleaned up.
+ Worklist.Add(OldPN);
}
----------------
Can we assert that OldPN has no users at this point?
================
Comment at: llvm/test/Transforms/InstCombine/pr44245.ll:4
+
+define void @test() {
+; CHECK-LABEL: @test(
----------------
Add a comment line here that this used to infinite loop.
I know that reducers like to put 'undef' into instructions, but we tend to make those tests meaningless as we improve/change our understanding of undef. So I'd change this test to take an 'i1' argument and replace all of the 'br i1 undef' to use that argument instead.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71164/new/
https://reviews.llvm.org/D71164
More information about the llvm-commits
mailing list