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
Event Timeline
| lib/Transforms/Scalar/LICM.cpp | ||
|---|---|---|
| 909 | 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 | It seems to be a better fix. Thanks Eli. | |
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.