diff mbox

[5/8] Add pass_lim to pass_oacc_kernels

Message ID 871tjd1ch2.fsf@kepler.schwinge.homeip.net
State New
Headers show

Commit Message

Thomas Schwinge April 21, 2015, 7:57 p.m. UTC
Hi!

On Tue, 25 Nov 2014 12:30:52 +0100, Tom de Vries <Tom_deVries@mentor.com> wrote:
> On 15-11-14 18:22, Tom de Vries wrote:
> > On 15-11-14 13:14, Tom de Vries wrote:
> >> I'm submitting a patch series with initial support for the oacc kernels
> >> directive.
> >>
> >> The patch series uses pass_parallelize_loops to implement parallelization of
> >> loops in the oacc kernels region.
> >>
> >> The patch series consists of these 8 patches:
> >> ...
> >>      1  Expand oacc kernels after pass_build_ealias
> >>      2  Add pass_oacc_kernels
> >>      3  Add pass_ch_oacc_kernels to pass_oacc_kernels
> >>      4  Add pass_tree_loop_{init,done} to pass_oacc_kernels
> >>      5  Add pass_loop_im to pass_oacc_kernels
> >>      6  Add pass_ccp to pass_oacc_kernels
> >>      7  Add pass_parloops_oacc_kernels to pass_oacc_kernels
> >>      8  Do simple omp lowering for no address taken var
> >> ...
> >
> > This patch adds pass_loop_im to pass group pass_oacc_kernels.
> >
> > We need this pass to simplify the loop body, and allow pass_parloops to detect
> > that loop iterations are independent.
> >
> 
> Updated for moving pass_oacc_kernels down past pass_fre in the pass list.
> 
> Bootstrapped and reg-tested as before.
> 
> OK for trunk?

Committed to gomp-4_0-branch in r222283:

commit 79112043cabc81c3a283585c9a28b6a1ab3826df
Author: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Tue Apr 21 19:55:42 2015 +0000

    Add pass_lim to pass_oacc_kernels
    
    	gcc/
    	* passes.def: Add pass_lim in pass group pass_ch_oacc_kernels.
    
    	gcc/testsuite/
    	* c-c++-common/restrict-2.c: Update for new pass_lim.
    	* c-c++-common/restrict-4.c: Same.
    	* g++.dg/tree-ssa/pr33615.C: Same.
    	* g++.dg/tree-ssa/restrict1.C: Same.
    	* gcc.dg/tm/pub-safety-1.c: Same.
    	* gcc.dg/tm/reg-promotion.c: Same.
    	* gcc.dg/tree-ssa/20050314-1.c: Same.
    	* gcc.dg/tree-ssa/loop-32.c: Same.
    	* gcc.dg/tree-ssa/loop-33.c: Same.
    	* gcc.dg/tree-ssa/loop-34.c: Same.
    	* gcc.dg/tree-ssa/loop-35.c: Same.
    	* gcc.dg/tree-ssa/loop-7.c: Same.
    	* gcc.dg/tree-ssa/pr23109.c: Same.
    	* gcc.dg/tree-ssa/restrict-3.c: Same.
    	* gcc.dg/tree-ssa/restrict-5.c: Same.
    	* gcc.dg/tree-ssa/ssa-lim-1.c: Same.
    	* gcc.dg/tree-ssa/ssa-lim-10.c: Same.
    	* gcc.dg/tree-ssa/ssa-lim-11.c: Same.
    	* gcc.dg/tree-ssa/ssa-lim-12.c: Same.
    	* gcc.dg/tree-ssa/ssa-lim-2.c: Same.
    	* gcc.dg/tree-ssa/ssa-lim-3.c: Same.
    	* gcc.dg/tree-ssa/ssa-lim-6.c: Same.
    	* gcc.dg/tree-ssa/ssa-lim-7.c: Same.
    	* gcc.dg/tree-ssa/ssa-lim-8.c: Same.
    	* gcc.dg/tree-ssa/ssa-lim-9.c: Same.
    	* gcc.dg/tree-ssa/structopt-1.c: Same.
    	* gfortran.dg/pr32921.f: Same.
    
    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gomp-4_0-branch@222283 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/ChangeLog.gomp                          |    2 ++
 gcc/passes.def                              |    1 +
 gcc/testsuite/ChangeLog.gomp                |   31 +++++++++++++++++++++++++++
 gcc/testsuite/c-c++-common/restrict-2.c     |    6 +++---
 gcc/testsuite/c-c++-common/restrict-4.c     |    6 +++---
 gcc/testsuite/g++.dg/tree-ssa/pr33615.C     |    6 +++---
 gcc/testsuite/g++.dg/tree-ssa/restrict1.C   |    6 +++---
 gcc/testsuite/gcc.dg/tm/pub-safety-1.c      |    6 +++---
 gcc/testsuite/gcc.dg/tm/reg-promotion.c     |    6 +++---
 gcc/testsuite/gcc.dg/tree-ssa/20050314-1.c  |    6 +++---
 gcc/testsuite/gcc.dg/tree-ssa/loop-32.c     |    6 +++---
 gcc/testsuite/gcc.dg/tree-ssa/loop-33.c     |    6 +++---
 gcc/testsuite/gcc.dg/tree-ssa/loop-34.c     |    6 +++---
 gcc/testsuite/gcc.dg/tree-ssa/loop-35.c     |    8 +++----
 gcc/testsuite/gcc.dg/tree-ssa/loop-7.c      |    6 +++---
 gcc/testsuite/gcc.dg/tree-ssa/pr23109.c     |    6 +++---
 gcc/testsuite/gcc.dg/tree-ssa/restrict-3.c  |    6 +++---
 gcc/testsuite/gcc.dg/tree-ssa/restrict-5.c  |    6 +++---
 gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-1.c   |    6 +++---
 gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-10.c  |    6 +++---
 gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-11.c  |    6 +++---
 gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-12.c  |    6 +++---
 gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-2.c   |    6 +++---
 gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-3.c   |    8 +++----
 gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-6.c   |    6 +++---
 gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-7.c   |    6 +++---
 gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-8.c   |    6 +++---
 gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-9.c   |    6 +++---
 gcc/testsuite/gcc.dg/tree-ssa/structopt-1.c |    6 +++---
 gcc/testsuite/gfortran.dg/pr32921.f         |    6 +++---
 30 files changed, 117 insertions(+), 83 deletions(-)



