[llvm] c734377 - [DAG] foldMaskedMerge - fix Wparentheses operator precedence warning. NFC.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 20 08:20:37 PDT 2025


Author: Simon Pilgrim
Date: 2025-06-20T16:20:28+01:00
New Revision: c734377544fc5a854c539fafc9b9b658f12230a3

URL: https://github.com/llvm/llvm-project/commit/c734377544fc5a854c539fafc9b9b658f12230a3
DIFF: https://github.com/llvm/llvm-project/commit/c734377544fc5a854c539fafc9b9b658f12230a3.diff

LOG: [DAG] foldMaskedMerge - fix Wparentheses operator precedence warning. NFC.

Added: 
    

Modified: 
    llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index a6b9cc81edde6..701a76c4cc6b6 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -7214,9 +7214,8 @@ static SDValue foldMaskedMerge(SDNode *Node, SelectionDAG &DAG,
                                const TargetLowering &TLI, const SDLoc &DL) {
   // Note that masked-merge variants using XOR or ADD expressions are
   // normalized to OR by InstCombine so we only check for OR or AND.
-  assert(Node->getOpcode() == ISD::OR ||
-         Node->getOpcode() == ISD::AND &&
-             "Must be called with ISD::OR or ISD::AND node");
+  assert((Node->getOpcode() == ISD::OR || Node->getOpcode() == ISD::AND) &&
+         "Must be called with ISD::OR or ISD::AND node");
 
   // If the target supports and-not, don't fold this.
   if (TLI.hasAndNot(SDValue(Node, 0)))


        


More information about the llvm-commits mailing list