This is an archive of the discontinued LLVM Phabricator instance.

[ScalarEvolution] Make sure getMinusSCEV doesn't negate pointers.

Authored by efriedma on Jul 6 2021, 11:00 AM.



Add a function removePointerBase that returns, essentially, S - getPointerBase(S). Use it in getMinusSCEV instead of multiplying a pointer by -1.

Diff Detail

Event Timeline

efriedma created this revision.Jul 6 2021, 11:00 AM
efriedma requested review of this revision.Jul 6 2021, 11:00 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 6 2021, 11:00 AM
mkazantsev added inline comments.Jul 7 2021, 1:19 AM

I guess you forgot to modify ops somewhere.

mkazantsev accepted this revision.Jul 7 2021, 1:20 AM

Oh sorry, I missed how it happened. LGTM :)

This revision is now accepted and ready to land.Jul 7 2021, 1:20 AM