[flang-commits] [flang] [flang] [test] add tests for FIRToSCF (PR #176026)

Scott Manley via flang-commits flang-commits at lists.llvm.org
Thu Jan 15 14:56:00 PST 2026


================
@@ -0,0 +1,117 @@
+// RUN: fir-opt %s --fir-to-scf --allow-unregistered-dialect | FileCheck %s
+
+// derived from:
+// subroutine ido3
+//   integer :: j
+//   write(*,*,err=404) (j,j=1,10)
+// 404 continue
+// end subroutine
+
+// CHECK-LABEL: func.func @iterate_while
+// CHECK:       scf.while (%[[IV:.*]] = %c1, %[[OK:.*]] = %true) : (index, i1) -> (index, i1) {
+// CHECK:         arith.cmpi
+// CHECK:         arith.cmpi
+// CHECK:         arith.andi
+// CHECK:         scf.condition
----------------
rscottmanley wrote:

Should the four instructions above need to have more detailed checks? It's a functional issue if these were built incorrectly right?

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


More information about the flang-commits mailing list