[llvm-commits] [llvm] r54168 - in /llvm/trunk/lib: CodeGen/SelectionDAG/LegalizeDAG.cpp Target/CellSPU/SPUISelLowering.cpp

Nate Begeman natebegeman at mac.com
Tue Jul 29 12:07:28 PDT 2008


Author: sampo
Date: Tue Jul 29 14:07:27 2008
New Revision: 54168

URL: http://llvm.org/viewvc/llvm-project?rev=54168&view=rev
Log:
Fix broken CellSPU lowering, re-instate braces in Legalize

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
    llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=54168&r1=54167&r2=54168&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Tue Jul 29 14:07:27 2008
@@ -2976,12 +2976,10 @@
     case TargetLowering::Legal: break;
     case TargetLowering::Custom:
       Tmp1 = TLI.LowerOperation(Result, DAG);
-      if (Tmp1.Val) 
-      // FIXME: these braces are correct, but breaks CellSPU codegen.
-      //{
+      if (Tmp1.Val) {
         Result = Tmp1;
         break;
-      //}
+      }
       // Fall through if the custom lower can't deal with the operation
     case TargetLowering::Expand: {
       MVT VT = Op.getValueType();

Modified: llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp?rev=54168&r1=54167&r2=54168&view=diff

==============================================================================
--- llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp Tue Jul 29 14:07:27 2008
@@ -2481,8 +2481,9 @@
                          DAG.getNode(ISD::BUILD_VECTOR, VT, tcVec, tcVecSize));
     }
   }
-
-  return SDValue();
+  // These operations (AND, OR, XOR) are legal, they just couldn't be custom
+  // lowered.  Return the operation, rather than a null SDValue.
+  return Op;
 }
 
 //! Lower i32 multiplication





More information about the llvm-commits mailing list