This is an archive of the discontinued LLVM Phabricator instance.

[InstSimplify] Fold inbounds GEP to poison if base is undef.
ClosedPublic

Authored by fhahn on Jan 11 2022, 5:45 AM.

Details

Summary

D92270 updated constant expression folding to fold inbounds GEP to
poison if the base is undef. Apply the same logic to SimplifyGEPInst.

The justification is that we can choose an out-of-bounds pointer as base
pointer.

Diff Detail

Event Timeline

fhahn created this revision.Jan 11 2022, 5:45 AM
fhahn requested review of this revision.Jan 11 2022, 5:45 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 11 2022, 5:45 AM
This revision is now accepted and ready to land.Jan 11 2022, 5:48 AM