[llvm] r330105 - [X86] Use APInt::isSubsetof instead of APInt::intersects to avoid a negation of an APInt value. NFC

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 15 12:11:26 PDT 2018


Author: ctopper
Date: Sun Apr 15 12:11:25 2018
New Revision: 330105

URL: http://llvm.org/viewvc/llvm-project?rev=330105&view=rev
Log:
[X86] Use APInt::isSubsetof instead of APInt::intersects to avoid a negation of an APInt value. NFC

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=330105&r1=330104&r2=330105&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Sun Apr 15 12:11:25 2018
@@ -2121,7 +2121,7 @@ bool SelectionDAGISel::CheckAndMask(SDVa
     return true;
 
   // If the actual AND mask is allowing unallowed bits, this doesn't match.
-  if (ActualMask.intersects(~DesiredMask))
+  if (!ActualMask.isSubsetOf(DesiredMask))
     return false;
 
   // Otherwise, the DAG Combiner may have proven that the value coming in is
@@ -2150,7 +2150,7 @@ bool SelectionDAGISel::CheckOrMask(SDVal
     return true;
 
   // If the actual AND mask is allowing unallowed bits, this doesn't match.
-  if (ActualMask.intersects(~DesiredMask))
+  if (!ActualMask.isSubsetOf(DesiredMask))
     return false;
 
   // Otherwise, the DAG Combiner may have proven that the value coming in is




More information about the llvm-commits mailing list