ivopts-1.c: New test.
* gcc.dg/tree-ssa/ivopts-1.c: New test. * gcc.dg/tree-ssa/ivopts-2.c: New test. Co-Authored-By: Adam Nemet <anemet@caviumnetworks.com> From-SVN: r117183
This commit is contained in:
parent
b67102aebd
commit
af17634547
@ -1,3 +1,9 @@
|
|||||||
|
2006-09-24 Zdenek Dvorak <dvorakz@suse.cz>
|
||||||
|
Adam Nemet <anemet@caviumnetworks.com>
|
||||||
|
|
||||||
|
* gcc.dg/tree-ssa/ivopts-1.c: New test.
|
||||||
|
* gcc.dg/tree-ssa/ivopts-2.c: New test.
|
||||||
|
|
||||||
2006-09-24 Kazu Hirata <kazu@codesourcery.com>
|
2006-09-24 Kazu Hirata <kazu@codesourcery.com>
|
||||||
|
|
||||||
PR target/28911
|
PR target/28911
|
||||||
|
26
gcc/testsuite/gcc.dg/tree-ssa/ivopts-1.c
Normal file
26
gcc/testsuite/gcc.dg/tree-ssa/ivopts-1.c
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
/* { dg-do compile } */
|
||||||
|
|
||||||
|
/* Not all platforms support TImode integers. */
|
||||||
|
#if defined(__LP64__) && !defined(__hppa__)
|
||||||
|
typedef int TItype __attribute__ ((mode (TI)));
|
||||||
|
#else
|
||||||
|
typedef long TItype;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
TItype last_data_offset ;
|
||||||
|
int store;
|
||||||
|
char *data;
|
||||||
|
|
||||||
|
f ()
|
||||||
|
{
|
||||||
|
|
||||||
|
TItype data_offset = last_data_offset;
|
||||||
|
char *p;
|
||||||
|
|
||||||
|
for (p = data; *p; p++)
|
||||||
|
{
|
||||||
|
data_offset++;
|
||||||
|
g (data_offset);
|
||||||
|
store = data_offset + 1;
|
||||||
|
}
|
||||||
|
}
|
24
gcc/testsuite/gcc.dg/tree-ssa/ivopts-2.c
Normal file
24
gcc/testsuite/gcc.dg/tree-ssa/ivopts-2.c
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
/* { dg-do compile } */
|
||||||
|
/* { dg-options "-O2 -fdump-tree-ivopts-details" } */
|
||||||
|
|
||||||
|
long last_data_offset;
|
||||||
|
int store;
|
||||||
|
char *data;
|
||||||
|
|
||||||
|
f ()
|
||||||
|
{
|
||||||
|
|
||||||
|
long data_offset = last_data_offset;
|
||||||
|
char *p;
|
||||||
|
|
||||||
|
for (p = data; *p; p++)
|
||||||
|
{
|
||||||
|
data_offset++;
|
||||||
|
g (data_offset);
|
||||||
|
store = data_offset + 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* We should only have two IVs. */
|
||||||
|
/* { dg-final { scan-tree-dump-not "\\n candidates .*,.*,.*\\n\[^\\n\]*\\nFinal cost" "ivopts" } } */
|
||||||
|
/* { dg-final { cleanup-tree-dump "ivopts" } } */
|
Loading…
Reference in New Issue
Block a user