This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine] Fix incorrect Modified status
ClosedPublic

Authored by dstenb on Aug 12 2020, 8:13 AM.

Details

Summary

When removing instructions from unreachable blocks, and only debug info
intrinsics were removed, InstCombine could incorrectly return a false
Modified status.

This is fixed by making removeAllNonTerminatorAndEHPadInstructions()
also return how many debug info intrinsics that were removed, and take
that into account.

This was caught using the check introduced by D80916.

Diff Detail

Event Timeline

dstenb created this revision.Aug 12 2020, 8:13 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 12 2020, 8:13 AM
dstenb requested review of this revision.Aug 12 2020, 8:13 AM
dstenb edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Aug 12 2020, 1:16 PM
This revision was automatically updated to reflect the committed changes.