From: Benjamin Kramer Date: Mon, 29 Aug 2022 12:02:31 +0000 (+0200) Subject: [mlir][Vector] Fix unused variable warning in release builds. NFCI. X-Git-Tag: upstream/17.0.6~35074 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fe09cee34a6572f06bd3f230d1f14337ecab34b9;p=platform%2Fupstream%2Fllvm.git [mlir][Vector] Fix unused variable warning in release builds. NFCI. --- diff --git a/mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp b/mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp index ce1168d..26ea7f3 100644 --- a/mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp +++ b/mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp @@ -595,11 +595,13 @@ public: // Get rank and dimension sizes. int64_t rank = vectorType.getRank(); +#ifndef NDEBUG bool wellFormed0DCase = v1Type.getRank() == 0 && v2Type.getRank() == 0 && rank == 1; bool wellFormedNDCase = v1Type.getRank() == rank && v2Type.getRank() == rank; assert((wellFormed0DCase || wellFormedNDCase) && "op is not well-formed"); +#endif // For rank 0 and 1, where both operands have *exactly* the same vector // type, there is direct shuffle support in LLVM. Use it!