From: Kazu Hirata Date: Sat, 15 Oct 2022 19:40:02 +0000 (-0700) Subject: [mlir] Fix warnings X-Git-Tag: upstream/17.0.6~30436 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=75076f8dd75361244e1861fd7b85e18710e4026c;p=platform%2Fupstream%2Fllvm.git [mlir] Fix warnings 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] --- 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())