Grüße,
 Thomas
diff mbox

Patch

diff --git gcc/ChangeLog.gomp gcc/ChangeLog.gomp
index 1fb060f..98e33ad 100644
--- gcc/ChangeLog.gomp
+++ gcc/ChangeLog.gomp
@@ -1,5 +1,7 @@ 
 2015-04-21  Tom de Vries  <tom@codesourcery.com>
 
+	* passes.def: Add pass_lim in pass group pass_ch_oacc_kernels.
+
 	* passes.def: Run pass_tree_loop_init and pass_tree_loop_done in pass
 	group pass_oacc_kernels.
 	* tree-ssa-loop.c (pass_tree_loop_init::clone)
diff --git gcc/passes.def gcc/passes.def
index 83ae04e..e6c9287 100644
--- gcc/passes.def
+++ gcc/passes.def
@@ -92,6 +92,7 @@  along with GCC; see the file COPYING3.  If not see
 	  PUSH_INSERT_PASSES_WITHIN (pass_oacc_kernels)
 	      NEXT_PASS (pass_ch_oacc_kernels);
 	      NEXT_PASS (pass_tree_loop_init);
+	      NEXT_PASS (pass_lim);
 	      NEXT_PASS (pass_expand_omp_ssa);
 	      NEXT_PASS (pass_tree_loop_done);
 	  POP_INSERT_PASSES ()
diff --git gcc/testsuite/ChangeLog.gomp gcc/testsuite/ChangeLog.gomp
index f06a3e9..68d6d93 100644
--- gcc/testsuite/ChangeLog.gomp
+++ gcc/testsuite/ChangeLog.gomp
@@ -1,3 +1,34 @@ 
+2015-04-21  Tom de Vries  <tom@codesourcery.com>
+	    Thomas Schwinge  <thomas@codesourcery.com>
+
+	* c-c++-common/restrict-2.c: Update for new pass_lim.
+	* c-c++-common/restrict-4.c: Same.
+	* g++.dg/tree-ssa/pr33615.C: Same.
+	* g++.dg/tree-ssa/restrict1.C: Same.
+	* gcc.dg/tm/pub-safety-1.c: Same.
+	* gcc.dg/tm/reg-promotion.c: Same.
+	* gcc.dg/tree-ssa/20050314-1.c: Same.
+	* gcc.dg/tree-ssa/loop-32.c: Same.
+	* gcc.dg/tree-ssa/loop-33.c: Same.
+	* gcc.dg/tree-ssa/loop-34.c: Same.
+	* gcc.dg/tree-ssa/loop-35.c: Same.
+	* gcc.dg/tree-ssa/loop-7.c: Same.
+	* gcc.dg/tree-ssa/pr23109.c: Same.
+	* gcc.dg/tree-ssa/restrict-3.c: Same.
+	* gcc.dg/tree-ssa/restrict-5.c: Same.
+	* gcc.dg/tree-ssa/ssa-lim-1.c: Same.
+	* gcc.dg/tree-ssa/ssa-lim-10.c: Same.
+	* gcc.dg/tree-ssa/ssa-lim-11.c: Same.
+	* gcc.dg/tree-ssa/ssa-lim-12.c: Same.
+	* gcc.dg/tree-ssa/ssa-lim-2.c: Same.
+	* gcc.dg/tree-ssa/ssa-lim-3.c: Same.
+	* gcc.dg/tree-ssa/ssa-lim-6.c: Same.
+	* gcc.dg/tree-ssa/ssa-lim-7.c: Same.
+	* gcc.dg/tree-ssa/ssa-lim-8.c: Same.
+	* gcc.dg/tree-ssa/ssa-lim-9.c: Same.
+	* gcc.dg/tree-ssa/structopt-1.c: Same.
+	* gfortran.dg/pr32921.f: Same.
+
 2014-12-17  Thomas Schwinge  <thomas@codesourcery.com>
 	    James Norris  <jnorris@codesourcery.com>
 
