[llvm-commits] [llvm] r72521 - /llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp

Sanjiv Gupta sanjiv.gupta at microchip.com
Wed May 27 23:59:58 PDT 2009


Author: sgupta
Date: Thu May 28 01:59:57 2009
New Revision: 72521

URL: http://llvm.org/viewvc/llvm-project?rev=72521&view=rev
Log:
Fixing problems that got exposed after the refactoring of LegalizeDAG done in 72447.

Modified:
    llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp

Modified: llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp?rev=72521&r1=72520&r2=72521&view=diff

==============================================================================
--- llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp Thu May 28 01:59:57 2009
@@ -1425,10 +1425,8 @@
       return DAG.getNode(Op.getOpcode(), dl, MVT::i8, Op.getOperand(MemOp ^ 1),
                          NewVal);
   }
-  else if (Op.getOpcode() == ISD::ADD)
-    return Op;
   else
-    return SDValue();
+    return Op;
 }
 
 SDValue PIC16TargetLowering::LowerSUB(SDValue Op, SelectionDAG &DAG) {
@@ -1439,7 +1437,7 @@
   // Nothing to do if the first operand is already a direct load and it has
   // only one use.
   if (isDirectLoad(Op.getOperand(0)) && Op.getOperand(0).hasOneUse())
-    return SDValue();
+    return Op;
 
   // Put first operand on stack.
   SDValue NewVal = ConvertToMemOperand (Op.getOperand(0), DAG, dl);





More information about the llvm-commits mailing list