[Mlir-commits] [mlir] 63022c4 - [mlir][gpu] Fix GCC -Wparenthesis warning

Christian Sigg llvmlistbot at llvm.org
Tue Oct 4 11:58:16 PDT 2022


Author: Christian Sigg
Date: 2022-10-04T20:58:02+02:00
New Revision: 63022c48101b37a499ff850f96dfc1c65b9593f1

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

LOG: [mlir][gpu] Fix GCC -Wparenthesis warning

Added: 
    

Modified: 
    mlir/lib/Conversion/SCFToGPU/SCFToGPU.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Conversion/SCFToGPU/SCFToGPU.cpp b/mlir/lib/Conversion/SCFToGPU/SCFToGPU.cpp
index 73a115477cda3..26361a3f99d78 100644
--- a/mlir/lib/Conversion/SCFToGPU/SCFToGPU.cpp
+++ b/mlir/lib/Conversion/SCFToGPU/SCFToGPU.cpp
@@ -344,7 +344,7 @@ static Value deriveStaticUpperBound(Value upperBound,
                   .getDefiningOp())) {
         // Assumptions about the upper bound of minimum computations no longer
         // work if multiplied by mixed signs, so abort in this case.
-        if (lhs.value() < 0 != rhs.value() < 0)
+        if ((lhs.value() < 0) != (rhs.value() < 0))
           return {};
 
         return rewriter.create<arith::ConstantIndexOp>(


        


More information about the Mlir-commits mailing list