diff --git gcc/testsuite/c-c++-common/restrict-2.c gcc/testsuite/c-c++-common/restrict-2.c
index 3f71b77..f0b0e15a 100644
--- gcc/testsuite/c-c++-common/restrict-2.c
+++ gcc/testsuite/c-c++-common/restrict-2.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O -fno-strict-aliasing -fdump-tree-lim1-details" } */
+/* { dg-options "-O -fno-strict-aliasing -fdump-tree-lim2-details" } */
 
 void foo (float * __restrict__ a, float * __restrict__ b, int n, int j)
 {
@@ -10,5 +10,5 @@  void foo (float * __restrict__ a, float * __restrict__ b, int n, int j)
 
 /* We should move the RHS of the store out of the loop.  */
 
-/* { dg-final { scan-tree-dump-times "Moving statement" 11 "lim1" } } */
-/* { dg-final { cleanup-tree-dump "lim1" } } */
+/* { dg-final { scan-tree-dump-times "Moving statement" 11 "lim2" } } */
+/* { dg-final { cleanup-tree-dump "lim2" } } */
diff --git gcc/testsuite/c-c++-common/restrict-4.c gcc/testsuite/c-c++-common/restrict-4.c
index 3a36def..f791533 100644
--- gcc/testsuite/c-c++-common/restrict-4.c
+++ gcc/testsuite/c-c++-common/restrict-4.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile }  */
-/* { dg-options "-O2 -fdump-tree-lim1-details" } */
+/* { dg-options "-O2 -fdump-tree-lim2-details" } */
 
 struct Foo
 {
@@ -15,5 +15,5 @@  void bar(struct Foo f, int * __restrict__ q)
     }
 }
 
-/* { dg-final { scan-tree-dump "Executing store motion" "lim1" } } */
-/* { dg-final { cleanup-tree-dump "lim1" } } */
+/* { dg-final { scan-tree-dump "Executing store motion" "lim2" } } */
+/* { dg-final { cleanup-tree-dump "lim2" } } */
diff --git gcc/testsuite/g++.dg/tree-ssa/pr33615.C gcc/testsuite/g++.dg/tree-ssa/pr33615.C
index 801b334..2591e00 100644
--- gcc/testsuite/g++.dg/tree-ssa/pr33615.C
+++ gcc/testsuite/g++.dg/tree-ssa/pr33615.C
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O -fnon-call-exceptions -fdump-tree-lim1-details -w" } */
+/* { dg-options "-O -fnon-call-exceptions -fdump-tree-lim2-details -w" } */
 
 extern volatile int y;
 
@@ -16,5 +16,5 @@  foo (double a, int x)
 
 // The expression 1.0 / 0.0 should not be treated as a loop invariant
 // if it may throw an exception.
-// { dg-final { scan-tree-dump-times "invariant up to" 0 "lim1" } }
-// { dg-final { cleanup-tree-dump "lim1" } }
+// { dg-final { scan-tree-dump-times "invariant up to" 0 "lim2" } }
+// { dg-final { cleanup-tree-dump "lim2" } }
diff --git gcc/testsuite/g++.dg/tree-ssa/restrict1.C gcc/testsuite/g++.dg/tree-ssa/restrict1.C
index 682de7e..761e7e2 100644
--- gcc/testsuite/g++.dg/tree-ssa/restrict1.C
+++ gcc/testsuite/g++.dg/tree-ssa/restrict1.C
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-lim1-details" } */
+/* { dg-options "-O2 -fdump-tree-lim2-details" } */
 
 struct Foo
 {
@@ -16,5 +16,5 @@  void bar(Foo f, int * __restrict__ q)
     }
 }
 
