From: Bin Cheng Date: Tue, 10 Feb 2015 02:34:41 +0000 (+0000) Subject: re PR tree-optimization/43378 (IVOPTs messes up code) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=940652d50fe5189458c11ff2fccff7ab38209ded;p=gcc.git re PR tree-optimization/43378 (IVOPTs messes up code) PR tree-optimization/43378 * gcc.dg/tree-ssa/pr43378.c: New test. From-SVN: r220563 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f34de6ed35d..ca2cf304a11 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-02-10 Bin Cheng + + PR tree-optimization/43378 + * gcc.dg/tree-ssa/pr43378.c: New test. + 2015-02-08 Jan Hubicka PR ipa/64978 diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr43378.c b/gcc/testsuite/gcc.dg/tree-ssa/pr43378.c new file mode 100644 index 00000000000..1861b4515d1 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr43378.c @@ -0,0 +1,17 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-ivopts" } */ + +void bar (int, int, int); +void foo (int left, int rite, int element) +{ + while (left <= rite) + { + rite -= element; + bar (left, rite, element); + left += element; + } +} + +/* { dg-final { scan-tree-dump-times "rite_\[0-9\]* = rite_\[0-9\]* - element" 1 "ivopts"} } */ +/* { dg-final { scan-tree-dump-times "left_\[0-9\]* = left_\[0-9\]* \\+ element|left_\[0-9\]* = element_\[0-9\]*\\(D\\) \\+ left" 1 "ivopts"} } */ +/* { dg-final { cleanup-tree-dump "ivopts" } } */