This is an archive of the discontinued LLVM Phabricator instance.

[ConstFold] Use const-folded operands in more places
ClosedPublic

Authored by aeubanks on Apr 27 2021, 12:44 PM.

Details

Summary

Previously we were const folding operands but not passing them.

Diff Detail

Event Timeline

aeubanks created this revision.Apr 27 2021, 12:44 PM
aeubanks requested review of this revision.Apr 27 2021, 12:44 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 27 2021, 12:44 PM
nikic accepted this revision.Apr 27 2021, 12:53 PM

LGTM, nice find.

Would be nice to have a test showing the difference, but maybe that's hard to do because of how these tend to get called? (E.g. InstCombine is folding operands anyway.)

This revision is now accepted and ready to land.Apr 27 2021, 12:53 PM

yeah it'll be tricky to find a test case where this matters, and probably doesn't matter much in practice anyway, just a nice cleanup

This revision was landed with ongoing or failed builds.Apr 27 2021, 2:30 PM
This revision was automatically updated to reflect the committed changes.