[Mlir-commits] [mlir] fe09cee - [mlir][Vector] Fix unused variable warning in release builds. NFCI.

Benjamin Kramer llvmlistbot at llvm.org
Mon Aug 29 05:03:33 PDT 2022


Author: Benjamin Kramer
Date: 2022-08-29T14:02:31+02:00
New Revision: fe09cee34a6572f06bd3f230d1f14337ecab34b9

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

LOG: [mlir][Vector] Fix unused variable warning in release builds. NFCI.

Added: 
    

Modified: 
    mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp b/mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
index ce1168dbcfb33..26ea7f3631707 100644
--- a/mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
+++ b/mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
@@ -595,11 +595,13 @@ class VectorShuffleOpConversion
 
     // 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!


        


More information about the Mlir-commits mailing list