From 75076f8dd75361244e1861fd7b85e18710e4026c Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 15 Oct 2022 12:40:02 -0700 Subject: [PATCH] [mlir] Fix warnings MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This patch fixes: mlir/lib/Dialect/Math/Transforms/PolynomialApproximation.cpp:171:30: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses] mlir/lib/Dialect/Math/Transforms/PolynomialApproximation.cpp:283:30: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses] --- mlir/lib/Dialect/Math/Transforms/PolynomialApproximation.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mlir/lib/Dialect/Math/Transforms/PolynomialApproximation.cpp b/mlir/lib/Dialect/Math/Transforms/PolynomialApproximation.cpp index abffadf..6413d50 100644 --- a/mlir/lib/Dialect/Math/Transforms/PolynomialApproximation.cpp +++ b/mlir/lib/Dialect/Math/Transforms/PolynomialApproximation.cpp @@ -167,8 +167,8 @@ handleMultidimensionalVectors(ImplicitLocOpBuilder &builder, static Value floatCst(ImplicitLocOpBuilder &builder, float value, Type elementType) { - assert(elementType.isF16() || - elementType.isF32() && "x must be f16 or f32 type."); + assert((elementType.isF16() || elementType.isF32()) && + "x must be f16 or f32 type."); return builder.create( builder.getFloatAttr(elementType, value)); } @@ -279,8 +279,8 @@ namespace { Value makePolynomialCalculation(ImplicitLocOpBuilder &builder, llvm::ArrayRef coeffs, Value x) { Type elementType = getElementTypeOrSelf(x); - assert(elementType.isF32() || - elementType.isF16() && "x must be f32 or f16 type"); + assert((elementType.isF32() || elementType.isF16()) && + "x must be f32 or f16 type"); ArrayRef shape = vectorShape(x); if (coeffs.empty()) -- 2.7.4