OSDN Git Service

Revise r131553. Just use the type of the input node and forgo the bitcast. rdar:...
authorEvan Cheng <evan.cheng@apple.com>
Wed, 18 May 2011 18:59:17 +0000 (18:59 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Wed, 18 May 2011 18:59:17 +0000 (18:59 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131555 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMISelLowering.cpp

index ef399b6..94f220b 100644 (file)
@@ -2693,13 +2693,12 @@ SDValue ARMTargetLowering::LowerSELECT(SDValue Op, SelectionDAG &DAG) const {
       }
 
       if (True.getNode() && False.getNode()) {
-        EVT VT = Cond.getValueType();
+        EVT VT = Op.getValueType();
         SDValue ARMcc = Cond.getOperand(2);
         SDValue CCR = Cond.getOperand(3);
         SDValue Cmp = duplicateCmp(Cond.getOperand(4), DAG);
-        return DAG.getNode(ISD::BITCAST, dl, Op.getValueType(),
-                           DAG.getNode(ARMISD::CMOV, dl, VT, True, False,
-                                       ARMcc, CCR, Cmp));
+        assert(True.getValueType() == VT);
+        return DAG.getNode(ARMISD::CMOV, dl, VT, True, False, ARMcc, CCR, Cmp);
       }
     }
   }