Skip to content

Commit 4d6f72f

Browse files
committed
simplify check
1 parent 1804748 commit 4d6f72f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

flang/lib/Optimizer/HLFIR/Transforms/BufferizeHLFIR.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -808,8 +808,7 @@ struct ElementalOpConversion
808808
if (asExpr->hasOneUse() && !asExpr.isMove()) {
809809
// Check that the asExpr is the final operation before the yield,
810810
// otherwise, clean-ups could impact the memory being re-used.
811-
mlir::Operation *nextOp = asExpr->getNextNode();
812-
if (nextOp && nextOp == yield.getOperation()) {
811+
if (asExpr->getNextNode() == yield.getOperation()) {
813812
elementValue = hlfir::Entity{asExpr.getVar()};
814813
rewriter.eraseOp(asExpr);
815814
}

0 commit comments

Comments
 (0)