diff options
author | Bill Schmidt <wschmidt@linux.vnet.ibm.com> | 2016-11-17 14:22:17 +0000 |
---|---|---|
committer | William Schmidt <wschmidt@gcc.gnu.org> | 2016-11-17 14:22:17 +0000 |
commit | 54e63f002885fb595f17f39998e93bb9fc23a49d (patch) | |
tree | 08a821e036a22a2795343954aab882f7c8e78e47 /gcc/tree-if-conv.c | |
parent | 2fe3721128b991538b5a416ca1d8671901d0a1f1 (diff) | |
download | gcc-54e63f002885fb595f17f39998e93bb9fc23a49d.zip gcc-54e63f002885fb595f17f39998e93bb9fc23a49d.tar.gz gcc-54e63f002885fb595f17f39998e93bb9fc23a49d.tar.bz2 |
re PR tree-optimization/77848 (Gimple if-conversion results in redundant comparisons)
[gcc]
2016-11-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Richard Biener <rguenther@suse.de>
PR tree-optimization/77848
* tree-if-conv.c (tree_if_conversion): Always version loops unless
the user specified -ftree-loop-if-convert.
[gcc/testsuite]
2016-11-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Richard Biener <rguenther@suse.de>
PR tree-optimization/77848
* gfortran.dg/vect/pr77848.f: New test.
Co-Authored-By: Richard Biener <rguenther@suse.de>
From-SVN: r242550
Diffstat (limited to 'gcc/tree-if-conv.c')
-rw-r--r-- | gcc/tree-if-conv.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c index dc97fc4..1235faf 100644 --- a/gcc/tree-if-conv.c +++ b/gcc/tree-if-conv.c @@ -2803,10 +2803,12 @@ tree_if_conversion (struct loop *loop) || loop->dont_vectorize)) goto cleanup; - /* Either version this loop, or if the pattern is right for outer-loop - vectorization, version the outer loop. In the latter case we will - still if-convert the original inner loop. */ - if ((any_pred_load_store || any_complicated_phi) + /* Since we have no cost model, always version loops unless the user + specified -ftree-loop-if-convert. Either version this loop, or if + the pattern is right for outer-loop vectorization, version the + outer loop. In the latter case we will still if-convert the + original inner loop. */ + if (flag_tree_loop_if_convert != 1 && !version_loop_for_if_conversion (versionable_outer_loop_p (loop_outer (loop)) ? loop_outer (loop) : loop)) |