Changes in directory llvm/lib/CodeGen/SelectionDAG:
LegalizeDAG.cpp updated: 1.306 -> 1.307 --- Log message: Fix a problem on itanium with memset. The value to set has been promoted to i64 before this code, so zero_ext doesn't work. --- Diffs of the changes: (+6 -2) LegalizeDAG.cpp | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.306 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.307 --- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.306 Thu Feb 16 23:43:56 2006 +++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Mon Feb 20 00:38:35 2006 @@ -1661,8 +1661,12 @@ const char *FnName = 0; if (Node->getOpcode() == ISD::MEMSET) { Args.push_back(std::make_pair(Tmp2, IntPtrTy)); - // Extend the ubyte argument to be an int value for the call. - Tmp3 = DAG.getNode(ISD::ZERO_EXTEND, MVT::i32, Tmp3); + // Extend the (previously legalized) ubyte argument to be an int value + // for the call. + if (Tmp3.getValueType() > MVT::i32) + Tmp3 = DAG.getNode(ISD::TRUNCATE, MVT::i32, Tmp3); + else + Tmp3 = DAG.getNode(ISD::ZERO_EXTEND, MVT::i32, Tmp3); Args.push_back(std::make_pair(Tmp3, Type::IntTy)); Args.push_back(std::make_pair(Tmp4, IntPtrTy)); _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits