This is an archive of the discontinued LLVM Phabricator instance.

[CaptureTracking] Don't consider comparison of inbounds GEP with nonnull non-capturing
ClosedPublic

Authored by nikic on Jun 29 2023, 2:02 AM.

Details

Summary

This is required to bring CaptureTracking in line with the new semantics from D154051, as gep inbounds p, 0 is now always non-poison.

There are many ways in which the inbounds special case could be preserved: If the index is known non-zero, or there is an inbounds chain down to an identified object, etc. However, I have opted to drop the special case entirely, as it appears to be low value: In cases where we can determine such things (e.g. the affected test cases) we would end up removing the compare via isGEPKnownNonNull() logic anyway.

Depends on: D154051

Diff Detail

Event Timeline

nikic created this revision.Jun 29 2023, 2:02 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 29 2023, 2:02 AM
nikic requested review of this revision.Jun 29 2023, 2:02 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 29 2023, 2:02 AM
efriedma accepted this revision.Jul 3 2023, 9:07 AM

LGTM

I'm slightly concerned there's some other impacted usage we missed, but I can't think of anything in particular.

This revision is now accepted and ready to land.Jul 3 2023, 9:07 AM