Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp =================================================================== --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -3457,6 +3457,12 @@ Tmp = cast(Op.getOperand(1))->getVT().getSizeInBits(); return VTBits-Tmp; + case ISD::BUILD_PAIR: + Tmp = ComputeNumSignBits(Op.getOperand(1), Depth + 1); + if (Op.getOperand(1).getValueSizeInBits() == Tmp) + Tmp += ComputeNumSignBits(Op.getOperand(0), Depth + 1); + return Tmp; + case ISD::BUILD_VECTOR: Tmp = VTBits; for (unsigned i = 0, e = Op.getNumOperands(); (i < e) && (Tmp > 1); ++i) {