This change fix PR35342 by rebuilding user_iterator which is invalidated after replacing users with undef in unreachable blocks.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Transforms/Scalar/LICM.cpp | ||
---|---|---|
909 ↗ | (On Diff #123372) | 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. |
lib/Transforms/Scalar/LICM.cpp | ||
---|---|---|
909 ↗ | (On Diff #123372) | It seems to be a better fix. Thanks Eli. |