This is an archive of the discontinued LLVM Phabricator instance.

[InstSimplify] Don't lose inbounds when simplifying a GEP
ClosedPublic

Authored by arichardson on Sep 21 2021, 6:39 AM.

Details

Summary

I noticed this while working on a (ptrtoint (gep null, x)) -> x fold.

Diff Detail

Event Timeline

arichardson created this revision.Sep 21 2021, 6:39 AM
arichardson requested review of this revision.Sep 21 2021, 6:39 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 21 2021, 6:39 AM
nikic accepted this revision.Sep 21 2021, 9:51 AM

LGTM

llvm/lib/Transforms/Scalar/NewGVN.cpp
1197–1200

Legit warning.

This revision is now accepted and ready to land.Sep 21 2021, 9:51 AM
This revision was landed with ongoing or failed builds.Sep 23 2021, 1:25 AM
This revision was automatically updated to reflect the committed changes.
arichardson marked an inline comment as done.