OSDN Git Service

GlobalISel: support overflow arithmetic intrinsics.
authorTim Northover <tnorthover@apple.com>
Fri, 19 Aug 2016 17:17:06 +0000 (17:17 +0000)
committerTim Northover <tnorthover@apple.com>
Fri, 19 Aug 2016 17:17:06 +0000 (17:17 +0000)
commit2fd227abc8ca717d25a1bb6e70d80dc1e52115d5
tree6f791182d8f6e5ea20967f6e373de88b1fa1f713
parent31c625e355e7d2433939ae33094f612662590164
GlobalISel: support overflow arithmetic intrinsics.

Unsigned addition and subtraction can reuse the instructions created to
legalize large width operations (i.e. both produce and consume a carry flag).
Signed operations and multiplies get a dedicated op-with-overflow instruction.

Once this is produced the two values are combined into a struct register (which
will almost always be merged with a corresponding G_EXTRACT as part of
legalization).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279278 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/GlobalISel/IRTranslator.h
include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h
include/llvm/Target/GenericOpcodes.td
include/llvm/Target/TargetOpcodes.def
lib/CodeGen/GlobalISel/IRTranslator.cpp
lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
lib/CodeGen/GlobalISel/MachineLegalizeHelper.cpp
test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll
test/CodeGen/AArch64/GlobalISel/legalize-add.mir