Fix unused variable in release build.

Differential Revision: https://reviews.llvm.org/D108963
This commit is contained in:
MaheshRavishankar 2021-08-30 19:29:34 -07:00
parent f10d003b0c
commit 2dfb66833f

View file

@ -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) {