This is an archive of the discontinued LLVM Phabricator instance.

[ConstantFolding] Add support for saturating add/sub
ClosedPublic

Authored by nikic on Nov 14 2018, 8:42 AM.

Details

Summary

Support saturating add/sub in constant folding, based on the APInt methods introduced in D54332.

Diff Detail

Repository
rL LLVM

Event Timeline

nikic created this revision.Nov 14 2018, 8:42 AM
spatel accepted this revision.Nov 14 2018, 10:45 AM
spatel added a subscriber: spatel.

LGTM - but it would be better to vary the 'i8' in these tests to get broader testing.

This revision is now accepted and ready to land.Nov 14 2018, 10:45 AM
This revision was automatically updated to reflect the committed changes.