[PATCH] D40184: [LICM] Fix PR35342
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 17 11:54:59 PST 2017
efriedma 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();
----------------
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.
https://reviews.llvm.org/D40184
More information about the llvm-commits
mailing list