diff options
author | Bin Cheng <bin.cheng@arm.com> | 2016-10-13 11:05:53 +0000 |
---|---|---|
committer | Bin Cheng <amker@gcc.gnu.org> | 2016-10-13 11:05:53 +0000 |
commit | b8a4b8c838f2796acd1dc1e5f89ba71701f8f135 (patch) | |
tree | a31af6e945eb8035a06d564e234553169a350e31 /gcc/tree-predcom.c | |
parent | a5e3d6146d07611eb967befec4dc480c8a19db0d (diff) | |
download | gcc-b8a4b8c838f2796acd1dc1e5f89ba71701f8f135.zip gcc-b8a4b8c838f2796acd1dc1e5f89ba71701f8f135.tar.gz gcc-b8a4b8c838f2796acd1dc1e5f89ba71701f8f135.tar.bz2 |
tree-predcom.c (tree_predictive_commoning_loop): Skip loop that only iterates 1 time.
* tree-predcom.c (tree_predictive_commoning_loop): Skip loop that only
iterates 1 time.
gcc/testsuite
* gfortran.dg/vect/fast-math-mgrid-resid.f: New test string.
From-SVN: r241100
Diffstat (limited to 'gcc/tree-predcom.c')
-rw-r--r-- | gcc/tree-predcom.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/tree-predcom.c b/gcc/tree-predcom.c index 096365a..14d53c2 100644 --- a/gcc/tree-predcom.c +++ b/gcc/tree-predcom.c @@ -2465,6 +2465,15 @@ tree_predictive_commoning_loop (struct loop *loop) if (dump_file && (dump_flags & TDF_DETAILS)) fprintf (dump_file, "Processing loop %d\n", loop->num); + /* Nothing for predicitive commoning if loop only iterates 1 time. */ + if (get_max_loop_iterations_int (loop) == 0) + { + if (dump_file && (dump_flags & TDF_DETAILS)) + fprintf (dump_file, "Loop iterates only 1 time, nothing to do.\n"); + + return false; + } + /* Find the data references and split them into components according to their dependence relations. */ auto_vec<loop_p, 3> loop_nest; |