HomePhabricator

[CVP] Simplify non-overflowing saturating add/sub

Authored by nikic on May 31 2019, 9:46 AM.

Description

[CVP] Simplify non-overflowing saturating add/sub

If we can determine that a saturating add/sub will not overflow
based on range analysis, convert it into a simple binary operation.
This is a sibling transform to the existing with.overflow handling.

Differential Revision: https://reviews.llvm.org/D62703

llvm-svn: 362242