[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp

Chris Lattner lattner at cs.uiuc.edu
Sun Jan 29 13:02:35 PST 2006



Changes in directory llvm/lib/CodeGen/SelectionDAG:

LegalizeDAG.cpp updated: 1.294 -> 1.295
---
Log message:

Fix RET of promoted values on targets that custom expand RET to a target node.


---
Diffs of the changes:  (+9 -8)

 LegalizeDAG.cpp |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)


Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.294 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.295
--- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.294	Sun Jan 29 02:42:06 2006
+++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp	Sun Jan 29 15:02:23 2006
@@ -1056,14 +1056,15 @@
     }
     }
 
-    switch (TLI.getOperationAction(Node->getOpcode(),
-                                   Node->getValueType(0))) {
-    default: assert(0 && "This action is not supported yet!");
-    case TargetLowering::Legal: break;
-    case TargetLowering::Custom:
-      Tmp1 = TLI.LowerOperation(Result, DAG);
-      if (Tmp1.Val) Result = Tmp1;
-      break;
+    if (Result.getOpcode() == ISD::RET) {
+      switch (TLI.getOperationAction(Result.getOpcode(), MVT::Other)) {
+      default: assert(0 && "This action is not supported yet!");
+      case TargetLowering::Legal: break;
+      case TargetLowering::Custom:
+        Tmp1 = TLI.LowerOperation(Result, DAG);
+        if (Tmp1.Val) Result = Tmp1;
+        break;
+      }
     }
     break;
   case ISD::STORE: {






More information about the llvm-commits mailing list