[mlir][Vector] Fix unused variable warning in release builds. NFCI.
authorBenjamin Kramer <benny.kra@googlemail.com>
Mon, 29 Aug 2022 12:02:31 +0000 (14:02 +0200)
committerBenjamin Kramer <benny.kra@googlemail.com>
Mon, 29 Aug 2022 12:02:31 +0000 (14:02 +0200)
mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp

index ce1168d..26ea7f3 100644 (file)
@@ -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!