[DAGCombiner] Fixed minor typo that was missed in D9097.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 19 Jul 2015 11:31:40 +0000 (11:31 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 19 Jul 2015 11:31:40 +0000 (11:31 +0000)
We don't bitcast the UNDEFs - that is done in visitVECTOR_SHUFFLE, and the getValueType should come from the operand's SDValue not the SDNode.

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

lib/CodeGen/SelectionDAG/DAGCombiner.cpp

index 99957fe2002d4809cced785b1bb90109d2091df5..b75ac3fae2dc9823f091524b32ebfa78f6a0d98c 100644 (file)
@@ -7237,10 +7237,10 @@ SDValue DAGCombiner::visitBITCAST(SDNode *N) {
     ShuffleVectorSDNode *SVN = cast<ShuffleVectorSDNode>(N0);
 
     // If operands are a bitcast, peek through if it casts the original VT.
-    // If operands are a UNDEF or constant, just bitcast back to original VT.
+    // If operands are a constant, just bitcast back to original VT.
     auto PeekThroughBitcast = [&](SDValue Op) {
       if (Op.getOpcode() == ISD::BITCAST &&
-          Op.getOperand(0)->getValueType(0) == VT)
+          Op.getOperand(0).getValueType() == VT)
         return SDValue(Op.getOperand(0));
       if (ISD::isBuildVectorOfConstantSDNodes(Op.getNode()) ||
           ISD::isBuildVectorOfConstantFPSDNodes(Op.getNode()))