-/* { dg-final { scan-tree-dump "Executing store motion" "lim1" } } */
-/* { dg-final { cleanup-tree-dump "lim1" } } */
+/* { dg-final { scan-tree-dump "Executing store motion" "lim2" } } */
+/* { dg-final { cleanup-tree-dump "lim2" } } */
diff --git gcc/testsuite/gcc.dg/tm/pub-safety-1.c gcc/testsuite/gcc.dg/tm/pub-safety-1.c
index 660e9a6..6d99410 100644
--- gcc/testsuite/gcc.dg/tm/pub-safety-1.c
+++ gcc/testsuite/gcc.dg/tm/pub-safety-1.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-fgnu-tm -O1 -fdump-tree-lim1" } */
+/* { dg-options "-fgnu-tm -O1 -fdump-tree-lim2" } */
 
 /* Test that thread visible loads do not get hoisted out of loops if
    the load would not have occurred on each path out of the loop.  */
@@ -20,5 +20,5 @@  void reader()
     }
 }
 
-/* { dg-final { scan-tree-dump-times "Cannot hoist.*DATA_DATA because it is in a transaction" 1 "lim1" } } */
-/* { dg-final { cleanup-tree-dump "lim1" } } */
+/* { dg-final { scan-tree-dump-times "Cannot hoist.*DATA_DATA because it is in a transaction" 1 "lim2" } } */
+/* { dg-final { cleanup-tree-dump "lim2" } } */
diff --git gcc/testsuite/gcc.dg/tm/reg-promotion.c gcc/testsuite/gcc.dg/tm/reg-promotion.c
index e48bfb2..f1d2387 100644
--- gcc/testsuite/gcc.dg/tm/reg-promotion.c
+++ gcc/testsuite/gcc.dg/tm/reg-promotion.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-fgnu-tm -O2 -fdump-tree-lim1" } */
+/* { dg-options "-fgnu-tm -O2 -fdump-tree-lim2" } */
 
 /* Test that `count' is not written to unless p->data>0.  */
 
@@ -20,5 +20,5 @@  void func()
   }
 }
 
-/* { dg-final { scan-tree-dump-times "Cannot hoist conditional load of count because it is in a transaction" 1 "lim1" } } */
-/* { dg-final { cleanup-tree-dump "lim1" } } */
+/* { dg-final { scan-tree-dump-times "Cannot hoist conditional load of count because it is in a transaction" 1 "lim2" } } */
+/* { dg-final { cleanup-tree-dump "lim2" } } */
diff --git gcc/testsuite/gcc.dg/tree-ssa/20050314-1.c gcc/testsuite/gcc.dg/tree-ssa/20050314-1.c
index 8f07781..7f2e477 100644
--- gcc/testsuite/gcc.dg/tree-ssa/20050314-1.c
+++ gcc/testsuite/gcc.dg/tree-ssa/20050314-1.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O1 -fdump-tree-lim1-details --param allow-store-data-races=1" } */
+/* { dg-options "-O1 -fdump-tree-lim2-details --param allow-store-data-races=1" } */
 
 float a[100];
 
@@ -17,5 +17,5 @@  void xxx (void)
 /* Store motion may be applied to the assignment to a[k], since sinf
    cannot read nor write the memory.  */
 
-/* { dg-final { scan-tree-dump-times "Moving statement" 1 "lim1" } } */
-/* { dg-final { cleanup-tree-dump "lim1" } } */
+/* { dg-final { scan-tree-dump-times "Moving statement" 1 "lim2" } } */
+/* { dg-final { cleanup-tree-dump "lim2" } } */
diff --git gcc/testsuite/gcc.dg/tree-ssa/loop-32.c gcc/testsuite/gcc.dg/tree-ssa/loop-32.c
index f0c8d30..30b9d72 100644
--- gcc/testsuite/gcc.dg/tree-ssa/loop-32.c
+++ gcc/testsuite/gcc.dg/tree-ssa/loop-32.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-lim1-details" } */
+/* { dg-options "-O2 -fdump-tree-lim2-details" } */
 
 int x;
 int a[100];
@@ -42,5 +42,5 @@  void test3(struct a *A)
     }
 }
 
