File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
mlir/lib/Conversion/MeshToMPI Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -240,13 +240,12 @@ struct ConvertUpdateHaloOp
240240 auto loc = op.getLoc ();
241241
242242 // convert a OpFoldResult into a Value
243- auto toValue = [&rewriter, &loc](OpFoldResult &v) {
244- return isa<Value>(v)
245- ? cast<Value>(v)
246- : rewriter.create <::mlir::arith::ConstantOp>(
247- loc,
248- rewriter.getIndexAttr (
249- cast<IntegerAttr>(cast<Attribute>(v)).getInt ()));
243+ auto toValue = [&rewriter, &loc](OpFoldResult &v) -> Value {
244+ if (auto value = dyn_cast<Value>(v))
245+ return value;
246+ return rewriter.create <::mlir::arith::ConstantOp>(
247+ loc, rewriter.getIndexAttr (
248+ cast<IntegerAttr>(cast<Attribute>(v)).getInt ()));
250249 };
251250
252251 auto dest = op.getDestination ();
You can’t perform that action at this time.
0 commit comments