[SelectionDAG] computeKnownBits - early-out if any BUILD_VECTOR element has no known bits

No need to check the remaining elements - no common known bits are available.

llvm-svn: 285399
This commit is contained in:
Simon Pilgrim 2016-10-28 14:07:44 +00:00
parent a8c45742e8
commit e60a0f8e0f

View File

@ -2042,6 +2042,10 @@ void SelectionDAG::computeKnownBits(SDValue Op, APInt &KnownZero,
// TODO: support per-element known bits.
KnownOne &= KnownOne2;
KnownZero &= KnownZero2;
// If we don't know any bits, early out.
if (!KnownOne && !KnownZero)
break;
}
break;
case ISD::AND: