This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine] Avoid iteration/mutation conflict
ClosedPublic

Authored by JosephTremoulet on Jun 14 2018, 1:12 PM.

Details

Summary

When iterating users of a multiply in processUMulZExtIdiom, the
call to setOperand in the truncation case may replace the use
being visited; make sure the iterator has been advanced before
doing that replacement.

Diff Detail

Repository
rL LLVM

Event Timeline

davide accepted this revision.Jun 14 2018, 1:57 PM

sigh at iterator invalidation issues. lgtm

This revision is now accepted and ready to land.Jun 14 2018, 1:57 PM
This revision was automatically updated to reflect the committed changes.