[llvm] 7cf1fef - Suppress some bitwise-or-of-bool warnings with explicit int cast

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 18 14:11:57 PDT 2021


Author: David Blaikie
Date: 2021-10-18T14:10:30-07:00
New Revision: 7cf1fef45f13991e2d3b97e0612cfb88bf906a50

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

LOG: Suppress some bitwise-or-of-bool warnings with explicit int cast

These look like they have intentional side effects that would break from
shortcircuiting.

Added: 
    

Modified: 
    llvm/examples/IRTransforms/SimplifyCFG.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/examples/IRTransforms/SimplifyCFG.cpp b/llvm/examples/IRTransforms/SimplifyCFG.cpp
index 82368d7494212..111d4538fae0f 100644
--- a/llvm/examples/IRTransforms/SimplifyCFG.cpp
+++ b/llvm/examples/IRTransforms/SimplifyCFG.cpp
@@ -354,17 +354,17 @@ static bool mergeIntoSinglePredecessor_v2(Function &F, DominatorTree &DT) {
 }
 
 static bool doSimplify_v1(Function &F) {
-  return eliminateCondBranches_v1(F) | mergeIntoSinglePredecessor_v1(F) |
+  return (int)eliminateCondBranches_v1(F) | mergeIntoSinglePredecessor_v1(F) |
          removeDeadBlocks_v1(F);
 }
 
 static bool doSimplify_v2(Function &F, DominatorTree &DT) {
-  return eliminateCondBranches_v2(F, DT) |
+  return (int)eliminateCondBranches_v2(F, DT) |
          mergeIntoSinglePredecessor_v2(F, DT) | removeDeadBlocks_v2(F, DT);
 }
 
 static bool doSimplify_v3(Function &F, DominatorTree &DT) {
-  return eliminateCondBranches_v3(F, DT) |
+  return (int)eliminateCondBranches_v3(F, DT) |
          mergeIntoSinglePredecessor_v2(F, DT) | removeDeadBlocks_v2(F, DT);
 }
 


        


More information about the llvm-commits mailing list