[PowerPC] Legalize saturating vector add/sub
authorNemanja Ivanovic <nemanja.i.ibm@gmail.com>
Wed, 15 Jan 2020 13:00:22 +0000 (07:00 -0600)
committerNemanja Ivanovic <nemanja.i.ibm@gmail.com>
Wed, 15 Jan 2020 13:00:38 +0000 (07:00 -0600)
commit9c64f04df8ecbcad2c527c33f5ef8a7993842001
treedf2f7317df11493849a6e73ab8ef727539d51a7e
parent5852475e2c049ce29dcb1f0da3ac33035f8c9156
[PowerPC] Legalize saturating vector add/sub

These intrinsics and the corresponding ISD nodes were recently added. PPC has
instructions that do this for vectors. Legalize them and add patterns to emit
the satuarting instructions.

Differential revision: https://reviews.llvm.org/D71940
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
llvm/lib/Target/PowerPC/PPCInstrAltivec.td
llvm/test/CodeGen/PowerPC/saturating-intrinsics.ll [new file with mode: 0644]