[llvm] e633f8c - [InstCombine] Fix a Wparentheses warning in an assert. NFC

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 30 13:15:37 PDT 2022


Author: Craig Topper
Date: 2022-06-30T13:03:32-07:00
New Revision: e633f8cd1411b0465bde3d92523c2fb97a5f9922

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

LOG: [InstCombine] Fix a Wparentheses warning in an assert. NFC

Added: 
    

Modified: 
    llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
index 2e97df7402c3..a75cc41c2fed 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
@@ -2239,7 +2239,7 @@ Instruction *InstCombinerImpl::foldICmpShrConstant(ICmpInst &Cmp,
         (Pred == CmpInst::ICMP_UGT || Pred == CmpInst::ICMP_ULT)) {
       bool IsUGT = Pred == CmpInst::ICMP_UGT;
       assert(ShiftValC->uge(C) && "Expected simplify of compare");
-      assert(IsUGT || !C.isZero() && "Expected X u< 0 to simplify");
+      assert((IsUGT || !C.isZero()) && "Expected X u< 0 to simplify");
 
       unsigned CmpLZ =
           IsUGT ? C.countLeadingZeros() : (C - 1).countLeadingZeros();


        


More information about the llvm-commits mailing list