summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86ISelLowering.h
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2008-12-12 00:56:36 +0000
committerBill Wendling <isanbard@gmail.com>2008-12-12 00:56:36 +0000
commit1a317678bc385277da31aeb749911b9a1a92557d (patch)
treeffcdf82d2b3279f164d0a9748a04a99b73b0dad3 /llvm/lib/Target/X86/X86ISelLowering.h
parent6932e2f3682372ef5de4430018a64626eba059c4 (diff)
downloadbcm5719-llvm-1a317678bc385277da31aeb749911b9a1a92557d.tar.gz
bcm5719-llvm-1a317678bc385277da31aeb749911b9a1a92557d.zip
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. llvm-svn: 60915
Diffstat (limited to 'llvm/lib/Target/X86/X86ISelLowering.h')
-rw-r--r--llvm/lib/Target/X86/X86ISelLowering.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.h b/llvm/lib/Target/X86/X86ISelLowering.h
index 6eb78f692fb..c7602ebe1cf 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.h
+++ b/llvm/lib/Target/X86/X86ISelLowering.h
@@ -227,7 +227,11 @@ namespace llvm {
// PCMP* - Vector integer comparisons.
PCMPEQB, PCMPEQW, PCMPEQD, PCMPEQQ,
- PCMPGTB, PCMPGTW, PCMPGTD, PCMPGTQ
+ PCMPGTB, PCMPGTW, PCMPGTD, PCMPGTQ,
+
+ // ADD, SUB, MUL - Arithmetic operations with overflow/carry
+ // intrinsics.
+ ADD, SUB, MUL
};
}
OpenPOWER on IntegriCloud