[llvm] r339508 - [TargetLowering] Use APInt::isSubsetOf to simplify some code. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 11 22:34:15 PDT 2018
Author: ctopper
Date: Sat Aug 11 22:34:15 2018
New Revision: 339508
URL: http://llvm.org/viewvc/llvm-project?rev=339508&view=rev
Log:
[TargetLowering] Use APInt::isSubsetOf to simplify some code. NFC
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp?rev=339508&r1=339507&r2=339508&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp Sat Aug 11 22:34:15 2018
@@ -680,7 +680,7 @@ bool TargetLowering::SimplifyDemandedBit
// 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)));
More information about the llvm-commits
mailing list