[PATCH] D71164: [InstCombine] Fix infinite loop due to bitcast <-> phi transforms
Connor Abbott via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 9 07:38:27 PST 2019
cwabbott added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp:2321
+ // Make sure the old phis are cleaned up.
+ Worklist.Add(OldPN);
}
----------------
spatel wrote:
> Can we assert that OldPN has no users at this point?
This isn't true until D71209 lands, and therefore the problem could still happen because `OldPN` won't actually get cleaned up. Even afterwards, there could be a PHI web hanging around. In my patch I assumed that some other dead-code pass would come along and delete it eventually, but I don't know if InstCombine is smart enough to do that before folding the load. Maybe you can just remove all the old phi nodes manually once my patch lands?
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