-/* { dg-final { scan-tree-dump-times "Executing store motion of" 3 "lim1" } } */
-/* { dg-final { cleanup-tree-dump "lim1" } } */
+/* { dg-final { scan-tree-dump-times "Executing store motion of" 3 "lim2" } } */
+/* { dg-final { cleanup-tree-dump "lim2" } } */
diff --git gcc/testsuite/gcc.dg/tree-ssa/loop-33.c gcc/testsuite/gcc.dg/tree-ssa/loop-33.c
index bf16b13..281b336 100644
--- gcc/testsuite/gcc.dg/tree-ssa/loop-33.c
+++ gcc/testsuite/gcc.dg/tree-ssa/loop-33.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-lim1-details" } */
+/* { dg-options "-O2 -fdump-tree-lim2-details" } */
 
 int x;
 int a[100];
@@ -36,5 +36,5 @@  void test5(struct a *A, unsigned b)
     }
 }
 
-/* { dg-final { scan-tree-dump-times "Executing store motion of" 4 "lim1" { xfail { lp64 || llp64 } } } } */
-/* { dg-final { cleanup-tree-dump "lim1" } } */
+/* { dg-final { scan-tree-dump-times "Executing store motion of" 4 "lim2" { xfail { lp64 || llp64 } } } } */
+/* { dg-final { cleanup-tree-dump "lim2" } } */
diff --git gcc/testsuite/gcc.dg/tree-ssa/loop-34.c gcc/testsuite/gcc.dg/tree-ssa/loop-34.c
index 125a220..e0ec9cf 100644
--- gcc/testsuite/gcc.dg/tree-ssa/loop-34.c
+++ gcc/testsuite/gcc.dg/tree-ssa/loop-34.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-lim1-details" } */
+/* { dg-options "-O2 -fdump-tree-lim2-details" } */
 
 int r[6];
 
@@ -17,5 +17,5 @@  void f (int n)
 }
 
 
-/* { dg-final { scan-tree-dump-times "Executing store motion of r" 6 "lim1" } } */
-/* { dg-final { cleanup-tree-dump "lim1" } } */
+/* { dg-final { scan-tree-dump-times "Executing store motion of r" 6 "lim2" } } */
+/* { dg-final { cleanup-tree-dump "lim2" } } */
diff --git gcc/testsuite/gcc.dg/tree-ssa/loop-35.c gcc/testsuite/gcc.dg/tree-ssa/loop-35.c
index 2d2db70..5a1e875 100644
--- gcc/testsuite/gcc.dg/tree-ssa/loop-35.c
+++ gcc/testsuite/gcc.dg/tree-ssa/loop-35.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-lim1-details" } */
+/* { dg-options "-O2 -fdump-tree-lim2-details" } */
 
 int x;
 int a[100];
@@ -67,6 +67,6 @@  void test4(struct a *A, unsigned LONG b)
     }
 }
 /* long index not hoisted for avr target PR 36561 */
-/* { dg-final { scan-tree-dump-times "Executing store motion of" 8 "lim1" { xfail { "avr-*-*" } } } } */
-/* { dg-final { scan-tree-dump-times "Executing store motion of" 6 "lim1" { target { "avr-*-*" } } } } */
-/* { dg-final { cleanup-tree-dump "lim1" } } */
+/* { dg-final { scan-tree-dump-times "Executing store motion of" 8 "lim2" { xfail { "avr-*-*" } } } } */
+/* { dg-final { scan-tree-dump-times "Executing store motion of" 6 "lim2" { target { "avr-*-*" } } } } */
+/* { dg-final { cleanup-tree-dump "lim2" } } */
diff --git gcc/testsuite/gcc.dg/tree-ssa/loop-7.c gcc/testsuite/gcc.dg/tree-ssa/loop-7.c
index 38e19e6..4e83170 100644
--- gcc/testsuite/gcc.dg/tree-ssa/loop-7.c
+++ gcc/testsuite/gcc.dg/tree-ssa/loop-7.c
@@ -1,6 +1,6 @@ 
 /* PR tree-optimization/19828 */
 /* { dg-do compile } */
-/* { dg-options "-O1 -fdump-tree-lim1-details" } */
+/* { dg-options "-O1 -fdump-tree-lim2-details" } */
 
 int cst_fun1 (int) __attribute__((__const__));
 int cst_fun2 (int) __attribute__((__const__));
@@ -31,5 +31,5 @@  int xxx (void)
    Calls to cst_fun2 and pure_fun2 should not be, since calling
    with k = 0 may be invalid.  */
 
