summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/InstCombine/saturating-add-sub-vector.ll
Commit message (Collapse)AuthorAgeFilesLines
* [ConstantFolding] Fold undef for integer intrinsicsNikita Popov2019-01-111-411/+0
| | | | | | | | | | | | | | | | | | | This fixes https://bugs.llvm.org/show_bug.cgi?id=40110. This implements handling of undef operands for integer intrinsics in ConstantFolding, in particular for the bitcounting intrinsics (ctpop, cttz, ctlz), the with.overflow intrinsics, the saturating math intrinsics and the funnel shift intrinsics. The undef behavior follows what InstSimplify does for the general cas e of non-constant operands. For the bitcount intrinsics (where InstSimplify doesn't do undef handling -- there cannot be a combination of an undef + non-constant operand) I'm using a 0 result if the intrinsic is defined for zero and undef otherwise. Differential Revision: https://reviews.llvm.org/D55950 llvm-svn: 350971
* [InstCombine] Make x86 PADDS/PSUBS constant folding tests genericSimon Pilgrim2018-12-201-0/+411
As discussed on D55894, this replaces the existing PADDS/PSUBUS intrinsics with the the sadd/ssub.sat generic intrinsics and moves the tests out of the x86 subfolder. PR40110 has been raised to fix the regression with constant folding vectors containing undef elements. llvm-svn: 349759
OpenPOWER on IntegriCloud