diff options
author | Dan Gohman <gohman@apple.com> | 2010-06-02 19:13:40 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-06-02 19:13:40 +0000 |
commit | 71c62a2977c405fb3f7b6dc5dcc59f63ca08be0f (patch) | |
tree | b4fd6726ac31938ccc8d0111ac052c96e7b47ddf | |
parent | 354eb7ea968f35a9e8628b8036a69f48a66e1ff9 (diff) | |
download | external_llvm-71c62a2977c405fb3f7b6dc5dcc59f63ca08be0f.zip external_llvm-71c62a2977c405fb3f7b6dc5dcc59f63ca08be0f.tar.gz external_llvm-71c62a2977c405fb3f7b6dc5dcc59f63ca08be0f.tar.bz2 |
Use comments to document non-obvious code rather than
mailing list archives.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105341 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/X86/X86ISelLowering.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index bb80ace..a322ad2 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -980,6 +980,17 @@ X86TargetLowering::X86TargetLowering(X86TargetMachine &TM) setOperationAction(ISD::SSUBO, MVT::i32, Custom); setOperationAction(ISD::USUBO, MVT::i32, Custom); setOperationAction(ISD::SMULO, MVT::i32, Custom); + + // 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. + // + // This may not be hard to implement though. + // In fact you could even cheat, and turn the 64 bit add-with-overflow + // into a 65 bit add, with the top bit being used to compute the overflow + // flag. That should then all get expanded out automagically. if (Subtarget->is64Bit()) { setOperationAction(ISD::SADDO, MVT::i64, Custom); setOperationAction(ISD::UADDO, MVT::i64, Custom); |