From 6e51a364c8cce58726688800e1b2934f4ec4cda9 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Thu, 29 May 2025 13:16:03 -0700 Subject: [PATCH] [DAGCombiner] Use APInt::isSubsetOf. NFC --- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index e05f85ea3bd8e..00be9891b0ccb 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -6813,7 +6813,7 @@ bool DAGCombiner::SearchForAndLoads(SDNode *N, // Some constants may need fixing up later if they are too large. if (auto *C = dyn_cast(Op)) { if ((N->getOpcode() == ISD::OR || N->getOpcode() == ISD::XOR) && - (Mask->getAPIntValue() & C->getAPIntValue()) != C->getAPIntValue()) + !C->getAPIntValue().isSubsetOf(Mask->getAPIntValue())) NodesWithConsts.insert(N); continue; }