Changes in directory llvm/lib/CodeGen/SelectionDAG:
DAGCombiner.cpp updated: 1.259 -> 1.260 --- Log message: Don't convert store double C, Ptr to store long C, Ptr if i64 is not a legal type. --- Diffs of the changes: (+12 -9) DAGCombiner.cpp | 21 ++++++++++++--------- 1 files changed, 12 insertions(+), 9 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.259 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.260 --- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.259 Sun Dec 10 20:23:46 2006 +++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Mon Dec 11 11:25:19 2006 @@ -3035,17 +3035,20 @@ } // Turn 'store float 1.0, Ptr' -> 'store int 0x12345678, Ptr' - // FIXME: We shouldn't do this for TargetConstantFP's. if (ConstantFPSDNode *CFP = dyn_cast<ConstantFPSDNode>(Value)) { - SDOperand Tmp; - if (CFP->getValueType(0) == MVT::f32) { - Tmp = DAG.getConstant(FloatToBits(CFP->getValue()), MVT::i32); - } else { - assert(CFP->getValueType(0) == MVT::f64 && "Unknown FP type!"); - Tmp = DAG.getConstant(DoubleToBits(CFP->getValue()), MVT::i64); + if (Value.getOpcode() != ISD::TargetConstantFP) { + SDOperand Tmp; + if (CFP->getValueType(0) == MVT::f32) { + Tmp = DAG.getConstant(FloatToBits(CFP->getValue()), MVT::i32); + return DAG.getStore(Chain, Tmp, Ptr, ST->getSrcValue(), + ST->getSrcValueOffset()); + } else if (TLI.isTypeLegal(MVT::i64)) { + assert(CFP->getValueType(0) == MVT::f64 && "Unknown FP type!"); + Tmp = DAG.getConstant(DoubleToBits(CFP->getValue()), MVT::i64); + return DAG.getStore(Chain, Tmp, Ptr, ST->getSrcValue(), + ST->getSrcValueOffset()); + } } - return DAG.getStore(Chain, Tmp, Ptr, ST->getSrcValue(), - ST->getSrcValueOffset()); } if (CombinerAA) { _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits