URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [ipa/] [ipa-sra-2.c] - Rev 328
Go to most recent revision | Compare with Previous | Blame | View Log
/* { dg-do compile } */ /* { dg-options "-O2 -fipa-sra -fdump-tree-eipa_sra-details" } */ struct bovid { float red; int green; void *blue; }; static int __attribute__((noinline)) ox (struct bovid *cow) { cow->red = cow->red + cow->green + cow->green; return 0; } int something; static int __attribute__((noinline)) ox_improved (struct bovid *calf) { if (something > 0) calf->red = calf->red + calf->green; else calf->red = calf->green + 87; something = 77; return 0; } int main (int argc, char *argv[]) { struct bovid cow; cow.red = 7.4; cow.green = 6; cow.blue = &cow; ox (&cow); ox_improved (&cow); return 0; } /* { dg-final { scan-tree-dump "About to replace expr cow_.*D.->red with \\*ISRA" "eipa_sra" } } */ /* { dg-final { scan-tree-dump "About to replace expr cow_.*D.->green with ISRA" "eipa_sra" } } */ /* { dg-final { scan-tree-dump "About to replace expr calf_.*D.->red with \\*ISRA" "eipa_sra" } } */ /* { dg-final { scan-tree-dump "About to replace expr calf_.*D.->green with ISRA" "eipa_sra" } } */ /* { dg-final { cleanup-tree-dump "eipa_sra" } } */
Go to most recent revision | Compare with Previous | Blame | View Log