[llvm] [DAGCombiner] Use APInt::isSubsetOf. NFC (PR #142029)
via llvm-commits
llvm-commits at lists.llvm.org
Thu May 29 13:19:18 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-selectiondag
Author: Craig Topper (topperc)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/142029.diff
1 Files Affected:
- (modified) llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (+1-1)
``````````diff
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<ConstantSDNode>(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;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/142029
More information about the llvm-commits
mailing list