From fec5d58b1ff0548148eb41ae72757a09d67a876c Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Mon, 23 May 2011 07:00:02 +0000 Subject: [PATCH] re PR middle-end/45098 (Missed induction variable optimization) 2011-05-23 Tom de Vries PR target/45098 * gcc.target/arm/ivopts-6.c: New test. From-SVN: r174055 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.target/arm/ivopts-6.c | 15 +++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 gcc/testsuite/gcc.target/arm/ivopts-6.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 015b4fae01e..b1446bb7951 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-05-23 Tom de Vries + + PR target/45098 + * gcc.target/arm/ivopts-6.c: New test. + 2011-05-22 Jakub Jelinek PR middle-end/49029 diff --git a/gcc/testsuite/gcc.target/arm/ivopts-6.c b/gcc/testsuite/gcc.target/arm/ivopts-6.c new file mode 100644 index 00000000000..8a3bafbd884 --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/ivopts-6.c @@ -0,0 +1,15 @@ +/* { dg-do assemble } */ +/* { dg-options "-Os -fdump-tree-ivopts -save-temps -marm" } */ + +void +tr5 (short array[], int n) +{ + int x; + if (n > 0) + for (x = 0; x < n; x++) + array[x] = 0; +} + +/* { dg-final { scan-tree-dump-times "PHI <" 1 "ivopts"} } */ +/* { dg-final { object-size text <= 32 } } */ +/* { dg-final { cleanup-tree-dump "ivopts" } } */ -- 2.30.2