[llvm-commits] [llvm] r60006 - /llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp

Scott Michel scottm at aero.org
Mon Nov 24 20:03:48 PST 2008


Author: pingbak
Date: Mon Nov 24 22:03:47 2008
New Revision: 60006

URL: http://llvm.org/viewvc/llvm-project?rev=60006&view=rev
Log:
CellSPU: Relax constraints on when to generate a X-form address, evidently
they were too tight according to bug 3126.

Fix bug 3126.

Modified:
    llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp

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

==============================================================================
--- llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp (original)
+++ llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp Mon Nov 24 22:03:47 2008
@@ -591,6 +591,7 @@
                                  SDValue &Index) {
   if (!SelectAFormAddr(Op, N, Base, Index)
       && !SelectDFormAddr(Op, N, Base, Index)) {
+#if 0
     // Default form of a X-form address is r(r) in operands 0 and 1:
     SDValue Op0 = N.getOperand(0);
     SDValue Op1 = N.getOperand(1);
@@ -611,6 +612,12 @@
 
       return true;
     }
+#else
+    // All else fails, punt and use an X-form address:
+    Base = N.getOperand(0);
+    Index = N.getOperand(1);
+    return true;
+#endif
   }
 
   return false;





More information about the llvm-commits mailing list