[Mlir-commits] [mlir] 2dfb668 - Fix unused variable in release build.
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Mon Aug 30 19:35:24 PDT 2021
Author: MaheshRavishankar
Date: 2021-08-30T19:34:52-07:00
New Revision: 2dfb66833fd23a0bf03c3e610e9b985a8141a4cf
URL: https://github.com/llvm/llvm-project/commit/2dfb66833fd23a0bf03c3e610e9b985a8141a4cf
DIFF: https://github.com/llvm/llvm-project/commit/2dfb66833fd23a0bf03c3e610e9b985a8141a4cf.diff
LOG: Fix unused variable in release build.
Differential Revision: https://reviews.llvm.org/D108963
Added:
Modified:
mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp b/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
index 8172eac2ef1f5..ddcb6a6a283f4 100644
--- a/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
+++ b/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
@@ -1214,9 +1214,8 @@ static Value getAsValue(OpBuilder &builder, Location loc, OpFoldResult ofr) {
if (auto val = ofr.dyn_cast<Value>())
return val;
auto intVal = getConstantIntValue(ofr);
- auto intAttr = ofr.dyn_cast<Attribute>().dyn_cast_or_null<IntegerAttr>();
assert(intVal && "expected Value or IntegerAttr");
- return builder.create<ConstantIndexOp>(loc, intAttr.getInt());
+ return builder.create<ConstantIndexOp>(loc, *intVal);
}
SmallVector<Value> PadTensorOp::getDestinationOperands(OpBuilder &b) {
More information about the Mlir-commits
mailing list