================ @@ -2776,6 +2776,15 @@ LogicalResult WinogradFilterTransformOp::verify() { // WinogradInputTransformOp //===----------------------------------------------------------------------===// +Value getValueFromOpFoldResult(OpFoldResult opFoldResult, OpBuilder &builder, + Location loc) { + if (auto attr = opFoldResult.dyn_cast<Attribute>()) { + auto intAttr = cast<IntegerAttr>(attr); + return builder.create<arith::ConstantOp>(loc, intAttr); + } + return opFoldResult.get<Value>(); +} ---------------- ftynse wrote:
https://github.com/llvm/llvm-project/blob/main/mlir/include/mlir/Dialect/Arith/Utils/Utils.h#L68-L72 it already exists https://github.com/llvm/llvm-project/pull/96184 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits