This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine] Fix user iterator invalidation in bitcast of phi transform
ClosedPublic

Authored by nikic on Jan 13 2020, 2:57 PM.

Details

Summary

This fixes the issue encountered in D71164. Instead of using a range-based for, manually iterate over the users and advance the iterator beforehand, so we do not skip any users due to iterator invalidation.

Diff Detail

Event Timeline

nikic created this revision.Jan 13 2020, 2:57 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 13 2020, 2:57 PM
lebedev.ri accepted this revision.Jan 13 2020, 3:04 PM

This seems good to me.

This revision is now accepted and ready to land.Jan 13 2020, 3:04 PM
This revision was automatically updated to reflect the committed changes.