]> granicus.if.org Git - llvm/commit
[DAGCombiner] Add add/sub saturation undef handling
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 14 Jan 2019 14:16:24 +0000 (14:16 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 14 Jan 2019 14:16:24 +0000 (14:16 +0000)
commitcfe0eb0ee4609976590caf77904db309b174e13c
tree8bab811a733ee45d39abce0aa851b2633d293cd0
parent4b96a01615ef68991eb40e76daeb54c2b84fbaba
[DAGCombiner] Add add/sub saturation undef handling

Match ConstantFolding.cpp:
(add_sat x, undef) -> -1
(sub_sat x, undef) -> 0

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351070 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
test/CodeGen/X86/combine-add-ssat.ll
test/CodeGen/X86/combine-add-usat.ll
test/CodeGen/X86/combine-sub-ssat.ll
test/CodeGen/X86/combine-sub-usat.ll