Redo the arithmetic with overflow architecture. I was changing the semantics of
authorBill Wendling <isanbard@gmail.com>
Fri, 12 Dec 2008 00:56:36 +0000 (00:56 +0000)
committerBill Wendling <isanbard@gmail.com>
Fri, 12 Dec 2008 00:56:36 +0000 (00:56 +0000)
commitab55ebda1c2254f98b06e770bc2dae7d05a4a366
tree770f22dcefcbafbbb4a2a91a7a195d7eca15ab47
parent905315441ea40b068d58f5d9ff8328264af99e90
Redo the arithmetic with overflow architecture. I was changing the semantics of
ISD::ADD to emit an implicit EFLAGS. This was horribly broken. Instead, replace
the intrinsic with an ISD::SADDO node. Then custom lower that into an
X86ISD::ADD node with a associated SETCC that checks the correct condition code
(overflow or carry). Then that gets lowered into the correct X86::ADDOvf
instruction.

Similar for SUB and MUL instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60915 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86ISelLowering.h
lib/Target/X86/X86Instr64bit.td
lib/Target/X86/X86InstrInfo.td