[flang-commits] [flang] [flang][FIRToMemRef] Look through zero-offset views to find fir.array_coor (PR #215402)

Susan Tan ス-ザン タン via flang-commits flang-commits at lists.llvm.org
Thu Sep 3 10:07:07 PDT 2026


================
@@ -0,0 +1,108 @@
+// Test that zero-offset FortranObjectViewOpInterface ops wrapping a
+// fir.array_coor are peeled through, so the array_coor is still lowered to a
+// bounds-aware memref access instead of being treated as an opaque scalar
+// reference. fir.volatile_cast is a peel barrier.
+// RUN: fir-opt %s --fir-to-memref --allow-unregistered-dialect | FileCheck %s
+// The pass must not introduce any fir.convert that drops volatility.
+// RUN: fir-opt %s --strict-fir-volatile-verifier --fir-to-memref -o /dev/null
----------------
SusanTan wrote:

RUN 1 says "the lowering produces the right IR", and RUN 2 says "the lowering doesn't break volatile semantics". These are orthogonal properties tested under different verification strictness levels.

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


More information about the flang-commits mailing list