[llvm] r338212 - [AVR] Re-enable expansion of ADDE/ADDC/SUBE/SUBC in ISel
Dylan McKay via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 29 04:38:37 PDT 2018
Author: dylanmckay
Date: Sun Jul 29 04:38:36 2018
New Revision: 338212
URL: http://llvm.org/viewvc/llvm-project?rev=338212&view=rev
Log:
[AVR] Re-enable expansion of ADDE/ADDC/SUBE/SUBC in ISel
This was disabled in r333748, which broke four tests.
In the future, these need to be updated to UADDO/ADDCARRY or
USUBO/SUBCARRY.
Modified:
llvm/trunk/lib/Target/AVR/AVRISelLowering.cpp
Modified: llvm/trunk/lib/Target/AVR/AVRISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AVR/AVRISelLowering.cpp?rev=338212&r1=338211&r2=338212&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AVR/AVRISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/AVR/AVRISelLowering.cpp Sun Jul 29 04:38:36 2018
@@ -63,6 +63,13 @@ AVRTargetLowering::AVRTargetLowering(AVR
setTruncStoreAction(MVT::i16, MVT::i8, Expand);
+ for (MVT VT : MVT::integer_valuetypes()) {
+ setOperationAction(ISD::ADDC, VT, Legal);
+ setOperationAction(ISD::SUBC, VT, Legal);
+ setOperationAction(ISD::ADDE, VT, Legal);
+ setOperationAction(ISD::SUBE, VT, Legal);
+ }
+
// sub (x, imm) gets canonicalized to add (x, -imm), so for illegal types
// revert into a sub since we don't have an add with immediate instruction.
setOperationAction(ISD::ADD, MVT::i32, Custom);
More information about the llvm-commits
mailing list