-/* { dg-final { scan-tree-dump-times "Moving statement" 2 "lim1" } } */
-/* { dg-final { cleanup-tree-dump "lim1" } } */
+/* { dg-final { scan-tree-dump-times "Moving statement" 2 "lim2" } } */
+/* { dg-final { cleanup-tree-dump "lim2" } } */
diff --git gcc/testsuite/gcc.dg/tree-ssa/pr23109.c gcc/testsuite/gcc.dg/tree-ssa/pr23109.c
index 73fd84d..0f92311 100644
--- gcc/testsuite/gcc.dg/tree-ssa/pr23109.c
+++ gcc/testsuite/gcc.dg/tree-ssa/pr23109.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O2 -funsafe-math-optimizations -ftrapping-math -fdump-tree-recip -fdump-tree-lim1" } */
+/* { dg-options "-O2 -funsafe-math-optimizations -ftrapping-math -fdump-tree-recip -fdump-tree-lim2" } */
 /* { dg-warning "-fassociative-math disabled" "" { target *-*-* } 1 } */
 
 double F[2] = { 0., 0. }, e = 0.;
@@ -29,8 +29,8 @@  int main()
 /* LIM only performs the transformation in the no-trapping-math case.  In
    the future we will do it for trapping-math as well in recip, check that
    this is not wrongly optimized.  */
-/* { dg-final { scan-tree-dump-not "reciptmp" "lim1" } } */
+/* { dg-final { scan-tree-dump-not "reciptmp" "lim2" } } */
 /* { dg-final { scan-tree-dump-not "reciptmp" "recip" } } */
 /* { dg-final { cleanup-tree-dump "recip" } } */
-/* { dg-final { cleanup-tree-dump "lim1" } } */
+/* { dg-final { cleanup-tree-dump "lim2" } } */
 
diff --git gcc/testsuite/gcc.dg/tree-ssa/restrict-3.c gcc/testsuite/gcc.dg/tree-ssa/restrict-3.c
index 95cc1a2..c3ca462 100644
--- gcc/testsuite/gcc.dg/tree-ssa/restrict-3.c
+++ gcc/testsuite/gcc.dg/tree-ssa/restrict-3.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O -fno-strict-aliasing -fdump-tree-lim1-details" } */
+/* { dg-options "-O -fno-strict-aliasing -fdump-tree-lim2-details" } */
 
 void f(int * __restrict__ r,
        int a[__restrict__ 16][16],
@@ -14,5 +14,5 @@  void f(int * __restrict__ r,
 
 /* We should apply store motion to the store to *r.  */
 
-/* { dg-final { scan-tree-dump "Executing store motion of \\\*r" "lim1" } } */
-/* { dg-final { cleanup-tree-dump "lim1" } } */
+/* { dg-final { scan-tree-dump "Executing store motion of \\\*r" "lim2" } } */
+/* { dg-final { cleanup-tree-dump "lim2" } } */
diff --git gcc/testsuite/gcc.dg/tree-ssa/restrict-5.c gcc/testsuite/gcc.dg/tree-ssa/restrict-5.c
index d6c240a..74337e3 100644
--- gcc/testsuite/gcc.dg/tree-ssa/restrict-5.c
+++ gcc/testsuite/gcc.dg/tree-ssa/restrict-5.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O -fno-strict-aliasing -fdump-tree-lim1-details" } */
+/* { dg-options "-O -fno-strict-aliasing -fdump-tree-lim2-details" } */
 
 static inline __attribute__((always_inline))
 void f(int * __restrict__ r,
@@ -20,5 +20,5 @@  void g(int *r, int a[16][16], int b[16][16], int i, int j)
 
 /* We should apply store motion to the store to *r.  */
 
-/* { dg-final { scan-tree-dump "Executing store motion of \\\*r" "lim1" } } */
-/* { dg-final { cleanup-tree-dump "lim1" } } */
+/* { dg-final { scan-tree-dump "Executing store motion of \\\*r" "lim2" } } */
+/* { dg-final { cleanup-tree-dump "lim2" } } */
diff --git gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-1.c gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-1.c
index 3952a9a..0b22fc3 100644
--- gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-1.c
+++ gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-1.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O -fdump-tree-lim1" } */
+/* { dg-options "-O -fdump-tree-lim2" } */
 
 /* This is a variant that does cause fold to place a cast to
    int before testing bit 1.  */
@@ -18,5 +18,5 @@  quantum_toffoli (int control1, int control2, int target,
     }
 }
 
-/* { dg-final { scan-tree-dump-times "1 <<" 3 "lim1" } } */
-/* { dg-final { cleanup-tree-dump "lim1" } } */
+/* { dg-final { scan-tree-dump-times "1 <<" 3 "lim2" } } */
+/* { dg-final { cleanup-tree-dump "lim2" } } */
diff --git gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-10.c gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-10.c
index bc14926..4a218e0 100644
--- gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-10.c
+++ gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-10.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-lim1-details" } */
+/* { dg-options "-O2 -fdump-tree-lim2-details" } */
 
 int *l, *r;
 int test_func(void)
@@ -27,5 +27,5 @@  int test_func(void)
   return i;
 }
 
-/* { dg-final { scan-tree-dump "Executing store motion of pos" "lim1" } } */
-/* { dg-final { cleanup-tree-dump "lim1" } } */
+/* { dg-final { scan-tree-dump "Executing store motion of pos" "lim2" } } */
+/* { dg-final { cleanup-tree-dump "lim2" } } */
diff --git gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-11.c gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-11.c
index ea91a61..7315025 100644
--- gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-11.c
+++ gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-11.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O -fprofile-arcs -fdump-tree-lim1-details" } */
+/* { dg-options "-O -fprofile-arcs -fdump-tree-lim2-details" } */
 
 struct thread_param
 {
@@ -21,5 +21,5 @@  void access_buf(struct thread_param* p)
     }
 }
 
