diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2010-06-02 00:27:18 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2010-06-02 00:27:18 +0000 |
commit | a993f0a45fed5e33eb480cb5c8b9c02a76c6602d (patch) | |
tree | 907eeca229d3894e86d57ba6e0036bb1b5858d78 /lib/Target | |
parent | b2c2a972b075542ab5a02c554ec4a5cc0bcb95a0 (diff) | |
download | external_llvm-a993f0a45fed5e33eb480cb5c8b9c02a76c6602d.zip external_llvm-a993f0a45fed5e33eb480cb5c8b9c02a76c6602d.tar.gz external_llvm-a993f0a45fed5e33eb480cb5c8b9c02a76c6602d.tar.bz2 |
Don't try to custom-lower 64-bit add-with-overflow and friends on x86-32; the
x86 backend currently doesn't know how to handle them.
This doesn't really fix anything because LegalizeTypes doesn't know how to
handle them either. We do get a better error message, though.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105305 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r-- | lib/Target/X86/X86ISelLowering.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index 0fd87bd..bb80ace 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -976,15 +976,17 @@ X86TargetLowering::X86TargetLowering(X86TargetMachine &TM) // Add/Sub/Mul with overflow operations are custom lowered. setOperationAction(ISD::SADDO, MVT::i32, Custom); - setOperationAction(ISD::SADDO, MVT::i64, Custom); setOperationAction(ISD::UADDO, MVT::i32, Custom); - setOperationAction(ISD::UADDO, MVT::i64, Custom); setOperationAction(ISD::SSUBO, MVT::i32, Custom); - setOperationAction(ISD::SSUBO, MVT::i64, Custom); setOperationAction(ISD::USUBO, MVT::i32, Custom); - setOperationAction(ISD::USUBO, MVT::i64, Custom); setOperationAction(ISD::SMULO, MVT::i32, Custom); - setOperationAction(ISD::SMULO, MVT::i64, Custom); + if (Subtarget->is64Bit()) { + setOperationAction(ISD::SADDO, MVT::i64, Custom); + setOperationAction(ISD::UADDO, MVT::i64, Custom); + setOperationAction(ISD::SSUBO, MVT::i64, Custom); + setOperationAction(ISD::USUBO, MVT::i64, Custom); + setOperationAction(ISD::SMULO, MVT::i64, Custom); + } if (!Subtarget->is64Bit()) { // These libcalls are not available in 32-bit. |