Skip to content

Commit 8b8ff48

Browse files
Check for null effect value instead of volatile resource
1 parent f84c4cc commit 8b8ff48

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -608,10 +608,9 @@ ElementalAssignBufferization::findMatch(hlfir::ElementalOp elemental) {
608608
return std::nullopt;
609609
}
610610

611-
// Don't allow any reads to or writes from volatile memory
612-
if (mlir::isa<mlir::MemoryEffects::Read, mlir::MemoryEffects::Write>(
613-
effect.getEffect()) &&
614-
mlir::isa<fir::VolatileMemoryResource>(effect.getResource())) {
611+
if (effect.getValue() == nullptr) {
612+
LLVM_DEBUG(llvm::dbgs()
613+
<< "side-effect with no value, cannot analyze further\n");
615614
return std::nullopt;
616615
}
617616

0 commit comments

Comments
 (0)