re PR tree-optimization/70729 (Loop marked with omp simd pragma is not vectorized)
authorRichard Biener <rguenther@suse.de>
Thu, 19 May 2016 07:39:52 +0000 (07:39 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 19 May 2016 07:39:52 +0000 (07:39 +0000)
2016-05-19  Richard Biener  <rguenther@suse.de>

PR tree-optimization/70729
* passes.def: Move LIM pass before PRE.  Remove no longer
required copyprop and move first DCE out of the loop pipeline.

* gcc.dg/autopar/outer-6.c: Adjust to avoid redundant store.
* gcc.dg/graphite/scop-18.c: Likewise.
* gcc.dg/pr41783.c: Disable LIM.
* gcc.dg/tree-ssa/loadpre10.c: Likewise.
* gcc.dg/tree-ssa/loadpre23.c: Likewise.
* gcc.dg/tree-ssa/loadpre24.c: Likewise.
* gcc.dg/tree-ssa/loadpre25.c: Likewise.
* gcc.dg/tree-ssa/loadpre4.c: Likewise.
* gcc.dg/tree-ssa/loadpre8.c: Likewise.
* gcc.dg/tree-ssa/ssa-pre-16.c: Likewise.
* gcc.dg/tree-ssa/ssa-pre-18.c: Likewise.
* gcc.dg/tree-ssa/ssa-pre-20.c: Likewise.
* gcc.dg/tree-ssa/ssa-pre-3.c: Likewise.
* gfortran.dg/pr42108.f90: Likewise.

From-SVN: r236440

17 files changed:
gcc/ChangeLog
gcc/passes.def
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/autopar/outer-6.c
gcc/testsuite/gcc.dg/graphite/scop-18.c
gcc/testsuite/gcc.dg/pr41783.c
gcc/testsuite/gcc.dg/tree-ssa/loadpre10.c
gcc/testsuite/gcc.dg/tree-ssa/loadpre23.c
gcc/testsuite/gcc.dg/tree-ssa/loadpre24.c
gcc/testsuite/gcc.dg/tree-ssa/loadpre25.c
gcc/testsuite/gcc.dg/tree-ssa/loadpre4.c
gcc/testsuite/gcc.dg/tree-ssa/loadpre8.c
gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-16.c
gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-18.c
gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-20.c
gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-3.c
gcc/testsuite/gfortran.dg/pr42108.f90

index cde433e3d0546fd088f349a4e602bccf198f2465..63fe8002db0e4c3b36753ec0f421938e6b424b91 100644 (file)
@@ -1,3 +1,9 @@
+2016-05-19  Richard Biener  <rguenther@suse.de>
+
+       PR tree-optimization/70729
+       * passes.def: Move LIM pass before PRE.  Remove no longer
+       required copyprop and move first DCE out of the loop pipeline.
+
 2016-05-18  David Malcolm  <dmalcolm@redhat.com>
 
        PR driver/69265
index 21427d7b6e76636b7d39916e7116d2f55c5ce116..993ed28628b3be8b708433403f516ad360727e39 100644 (file)
@@ -243,12 +243,14 @@ along with GCC; see the file COPYING3.  If not see
       NEXT_PASS (pass_cse_sincos);
       NEXT_PASS (pass_optimize_bswap);
       NEXT_PASS (pass_laddress);
+      NEXT_PASS (pass_lim);
       NEXT_PASS (pass_split_crit_edges);
       NEXT_PASS (pass_pre);
       NEXT_PASS (pass_sink_code);
       NEXT_PASS (pass_sancov);
       NEXT_PASS (pass_asan);
       NEXT_PASS (pass_tsan);
+      NEXT_PASS (pass_dce);
       /* Pass group that runs when 1) enabled, 2) there are loops
         in the function.  Make sure to run pass_fix_loops before
         to discover/remove loops before running the gate function
@@ -257,9 +259,6 @@ along with GCC; see the file COPYING3.  If not see
       NEXT_PASS (pass_tree_loop);
       PUSH_INSERT_PASSES_WITHIN (pass_tree_loop)
          NEXT_PASS (pass_tree_loop_init);
-         NEXT_PASS (pass_lim);
-         NEXT_PASS (pass_copy_prop);
-         NEXT_PASS (pass_dce);
          NEXT_PASS (pass_tree_unswitch);
          NEXT_PASS (pass_scev_cprop);
          NEXT_PASS (pass_record_bounds);
index 642fee3ff0546cb778d6638d2fbb61e08933a92a..d14ebefc563e477f5b8ef0171afa19e2099a8829 100644 (file)
@@ -1,3 +1,21 @@
+2016-05-19  Richard Biener  <rguenther@suse.de>
+
+       PR tree-optimization/70729
+       * gcc.dg/autopar/outer-6.c: Adjust to avoid redundant store.
+       * gcc.dg/graphite/scop-18.c: Likewise.
+       * gcc.dg/pr41783.c: Disable LIM.
+       * gcc.dg/tree-ssa/loadpre10.c: Likewise.
+       * gcc.dg/tree-ssa/loadpre23.c: Likewise.
+       * gcc.dg/tree-ssa/loadpre24.c: Likewise.
+       * gcc.dg/tree-ssa/loadpre25.c: Likewise.
+       * gcc.dg/tree-ssa/loadpre4.c: Likewise.
+       * gcc.dg/tree-ssa/loadpre8.c: Likewise.
+       * gcc.dg/tree-ssa/ssa-pre-16.c: Likewise.
+       * gcc.dg/tree-ssa/ssa-pre-18.c: Likewise.
+       * gcc.dg/tree-ssa/ssa-pre-20.c: Likewise.
+       * gcc.dg/tree-ssa/ssa-pre-3.c: Likewise.
+       * gfortran.dg/pr42108.f90: Likewise.
+
 2016-05-18  David Malcolm  <dmalcolm@redhat.com>
 
        PR driver/69265
index fff7bce138aaa433dd485d6f18d1286e1c368312..7aae803acd92a67b9404039a6db3aae82c361278 100644 (file)
@@ -24,7 +24,7 @@ void parloop (int N)
   for (i = 0; i < N; i++)
   {
     for (j = 0; j < N; j++)
-      y[i]=x[i][j];
+      y[i]+=x[i][j];
     sum += y[i];
   }
   g_sum = sum;
index 3416304075d3b13d7b931192b518508f90df2174..fe2a5bf9709d20fca738a6ff2d31df4cb419edc7 100644 (file)
@@ -13,13 +13,13 @@ void test (void)
   for (i = 0; i < 24; i++)
     for (j = 0; j < 24; j++)
       for (k = 0; k < 24; k++)
-        A[i][j] = B[i][k] * C[k][j];
+        A[i][j] += B[i][k] * C[k][j];
 
   /* These loops should still be strip mined.  */
   for (i = 0; i < 1000; i++)
     for (j = 0; j < 1000; j++)
       for (k = 0; k < 1000; k++)
-        A[i][j] = B[i][k] * C[k][j];
+        A[i][j] += B[i][k] * C[k][j];
 }
 
 /* { dg-final { scan-tree-dump-times "number of SCoPs: 1" 1 "graphite"} } */
