This is an archive of the discontinued LLVM Phabricator instance.

[InstSimplify] Update GEP test to use opaque pointers
ClosedPublic

Authored by nikic on Jun 10 2022, 8:25 AM.

Details

Summary

With opaque pointers, we end up merging these GEPs and dropping the inrange attribute (in the last two cases). This did not happen previously, because typed pointers use less powerful GEP folding logic.

I'm a bit unsure whether this is something we need to be concerned about or not. I believe that generally our stance is that we should perform folds even if this requires losing poison-generating flags like inrange.

We can either a) accept this as-is, b) try to inhibit folding if it requires dropping inrange or c) try to fold to poison if we know that inrange is going to be violated.

Diff Detail

Event Timeline

nikic created this revision.Jun 10 2022, 8:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 10 2022, 8:25 AM
nikic requested review of this revision.Jun 10 2022, 8:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 10 2022, 8:25 AM
aeubanks accepted this revision.Jun 10 2022, 9:37 AM
aeubanks added a subscriber: aeubanks.

let's see if anybody complains :)

This revision is now accepted and ready to land.Jun 10 2022, 9:37 AM
This revision was landed with ongoing or failed builds.Jun 13 2022, 1:46 AM
This revision was automatically updated to reflect the committed changes.