Fix a bug in i32->f64 conversion lowering
authorChris Lattner <sabre@nondot.org>
Wed, 11 Jan 2006 07:27:40 +0000 (07:27 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 11 Jan 2006 07:27:40 +0000 (07:27 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25211 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Sparc/SparcISelDAGToDAG.cpp
lib/Target/SparcV8/SparcV8ISelDAGToDAG.cpp

index a0d6b2ffec6e64dd88525be856a3b4c2a3862c2d..1ef719558ae90956a20ec8151b8745f209b9c292 100644 (file)
@@ -622,9 +622,9 @@ LowerOperation(SDOperand Op, SelectionDAG &DAG) {
     return DAG.getNode(ISD::BIT_CONVERT, MVT::i32, Op);
   case ISD::SINT_TO_FP: {
     assert(Op.getOperand(0).getValueType() == MVT::i32);
-    Op = DAG.getNode(ISD::BIT_CONVERT, MVT::f32, Op.getOperand(0));
+    SDOperand Tmp = DAG.getNode(ISD::BIT_CONVERT, MVT::f32, Op.getOperand(0));
     // Convert the int value to FP in an FP register.
-    return DAG.getNode(V8ISD::ITOF, Op.getValueType(), Op);
+    return DAG.getNode(V8ISD::ITOF, Op.getValueType(), Tmp);
   }
   case ISD::BR_CC: {
     SDOperand Chain = Op.getOperand(0);
index a0d6b2ffec6e64dd88525be856a3b4c2a3862c2d..1ef719558ae90956a20ec8151b8745f209b9c292 100644 (file)
@@ -622,9 +622,9 @@ LowerOperation(SDOperand Op, SelectionDAG &DAG) {
     return DAG.getNode(ISD::BIT_CONVERT, MVT::i32, Op);
   case ISD::SINT_TO_FP: {
     assert(Op.getOperand(0).getValueType() == MVT::i32);
-    Op = DAG.getNode(ISD::BIT_CONVERT, MVT::f32, Op.getOperand(0));
+    SDOperand Tmp = DAG.getNode(ISD::BIT_CONVERT, MVT::f32, Op.getOperand(0));
     // Convert the int value to FP in an FP register.
-    return DAG.getNode(V8ISD::ITOF, Op.getValueType(), Op);
+    return DAG.getNode(V8ISD::ITOF, Op.getValueType(), Tmp);
   }
   case ISD::BR_CC: {
     SDOperand Chain = Op.getOperand(0);