[flang-commits] [flang] [llvm] [flang] Support static-unit array slices in FIR LoopVersioning (PR #222723)

via flang-commits flang-commits at lists.llvm.org
Fri Sep 18 12:51:50 PDT 2026


================
@@ -0,0 +1,649 @@
+! RUN: %flang_fc1 -emit-fir -O3 %s -o - | \
+! RUN:   fir-opt --verify-each --loop-versioning | \
+! RUN:   FileCheck %s --enable-var-scope
+! RUN: %flang -S -O3 -fversion-loops-for-stride \
+! RUN:   -mmlir --mlir-disable-threading \
+! RUN:   -mmlir --mlir-print-ir-after=loop-versioning \
+! RUN:   %s -o /dev/null 2>&1 | \
+! RUN:   FileCheck %s --check-prefix=DRIVER --enable-var-scope
+! RUN: %flang -S -O3 -fversion-loops-for-stride \
+! RUN:   -fdefault-integer-8 -fdefault-real-8 \
+! RUN:   -mmlir --mlir-disable-threading \
+! RUN:   -mmlir --mlir-print-ir-after=loop-versioning \
+! RUN:   %s -o /dev/null 2>&1 | \
+! RUN:   FileCheck %s --check-prefix=WIDE --enable-var-scope
----------------
jeanPerier wrote:

I do not think the "-fdefault-integer-8 -fdefault-real-8" adds much given you are already testing both real(8) and real array accesses in the sources so you are already proving that the data type size is correctly accounted for. This is making the test longer to read/run/maintain for little gains. I would suggest not doing the  "-fdefault-integer-8 -fdefault-real-8" runs.

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


More information about the flang-commits mailing list