[llvm] 1db8b34 - [Matrix] Fold single-use variable into assert
Benjamin Kramer via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 19 13:43:02 PDT 2020
Author: Benjamin Kramer
Date: 2020-03-19T21:42:22+01:00
New Revision: 1db8b341a665fa456e4a399ab0b1cd230e5c2d6d
URL: https://github.com/llvm/llvm-project/commit/1db8b341a665fa456e4a399ab0b1cd230e5c2d6d
DIFF: https://github.com/llvm/llvm-project/commit/1db8b341a665fa456e4a399ab0b1cd230e5c2d6d.diff
LOG: [Matrix] Fold single-use variable into assert
Avoids -Wunused-variable warnings in Release builds.
Added:
Modified:
llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp b/llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp
index 4044daeef77d..3b66aa9c6e41 100644
--- a/llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp
+++ b/llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp
@@ -908,9 +908,8 @@ class LowerMatrixIntrinsics {
getMatrix(MatMul->getArgOperand(1), RShape, Builder);
const unsigned R = LShape.NumRows;
- const unsigned M = LShape.NumColumns;
const unsigned C = RShape.NumColumns;
- assert(M == RShape.NumRows);
+ assert(LShape.NumColumns == RShape.NumRows);
// Initialize the output
ColumnMatrixTy Result;
More information about the llvm-commits
mailing list