Skip to content

Commit

Permalink
Fixed order.
Browse files Browse the repository at this point in the history
  • Loading branch information
vzakhari committed Jan 28, 2025
1 parent a9a9783 commit 636319a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flang/lib/Optimizer/HLFIR/Transforms/BufferizeHLFIR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -359,10 +359,10 @@ struct GetLengthOpConversion
fir::FirOpBuilder builder(rewriter, getLength.getOperation());
hlfir::Entity bufferizedExpr = getBufferizedExprStorage(adaptor.getExpr());
mlir::Value length = hlfir::genCharLength(loc, builder, bufferizedExpr);
length = builder.createConvert(loc, builder.getIndexType(), length);
if (!length)
return rewriter.notifyMatchFailure(
getLength, "could not deduce length from GetLengthOp operand");
length = builder.createConvert(loc, builder.getIndexType(), length);
rewriter.replaceOp(getLength, length);
return mlir::success();
}
Expand Down

0 comments on commit 636319a

Please sign in to comment.