Skip to content

Commit 54a16b9

Browse files
committed
Added AbsentOp.
1 parent 8ad429c commit 54a16b9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

flang/lib/Optimizer/Transforms/SetRuntimeCallAttributes.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ static mlir::LLVM::MemoryEffectsAttr getGenericMemoryAttr(fir::CallOp callOp) {
6060
for (auto arg : callOp.getArgOperands()) {
6161
mlir::Type argType = arg.getType();
6262
if (mlir::isa<fir::BaseBoxType>(argType)) {
63-
// If it is a null box, then this particular call
63+
// If it is a null/absent box, then this particular call
6464
// cannot access memory indirectly through the box's
6565
// base_addr.
6666
auto def = arg.getDefiningOp();
67-
if (!def || !mlir::isa<fir::ZeroOp>(def)) {
67+
if (!mlir::isa_and_nonnull<fir::ZeroOp, fir::AbsentOp>(def)) {
6868
maybeIndirectAccess = true;
6969
break;
7070
}

0 commit comments

Comments
 (0)