[TargetLowering] Use APInt::isSubsetOf to simplify some code. NFC

llvm-svn: 339508
This commit is contained in:
Craig Topper 2018-08-12 05:34:15 +00:00
parent ed8a114c86
commit d112206004
1 changed files with 1 additions and 1 deletions

View File

@ -680,7 +680,7 @@ bool TargetLowering::SimplifyDemandedBits(SDValue Op,
// If all of the unknown bits are known to be zero on one side or the other
// (but not both) turn this into an *inclusive* or.
// e.g. (A & C1)^(B & C2) -> (A & C1)|(B & C2) iff C1&C2 == 0
if ((NewMask & ~Known.Zero & ~Known2.Zero) == 0)
if (NewMask.isSubsetOf(Known.Zero|Known2.Zero))
return TLO.CombineTo(Op, TLO.DAG.getNode(ISD::OR, dl, VT,
Op.getOperand(0),
Op.getOperand(1)));