diff options
author | Stefan Schulze Frielinghaus <stefansf@linux.ibm.com> | 2024-05-08 10:48:45 +0200 |
---|---|---|
committer | Stefan Schulze Frielinghaus <stefansf@linux.ibm.com> | 2024-05-08 10:48:45 +0200 |
commit | e755f478c24c3e99409936af545ac83d35d27ad9 (patch) | |
tree | e5fac73d52f19c89ec4d56697e543d17e2335a22 | |
parent | 41bc359c322d45ec1adfb51f7a45c7ef02ce6ca9 (diff) | |
download | gcc-e755f478c24c3e99409936af545ac83d35d27ad9.zip gcc-e755f478c24c3e99409936af545ac83d35d27ad9.tar.gz gcc-e755f478c24c3e99409936af545ac83d35d27ad9.tar.bz2 |
tree-ssa-loop-prefetch.cc: Honour -fno-unroll-loops
This fixes a couple of tests (gcc.dg/vect/pr109011-*.c) on s390 where
loops are unrolled although -fno-unroll-loops is specified.
gcc/ChangeLog:
* tree-ssa-loop-prefetch.cc (determine_unroll_factor): Honour
-fno-unroll-loops.
-rw-r--r-- | gcc/tree-ssa-loop-prefetch.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/tree-ssa-loop-prefetch.cc b/gcc/tree-ssa-loop-prefetch.cc index 70073cc..bb5d5de 100644 --- a/gcc/tree-ssa-loop-prefetch.cc +++ b/gcc/tree-ssa-loop-prefetch.cc @@ -1401,6 +1401,10 @@ determine_unroll_factor (class loop *loop, struct mem_ref_group *refs, struct mem_ref_group *agp; struct mem_ref *ref; + /* Bail out early in case we must not unroll loops. */ + if (!flag_unroll_loops) + return 1; + /* First check whether the loop is not too large to unroll. We ignore PARAM_MAX_UNROLL_TIMES, because for small loops, it prevented us from unrolling them enough to make exactly one cache line covered by each |