[llvm] 9cecee9 - [VPlan] Silence gcc Wparentheses warning [NFC]

Mikael Holmen via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 28 03:05:57 PDT 2023


Author: Mikael Holmen
Date: 2023-09-28T12:04:26+02:00
New Revision: 9cecee97a058794fa09a1fd8a0ff4a517c503a7d

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

LOG: [VPlan] Silence gcc Wparentheses warning [NFC]

Without the fix gcc warns about
../lib/Transforms/Vectorize/VPlanTransforms.cpp:968:42: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
  968 |          UseActiveLaneMaskForControlFlow &&
      |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
  969 |              "DataAndControlFlowWithoutRuntimeCheck implies "
      |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  970 |              "UseActiveLaneMaskForControlFlow");
      |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Added: 
    

Modified: 
    llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp b/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
index 692fecc2a87dd60..5cade16850f97f4 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
@@ -964,10 +964,10 @@ static VPActiveLaneMaskPHIRecipe *addVPLaneMaskPhiAndUpdateExitBranch(
 void VPlanTransforms::addActiveLaneMask(
     VPlan &Plan, bool UseActiveLaneMaskForControlFlow,
     bool DataAndControlFlowWithoutRuntimeCheck) {
-  assert(!DataAndControlFlowWithoutRuntimeCheck ||
-         UseActiveLaneMaskForControlFlow &&
-             "DataAndControlFlowWithoutRuntimeCheck implies "
-             "UseActiveLaneMaskForControlFlow");
+  assert((!DataAndControlFlowWithoutRuntimeCheck ||
+          UseActiveLaneMaskForControlFlow) &&
+         "DataAndControlFlowWithoutRuntimeCheck implies "
+         "UseActiveLaneMaskForControlFlow");
 
   auto FoundWidenCanonicalIVUser =
       find_if(Plan.getCanonicalIV()->users(),


        


More information about the llvm-commits mailing list