[flang-commits] [flang] [flang][rfc] Add represention of volatile references (PR #132486)

Asher Mancinelli via flang-commits flang-commits at lists.llvm.org
Mon Mar 31 13:57:40 PDT 2025


================
@@ -3253,16 +3255,18 @@ struct LoadOpConversion : public fir::FIROpConversion<fir::LoadOp> {
       mlir::Value boxSize =
           computeBoxSize(loc, boxTypePair, inputBoxStorage, rewriter);
       auto memcpy = rewriter.create<mlir::LLVM::MemcpyOp>(
-          loc, newBoxStorage, inputBoxStorage, boxSize, /*isVolatile=*/false);
+          loc, newBoxStorage, inputBoxStorage, boxSize, isVolatile);
 
       if (std::optional<mlir::ArrayAttr> optionalTag = load.getTbaa())
         memcpy.setTBAATags(*optionalTag);
       else
         attachTBAATag(memcpy, boxTy, boxTy, nullptr);
       rewriter.replaceOp(load, newBoxStorage);
     } else {
+      // TODO: are we losing any attributes from the load op?
----------------
ashermancinelli wrote:

They are being propagated to the load operations again.

https://github.com/llvm/llvm-project/pull/132486


More information about the flang-commits mailing list