[llvm-commits] [llvm] r105341 - /llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Dan Gohman
gohman at apple.com
Wed Jun 2 12:13:40 PDT 2010
Author: djg
Date: Wed Jun 2 14:13:40 2010
New Revision: 105341
URL: http://llvm.org/viewvc/llvm-project?rev=105341&view=rev
Log:
Use comments to document non-obvious code rather than
mailing list archives.
Modified:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=105341&r1=105340&r2=105341&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Wed Jun 2 14:13:40 2010
@@ -980,6 +980,17 @@
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);
More information about the llvm-commits
mailing list