OSDN Git Service

[SystemZ] Handle SADDO et.al. and ADD/SUBCARRY
authorUlrich Weigand <ulrich.weigand@de.ibm.com>
Mon, 30 Apr 2018 17:54:28 +0000 (17:54 +0000)
committerUlrich Weigand <ulrich.weigand@de.ibm.com>
Mon, 30 Apr 2018 17:54:28 +0000 (17:54 +0000)
commit815278b2cd8c9afce0f84879773a4c4a31645b64
tree3ac448c1aee1d61b38959daf93c643cceba9357d
parent488cbd2beb113428aceb1c0e3cde4aef84a1c85a
[SystemZ] Handle SADDO et.al. and ADD/SUBCARRY

This provides an optimized implementation of SADDO/SSUBO/UADDO/USUBO
as well as ADDCARRY/SUBCARRY on top of the new CC implementation.

In particular, multi-word arithmetic now uses UADDO/ADDCARRY instead
of the old ADDC/ADDE logic, which means we no longer need to use
"glue" links for those instructions.  This also allows making full
use of the memory-based instructions like ALSI, which couldn't be
recognized due to limitations in the DAG matcher previously.

Also, the llvm.sadd.with.overflow et.al. intrinsincs now expand to
directly using the ADD instructions and checking for a CC 3 result.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331203 91177308-0d34-0410-b5e6-96231b3b80d8
51 files changed:
lib/Target/SystemZ/SystemZ.h
lib/Target/SystemZ/SystemZISelDAGToDAG.cpp
lib/Target/SystemZ/SystemZISelLowering.cpp
lib/Target/SystemZ/SystemZISelLowering.h
lib/Target/SystemZ/SystemZInstrInfo.cpp
lib/Target/SystemZ/SystemZInstrInfo.td
lib/Target/SystemZ/SystemZOperands.td
lib/Target/SystemZ/SystemZOperators.td
test/CodeGen/SystemZ/asm-18.ll
test/CodeGen/SystemZ/int-add-08.ll
test/CodeGen/SystemZ/int-sadd-01.ll [new file with mode: 0644]
test/CodeGen/SystemZ/int-sadd-02.ll [new file with mode: 0644]
test/CodeGen/SystemZ/int-sadd-03.ll [new file with mode: 0644]
test/CodeGen/SystemZ/int-sadd-04.ll [new file with mode: 0644]
test/CodeGen/SystemZ/int-sadd-05.ll [new file with mode: 0644]
test/CodeGen/SystemZ/int-sadd-06.ll [new file with mode: 0644]
test/CodeGen/SystemZ/int-sadd-07.ll [new file with mode: 0644]
test/CodeGen/SystemZ/int-sadd-08.ll [new file with mode: 0644]
test/CodeGen/SystemZ/int-sadd-09.ll [new file with mode: 0644]
test/CodeGen/SystemZ/int-ssub-01.ll [new file with mode: 0644]
test/CodeGen/SystemZ/int-ssub-02.ll [new file with mode: 0644]
test/CodeGen/SystemZ/int-ssub-03.ll [new file with mode: 0644]
test/CodeGen/SystemZ/int-ssub-04.ll [new file with mode: 0644]
test/CodeGen/SystemZ/int-ssub-05.ll [new file with mode: 0644]
test/CodeGen/SystemZ/int-ssub-06.ll [new file with mode: 0644]
test/CodeGen/SystemZ/int-ssub-07.ll [new file with mode: 0644]
test/CodeGen/SystemZ/int-ssub-08.ll [new file with mode: 0644]
test/CodeGen/SystemZ/int-ssub-09.ll [new file with mode: 0644]
test/CodeGen/SystemZ/int-sub-05.ll
test/CodeGen/SystemZ/int-uadd-01.ll [new file with mode: 0644]
test/CodeGen/SystemZ/int-uadd-02.ll [new file with mode: 0644]
test/CodeGen/SystemZ/int-uadd-03.ll [new file with mode: 0644]
test/CodeGen/SystemZ/int-uadd-04.ll [new file with mode: 0644]
test/CodeGen/SystemZ/int-uadd-05.ll [new file with mode: 0644]
test/CodeGen/SystemZ/int-uadd-06.ll [new file with mode: 0644]
test/CodeGen/SystemZ/int-uadd-07.ll [new file with mode: 0644]
test/CodeGen/SystemZ/int-uadd-08.ll [new file with mode: 0644]
test/CodeGen/SystemZ/int-uadd-09.ll [new file with mode: 0644]
test/CodeGen/SystemZ/int-uadd-10.ll [new file with mode: 0644]
test/CodeGen/SystemZ/int-uadd-11.ll [new file with mode: 0644]
test/CodeGen/SystemZ/int-usub-01.ll [new file with mode: 0644]
test/CodeGen/SystemZ/int-usub-02.ll [new file with mode: 0644]
test/CodeGen/SystemZ/int-usub-03.ll [new file with mode: 0644]
test/CodeGen/SystemZ/int-usub-04.ll [new file with mode: 0644]
test/CodeGen/SystemZ/int-usub-05.ll [new file with mode: 0644]
test/CodeGen/SystemZ/int-usub-06.ll [new file with mode: 0644]
test/CodeGen/SystemZ/int-usub-07.ll [new file with mode: 0644]
test/CodeGen/SystemZ/int-usub-08.ll [new file with mode: 0644]
test/CodeGen/SystemZ/int-usub-09.ll [new file with mode: 0644]
test/CodeGen/SystemZ/int-usub-10.ll [new file with mode: 0644]
test/CodeGen/SystemZ/int-usub-11.ll [new file with mode: 0644]