forked from OSchip/llvm-project
[TargetLowering] Use APInt::isSubsetOf to simplify some code. NFC
llvm-svn: 339508
This commit is contained in:
parent
ed8a114c86
commit
d112206004
|
@ -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)));
|
||||
|
|
Loading…
Reference in New Issue