Fix unused variable warning

llvm-svn: 292921
This commit is contained in:
Simon Pilgrim 2017-01-24 11:54:27 +00:00
parent 8198db30f3
commit 0c45338961
1 changed files with 2 additions and 2 deletions

View File

@ -30469,7 +30469,6 @@ static SDValue combineVectorShift(SDNode *N, SelectionDAG &DAG,
"Unexpected shift opcode"); "Unexpected shift opcode");
bool LogicalShift = X86ISD::VSHLI == Opcode || X86ISD::VSRLI == Opcode; bool LogicalShift = X86ISD::VSHLI == Opcode || X86ISD::VSRLI == Opcode;
EVT VT = N->getValueType(0); EVT VT = N->getValueType(0);
unsigned NumElts = VT.getVectorNumElements();
unsigned NumBitsPerElt = VT.getScalarSizeInBits(); unsigned NumBitsPerElt = VT.getScalarSizeInBits();
// This fails for mask register (vXi1) shifts. // This fails for mask register (vXi1) shifts.
@ -30511,7 +30510,8 @@ static SDValue combineVectorShift(SDNode *N, SelectionDAG &DAG,
SmallVector<APInt, 32> EltBits; SmallVector<APInt, 32> EltBits;
if (N->isOnlyUserOf(N0.getNode()) && if (N->isOnlyUserOf(N0.getNode()) &&
getTargetConstantBitsFromNode(N0, NumBitsPerElt, UndefElts, EltBits)) { getTargetConstantBitsFromNode(N0, NumBitsPerElt, UndefElts, EltBits)) {
assert(EltBits.size() == NumElts && "Unexpected shift value type"); assert(EltBits.size() == VT.getVectorNumElements() &&
"Unexpected shift value type");
unsigned ShiftImm = ShiftVal.getZExtValue(); unsigned ShiftImm = ShiftVal.getZExtValue();
for (APInt &Elt : EltBits) { for (APInt &Elt : EltBits) {
if (X86ISD::VSHLI == Opcode) if (X86ISD::VSHLI == Opcode)