OSDN Git Service

In LegalizeOp, don't change the result type of CONVERT_RNDSAT when promoting
authorMon P Wang <wangmp@apple.com>
Tue, 9 Dec 2008 07:27:39 +0000 (07:27 +0000)
committerMon P Wang <wangmp@apple.com>
Tue, 9 Dec 2008 07:27:39 +0000 (07:27 +0000)
one of its operand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60749 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/LegalizeDAG.cpp

index 445d32f..c13e84b 100644 (file)
@@ -3876,8 +3876,8 @@ SDValue SelectionDAGLegalize::LegalizeOp(SDValue Op) {
     default: assert(0 && "Unknown cvt code!");
     case ISD::CVT_SF:
     case ISD::CVT_UF:
-      break;
     case ISD::CVT_FF:
+      break;
     case ISD::CVT_FS:
     case ISD::CVT_FU:
     case ISD::CVT_SS:
@@ -3904,7 +3904,7 @@ SDValue SelectionDAGLegalize::LegalizeOp(SDValue Op) {
         Result = PromoteOp(Node->getOperand(0));
         // For FP, make Op1 a i32
         
-        Result = DAG.getConvertRndSat(Result.getValueType(), Result,
+        Result = DAG.getConvertRndSat(Op.getValueType(), Result,
                                       DTyOp, STyOp, RndOp, SatOp, CvtCode);
         break;
       }