[flang-commits] [clang] [flang] [flang] Add -f[no-]unroll-loops flag (PR #122906)
Kiran Chandramohan via flang-commits
flang-commits at lists.llvm.org
Tue Jan 14 09:14:55 PST 2025
================
@@ -0,0 +1,37 @@
+! RUN: %flang_fc1 -emit-llvm -O1 -funroll-loops -mllvm -force-vector-width=2 -o- %s | FileCheck %s --check-prefixes=CHECK,UNROLL
+! RUN: %flang_fc1 -emit-llvm -O2 -mllvm -force-vector-width=2 -o- %s | FileCheck %s --check-prefixes=CHECK,UNROLL
+! RUN: %flang_fc1 -emit-llvm -O1 -fno-unroll-loops -mllvm -force-vector-width=2 -o- %s | FileCheck %s --check-prefixes=CHECK,NO-UNROLL
+! RUN: %flang_fc1 -emit-llvm -O1 -mllvm -force-vector-width=2 -o- %s | FileCheck %s --check-prefixes=CHECK,NO-UNROLL
+
+! CHECK-LABEL: @unroll
+! CHECK-SAME: (ptr nocapture writeonly %[[ARG0:.*]])
+subroutine unroll(a)
+ real(kind=8), intent(out) :: a(1000)
----------------
kiranchandramohan wrote:
Can this be an integer array to avoid the `uitofp` ?
https://github.com/llvm/llvm-project/pull/122906
More information about the flang-commits
mailing list