[PATCH] D40184: [LICM] Fix PR35342
Jun Bum Lim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 17 12:29:23 PST 2017
junbuml marked an inline comment as done.
junbuml added inline comments.
================
Comment at: lib/Transforms/Scalar/LICM.cpp:909
if (!DT->isReachableFromEntry(User->getParent())) {
User->replaceUsesOfWith(&I, UndefValue::get(I.getType()));
+ UI = I.user_begin();
----------------
efriedma wrote:
> Could we solve the problem by instead changing this call to replaceUsesOfWith with "U = UndefValue::get(I.getType());"? We shouldn't be resetting the iterators like this if we can avoid it.
It seems to be a better fix.
Thanks Eli.
https://reviews.llvm.org/D40184
More information about the llvm-commits
mailing list