index 3d8006c579d3404697c4b2dac5c7348a67f0b8ac..465b0af872c49a430f1a5f92b3a9b9fa3efefd10 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O3 -fdump-tree-pre" } */
+/* { dg-options "-O3 -fdump-tree-pre -fno-tree-loop-im" } */
 int db[100];
 int a_global_var, fact;
 int main()
index 543e1a69294e4fcbe135bdc945a99a725831f264..c6ee35c8d94e779fa9ec5dcf3abb086c8910f3d2 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */ 
-/* { dg-options "-O2 -fdump-tree-pre-stats" } */
+/* { dg-options "-O2 -fdump-tree-pre-stats -fno-tree-loop-im" } */
 struct tree_common 
 { 
   int code; 
index 9fa073154150d008517560f1a9aafece31ccf817..42b08f0dfa8c35ae8b94609dc82797c58c24540d 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */ 
-/* { dg-options "-O2 -fdump-tree-pre-stats" } */
+/* { dg-options "-O2 -fdump-tree-pre-stats -fno-tree-loop-im" } */
 
 struct {
   int a;
index bd7275f76e9ad42910bfc6c78dfcc90c16d9e71e..56e4279049c31c94b8ecd565bb1ed6d887d95654 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-pre-stats" } */
+/* { dg-options "-O2 -fdump-tree-pre-stats -fno-tree-loop-im" } */
 
 int a;
 
index 8418c309616059bc343d5e986547644cebf0435e..d1a9e4e105da3c53efea60df94c2b00533953973 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-pre-stats" } */
+/* { dg-options "-O2 -fdump-tree-pre-stats -fno-tree-loop-im" } */
 struct X { int i; };
 int foo(struct X *a, int argc)
 {
index 2ca7e393cdf3a31ffd34f844b6c559ab07a77ec2..6eaf690189204a4016d030844030b0205f53b2ad 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */ 
-/* { dg-options "-O2 -fdump-tree-pre-stats" } */
+/* { dg-options "-O2 -fdump-tree-pre-stats -fno-tree-loop-im" } */
 int main(int *a, int argc)
 {
   int i;
index db5937fc031dc483b739068cdf2e91fa3d669318..2abb0d216219083f25e87153e96a9d7ca86b7724 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */ 
-/* { dg-options "-O2 -fdump-tree-pre-stats -std=gnu89" } */
+/* { dg-options "-O2 -fdump-tree-pre-stats -std=gnu89 -fno-tree-loop-im" } */
 typedef union tree_node *tree;
 struct tree_common
 {
index f2ec5d7eda21d047a24de4160f28a98c658a6c86..69cc517f9de9f4eb79ca507bb88af6757688cf89 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */ 
-/* { dg-options "-O2 -fdump-tree-pre-stats -std=c99" } */
+/* { dg-options "-O2 -fdump-tree-pre-stats -std=c99 -fno-tree-loop-im" } */
 int foo(int k, int *x)
 {
   int j=0;
index 483f8228260f8727d8c13c62a9420a3fb70399ad..ea2a7aee56bf4601f8693cf64946dd9ddfb3a621 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-pre-details" } */
+/* { dg-options "-O2 -fdump-tree-pre-details -fno-tree-loop-im" } */
 
 struct Bar { int a; int b; };
 struct Foo { int x; struct Bar y; };
index c8a23df831035257318f5b808f40b83faffcf41f..39ed2efb7c5d212fdafa7755ba1f3b85d3dc6048 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-pre-stats" } */
+/* { dg-options "-O2 -fdump-tree-pre-stats -fno-tree-loop-im" } */
 
 double pcheck;
 
index ba2c8eaaa8dc3fd6e192b9eea7ef5c12082ec850..7e319ed2fbdb3a7d000597e7fbebdff6f77a0cc5 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */ 
-/* { dg-options "-O2 -fdump-tree-pre-stats" } */
+/* { dg-options "-O2 -fdump-tree-pre-stats -fno-tree-loop-im" } */
 unsigned foo1 (unsigned a, unsigned b, unsigned j, unsigned k)
 {
   unsigned i;
index c823edbf7924ff15506e98148397e35966400f86..eb93604e6b035973b0a1c74059f3ad0a7b470be3 100644 (file)
@@ -1,5 +1,5 @@
 ! { dg-do compile }
-! { dg-options "-O2 -fdump-tree-fre1 -fdump-tree-pre-details" }
+! { dg-options "-O2 -fdump-tree-fre1 -fdump-tree-pre-details -fno-tree-loop-im" }
 
 subroutine  eval(foo1,foo2,foo3,foo4,x,n,nnd)
   implicit real*8 (a-h,o-z)