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

Chris Lattner lattner at cs.uiuc.edu
Sun Jan 22 23:30:57 PST 2006



Changes in directory llvm/lib/CodeGen/SelectionDAG:

LegalizeDAG.cpp updated: 1.274 -> 1.275
---
Log message:

Fix Regression/CodeGen/SparcV8/2006-01-22-BitConvertLegalize.ll by making
sure that the result of expanding a BIT_CONVERT node is itself legalized.


---
Diffs of the changes:  (+4 -2)

 LegalizeDAG.cpp |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)


Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.274 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.275
--- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.274	Fri Jan 20 22:27:00 2006
+++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp	Mon Jan 23 01:30:46 2006
@@ -2501,14 +2501,16 @@
     break;
     
   case ISD::BIT_CONVERT:
-    if (!isTypeLegal(Node->getOperand(0).getValueType()))
+    if (!isTypeLegal(Node->getOperand(0).getValueType())) {
       Result = ExpandBIT_CONVERT(Node->getValueType(0), Node->getOperand(0));
-    else {
+      Result = LegalizeOp(Result);
+    } else {
       switch (TLI.getOperationAction(ISD::BIT_CONVERT,
                                      Node->getOperand(0).getValueType())) {
       default: assert(0 && "Unknown operation action!");
       case TargetLowering::Expand:
         Result = ExpandBIT_CONVERT(Node->getValueType(0), Node->getOperand(0));
+        Result = LegalizeOp(Result);
         break;
       case TargetLowering::Legal:
         Tmp1 = LegalizeOp(Node->getOperand(0));






More information about the llvm-commits mailing list