Commit c291b2ad by Oleg Endo

re PR target/55160 (Counterproductive loop induction variable optimization)

	PR target/55160
	* gcc.target/sh/pr55160.c: New.

From-SVN: r193071
parent d4ac4ce2
2012-11-01 Oleg Endo <olegendo@gcc.gnu.org>
PR target/55160
* gcc.target/sh/pr55160.c: New.
2012-11-01 David Edelsohn <dje.gcc@gmail.com>
* gcc.target/powerpc/vsx-mass-1.c: Check for dot symbols in
......
/* Check that the decrement-and-test instruction is generated. */
/* { dg-do compile { target "sh*-*-*" } } */
/* { dg-options "-O1" } */
/* { dg-skip-if "" { "sh*-*-*" } { "-m5*"} { "" } } */
/* { dg-final { scan-assembler-times "dt\tr" 2 } } */
int
test_00 (int* x, int c)
{
int s = 0;
int i;
for (i = 0; i < c; ++i)
s += x[i];
return s;
}
int
test_01 (int* x, int c)
{
int s = 0;
int i;
for (i = 0; i < c; ++i)
s += *--x;
return s;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment