re PR tree-optimization/84777 (-Os inhibits all vectorization)
authorRichard Biener <rguenther@suse.de>
Mon, 12 Mar 2018 08:45:54 +0000 (08:45 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 12 Mar 2018 08:45:54 +0000 (08:45 +0000)
2018-03-12  Richard Biener  <rguenther@suse.de>

PR tree-optimization/84777
* tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
force-vectorize loops ignore whether we are optimizing for size.

From-SVN: r258444

gcc/ChangeLog
gcc/tree-ssa-loop-ch.c

index 59aa9f388e23d783ac3275cb5158c86f3b14b7c3..bc08bae91febed42387026880178d6c44032f3d2 100644 (file)
@@ -1,3 +1,9 @@
+2018-03-12  Richard Biener  <rguenther@suse.de>
+
+       PR tree-optimization/84777
+       * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
+       force-vectorize loops ignore whether we are optimizing for size.
+
 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
 
        * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
index b2dee48e5d7f9455c072c36fddbff3d662c9f32a..488999dd8ce3c17bbc54a78e5156e47b5e3de7cd 100644 (file)
@@ -57,7 +57,8 @@ should_duplicate_loop_header_p (basic_block header, struct loop *loop,
      be true, since quite often it is possible to verify that the condition is
      satisfied in the first iteration and therefore to eliminate it.  Jump
      threading handles these cases now.  */
-  if (optimize_loop_for_size_p (loop))
+  if (optimize_loop_for_size_p (loop)
+      && !loop->force_vectorize)
     {
       if (dump_file && (dump_flags & TDF_DETAILS))
        fprintf (dump_file,