-/* { dg-final { scan-tree-dump-times "Executing store motion of __gcov0.access_buf\\\[\[01\]\\\] from loop 1" 2 "lim1" } } */
-/* { dg-final { cleanup-tree-dump "lim1" } } */
+/* { dg-final { scan-tree-dump-times "Executing store motion of __gcov0.access_buf\\\[\[01\]\\\] from loop 1" 2 "lim2" } } */
+/* { dg-final { cleanup-tree-dump "lim2" } } */
diff --git gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-12.c gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-12.c
index e0d93a9..07855bb 100644
--- gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-12.c
+++ gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-12.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O -fdump-tree-lim1" } */
+/* { dg-options "-O -fdump-tree-lim2" } */
 
 int a[1024];
 
@@ -23,5 +23,5 @@  void bar (int x, int z)
     }
 }
 
-/* { dg-final { scan-tree-dump-times "!= 0 ? " 2 "lim1" } } */
-/* { dg-final { cleanup-tree-dump "lim1" } } */
+/* { dg-final { scan-tree-dump-times "!= 0 ? " 2 "lim2" } } */
+/* { dg-final { cleanup-tree-dump "lim2" } } */
diff --git gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-2.c gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-2.c
index 2106b62..652d1ba 100644
--- gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-2.c
+++ gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-2.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O -fdump-tree-lim1" } */
+/* { dg-options "-O -fdump-tree-lim2" } */
 
 /* This is a variant that doesn't cause fold to place a cast to
    int before testing bit 1.  */
@@ -18,5 +18,5 @@  int size)
     }
 }
 
-/* { dg-final { scan-tree-dump-times "1 <<" 3 "lim1" } } */
-/* { dg-final { cleanup-tree-dump "lim1" } } */
+/* { dg-final { scan-tree-dump-times "1 <<" 3 "lim2" } } */
+/* { dg-final { cleanup-tree-dump "lim2" } } */
diff --git gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-3.c gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-3.c
index a81857c..29539fa 100644
--- gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-3.c
+++ gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-3.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O -fdump-tree-lim1-details" } */
+/* { dg-options "-O -fdump-tree-lim2-details" } */
 
 struct { int x; int y; } global;
 void foo(int n)
@@ -9,6 +9,6 @@  void foo(int n)
     global.y += global.x*global.x;
 }
 
-/* { dg-final { scan-tree-dump "Executing store motion of global.y" "lim1" } } */
-/* { dg-final { scan-tree-dump "Moving statement.*global.x.*out of loop 1" "lim1" } } */
-/* { dg-final { cleanup-tree-dump "lim1" } } */
+/* { dg-final { scan-tree-dump "Executing store motion of global.y" "lim2" } } */
+/* { dg-final { scan-tree-dump "Moving statement.*global.x.*out of loop 1" "lim2" } } */
+/* { dg-final { cleanup-tree-dump "lim2" } } */
diff --git gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-6.c gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-6.c
index 100a230..a70bb2e 100644
--- gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-6.c
+++ gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-6.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-lim1-details" } */
+/* { dg-options "-O2 -fdump-tree-lim2-details" } */
 
 double a[16][64], y[64], x[16];
 void foo(void)
@@ -10,5 +10,5 @@  void foo(void)
       y[j] = y[j] + a[i][j] * x[i];
 }
 
