From 4e644b38d715bb06c8a5cc193b793c0c5092b501 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Sun, 15 Apr 2018 19:11:25 +0000 Subject: [X86] Use APInt::isSubsetof instead of APInt::intersects to avoid a negation of an APInt value. NFC llvm-svn: 330105 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/CodeGen') diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index c40b443ed0c..1334f1b2bf5 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -2121,7 +2121,7 @@ bool SelectionDAGISel::CheckAndMask(SDValue LHS, ConstantSDNode *RHS, 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(SDValue LHS, ConstantSDNode *RHS, 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 -- cgit v1.2.3