[TargetLowering] Simplify expansion of S{ADD,SUB}O
authorRoger Ferrer Ibanez <rofirrim@gmail.com>
Mon, 30 Sep 2019 07:58:50 +0000 (07:58 +0000)
committerRoger Ferrer Ibanez <rofirrim@gmail.com>
Mon, 30 Sep 2019 07:58:50 +0000 (07:58 +0000)
commit5a2a14db0bc4cfd4f3c8f2fbac7ca9bc93a23699
tree1821e5f188ac602b3120d6f5925ccded2c835c4d
parentb3438f1cc040ec37ca437ce48b6373298b4ecf9a
[TargetLowering] Simplify expansion of S{ADD,SUB}O

ISD::SADDO uses the suggested sequence described in the section ยง2.4 of
the RISCV Spec v2.2. ISD::SSUBO uses the dual approach but checking for
(non-zero) positive.

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

llvm-svn: 373187
16 files changed:
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
llvm/test/CodeGen/AArch64/sadd_sat.ll
llvm/test/CodeGen/AArch64/sadd_sat_vec.ll
llvm/test/CodeGen/AArch64/ssub_sat.ll
llvm/test/CodeGen/AArch64/ssub_sat_vec.ll
llvm/test/CodeGen/AMDGPU/saddo.ll
llvm/test/CodeGen/ARM/addsubo-legalization.ll
llvm/test/CodeGen/RISCV/arith-with-overflow.ll
llvm/test/CodeGen/X86/combine-mulo.ll
llvm/test/CodeGen/X86/mulo-pow2.ll
llvm/test/CodeGen/X86/sadd_sat.ll
llvm/test/CodeGen/X86/sadd_sat_vec.ll
llvm/test/CodeGen/X86/ssub_sat.ll
llvm/test/CodeGen/X86/ssub_sat_vec.ll
llvm/test/CodeGen/X86/vec_saddo.ll
llvm/test/CodeGen/X86/vec_ssubo.ll