This is an archive of the discontinued LLVM Phabricator instance.

[InstSimplify] Restrict a GEP transform to avoid provenance changes
ClosedPublic

Authored by nagisa on Mar 14 2021, 2:09 PM.

Details

Summary

This is a follow-up to D98588, and fixes the inline FIXME about a GEP-related simplification not
preserving the provenance.

https://alive2.llvm.org/ce/z/qbQoAY

Additional tests were added in rGf125f28afdb5: [InstSimplify] Add additional GEP transform tests & regenerate

Depends on D98672

Diff Detail

Event Timeline

nagisa created this revision.Mar 14 2021, 2:09 PM
nagisa edited the summary of this revision. (Show Details)Mar 14 2021, 2:21 PM
nagisa edited the summary of this revision. (Show Details)
nagisa updated this revision to Diff 330533.Mar 14 2021, 2:25 PM

regenerate test cases

nagisa published this revision for review.Mar 14 2021, 2:25 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 14 2021, 2:25 PM
nagisa updated this revision to Diff 330535.Mar 14 2021, 2:28 PM

revert the comments

Can you please split this into two patches: NFC refactoring, and the actual change?

nagisa updated this revision to Diff 330849.Mar 15 2021, 5:05 PM

rebase onto D98672

I split the NFCs out into a different diff. I also revised the approach slightly in an attempt to reduce code duplication. LMK if that (e.g. P's capture by reference) seems too magical, and I'm happy to revert to duplicating the checks.

This revision is now accepted and ready to land.Mar 16 2021, 12:35 AM
This revision was landed with ongoing or failed builds.Mar 16 2021, 9:53 AM
This revision was automatically updated to reflect the committed changes.