-/* { dg-final { scan-tree-dump "Executing store motion of y" "lim1" } } */
-/* { dg-final { cleanup-tree-dump "lim1" } } */
+/* { dg-final { scan-tree-dump "Executing store motion of y" "lim2" } } */
+/* { dg-final { cleanup-tree-dump "lim2" } } */
diff --git gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-7.c gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-7.c
index f8e15f3..6a67234 100644
--- gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-7.c
+++ gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-7.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O -fdump-tree-lim1-details" } */
+/* { dg-options "-O -fdump-tree-lim2-details" } */
 
 extern const int srcshift;
 
@@ -11,5 +11,5 @@  void foo (int *srcdata, int *dstdata)
     dstdata[i] = srcdata[i] << srcshift;
 }
 
-/* { dg-final { scan-tree-dump "Moving statement" "lim1" } } */
-/* { dg-final { cleanup-tree-dump "lim1" } } */
+/* { dg-final { scan-tree-dump "Moving statement" "lim2" } } */
+/* { dg-final { cleanup-tree-dump "lim2" } } */
diff --git gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-8.c gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-8.c
index 551b68f..c6f56ec 100644
--- gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-8.c
+++ gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-8.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O -fdump-tree-lim1-details" } */
+/* { dg-options "-O -fdump-tree-lim2-details" } */
 
 void bar (int);
 void foo (int n, int m)
@@ -16,5 +16,5 @@  void foo (int n, int m)
     }
 }
 
-/* { dg-final { scan-tree-dump-times "Moving PHI node" 1 "lim1"  } } */
-/* { dg-final { cleanup-tree-dump "lim1" } } */
+/* { dg-final { scan-tree-dump-times "Moving PHI node" 1 "lim2"  } } */
+/* { dg-final { cleanup-tree-dump "lim2" } } */
diff --git gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-9.c gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-9.c
index c5a6765..2233c90 100644
--- gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-9.c
+++ gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-9.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O -fdump-tree-lim1-details" } */
+/* { dg-options "-O -fdump-tree-lim2-details" } */
 
 void bar (int);
 void foo (int n, int m)
@@ -16,5 +16,5 @@  void foo (int n, int m)
     }
 }
 
-/* { dg-final { scan-tree-dump-times "Moving PHI node" 1 "lim1"  } } */
-/* { dg-final { cleanup-tree-dump "lim1" } } */
+/* { dg-final { scan-tree-dump-times "Moving PHI node" 1 "lim2"  } } */
+/* { dg-final { cleanup-tree-dump "lim2" } } */
diff --git gcc/testsuite/gcc.dg/tree-ssa/structopt-1.c gcc/testsuite/gcc.dg/tree-ssa/structopt-1.c
index e5fe291..54cf44c 100644
--- gcc/testsuite/gcc.dg/tree-ssa/structopt-1.c
+++ gcc/testsuite/gcc.dg/tree-ssa/structopt-1.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-lim1-details" } */
+/* { dg-options "-O2 -fdump-tree-lim2-details" } */
 int x; int y;
 struct { int x; int y; } global;
 int foo() {
@@ -10,6 +10,6 @@  int foo() {
 		global.y += global.x*global.x;
 }
 
-/* { dg-final { scan-tree-dump-times "Executing store motion of global.y" 1 "lim1" } } */
+/* { dg-final { scan-tree-dump-times "Executing store motion of global.y" 1 "lim2" } } */
 /* XXX: We should also check for the load motion of global.x, but there is no easy way to do this.  */
-/* { dg-final { cleanup-tree-dump "lim1" } } */
+/* { dg-final { cleanup-tree-dump "lim2" } } */
diff --git gcc/testsuite/gfortran.dg/pr32921.f gcc/testsuite/gfortran.dg/pr32921.f
index 45ea647..55b5604 100644
--- gcc/testsuite/gfortran.dg/pr32921.f
+++ gcc/testsuite/gfortran.dg/pr32921.f
@@ -1,5 +1,5 @@ 
 ! { dg-do compile }
-! { dg-options "-O2 -fdump-tree-lim1" }
+! { dg-options "-O2 -fdump-tree-lim2" }
 ! gfortran -c -m32 -O2 -S junk.f
 !
       MODULE LES3D_DATA
@@ -45,5 +45,5 @@ 
 
       RETURN
       END
-! { dg-final { scan-tree-dump-times "stride" 4 "lim1" } }
-! { dg-final { cleanup-tree-dump "lim1" } }
+! { dg-final { scan-tree-dump-times "stride" 4 "lim2" } }
+! { dg-final { cleanup-tree-dump "lim2" } }