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

Reid Spencer reid at x10sys.com
Tue Jan 2 21:03:20 PST 2007



Changes in directory llvm/lib/CodeGen/SelectionDAG:

SelectionDAGISel.cpp updated: 1.336 -> 1.337
---
Log message:

Restore previous behavior of defaulting to ZEXT. This works around two
things: (1) preventing PR1071: http://llvm.org/PR1071  and (2) working around missing parameter
attributes for bool type. (2) will be fixed shortly. When PR1071: http://llvm.org/PR1071  is fixed,
this patch should be undone.


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

 SelectionDAGISel.cpp |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.336 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.337
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.336	Tue Jan  2 22:25:33 2007
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp	Tue Jan  2 23:03:05 2007
@@ -766,17 +766,12 @@
       else
         TmpVT = MVT::i32;
       const FunctionType *FTy = I.getParent()->getParent()->getFunctionType();
-      ISD::NodeType ExtendKind = ISD::ANY_EXTEND;
+      ISD::NodeType ExtendKind = ISD::ZERO_EXTEND; // FIXME: ANY_EXTEND?
       if (FTy->paramHasAttr(0, FunctionType::SExtAttribute))
         ExtendKind = ISD::SIGN_EXTEND;
       if (FTy->paramHasAttr(0, FunctionType::ZExtAttribute))
         ExtendKind = ISD::ZERO_EXTEND;
-      if (ExtendKind == ISD::ANY_EXTEND)
-        // There was no specification for extension in the parameter attributes
-        // so we will just let the legalizer do the ANY_EXTEND
-        ;
-      else
-        RetOp = DAG.getNode(ExtendKind, TmpVT, RetOp);
+      RetOp = DAG.getNode(ExtendKind, TmpVT, RetOp);
     }
     NewValues.push_back(RetOp);
     NewValues.push_back(DAG.getConstant(false, MVT::i32));






More information about the llvm-commits mailing list