diff options
author | Richard Guenther <rguenther@suse.de> | 2008-09-22 19:15:43 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2008-09-22 19:15:43 +0000 |
commit | ecb4e37b73d7649a447fe63f33dc20826fce0bb6 (patch) | |
tree | 011ef08c0c1e906fc44e085fd10886019e133ce7 /gcc/testsuite | |
parent | 880f8ea3bd9ca8e4d1acf5083760da66b05fea59 (diff) | |
download | gcc-ecb4e37b73d7649a447fe63f33dc20826fce0bb6.zip gcc-ecb4e37b73d7649a447fe63f33dc20826fce0bb6.tar.gz gcc-ecb4e37b73d7649a447fe63f33dc20826fce0bb6.tar.bz2 |
re PR tree-optimization/37145 (XFAILs from PRE rewrite, SCCVN union optimization disabled)
2008-09-22 Richard Guenther <rguenther@suse.de>
PR tree-optimization/37145
* tree-ssa-sccvn.c (copy_reference_ops_from_ref): Re-enable
value-numbering union accesses with their offset and size only.
(visit_reference_op_load): Fix simplification of inserted conversions.
* tree-ssa-pre.c (find_or_generate_expression): Do not
recursively generate expressions if running FRE.
* gcc.c-torture/compile/20080922-1.c: New testcase.
* gcc.dg/tree-ssa/ssa-fre-7.c: Remove XFAIL.
* gcc.dg/tree-ssa/ssa-fre-8.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-9.c: Likewise.
From-SVN: r140562
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/20080922-1.c | 29 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-7.c | 10 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-8.c | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-9.c | 4 |
5 files changed, 46 insertions, 9 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 89851e5..bbc5e33 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2008-09-22 Richard Guenther <rguenther@suse.de> + + PR tree-optimization/37145 + * gcc.c-torture/compile/20080922-1.c: New testcase. + * gcc.dg/tree-ssa/ssa-fre-7.c: Remove XFAIL. + * gcc.dg/tree-ssa/ssa-fre-8.c: Likewise. + * gcc.dg/tree-ssa/ssa-fre-9.c: Likewise. + 2008-09-22 Adam Nemet <anemet@caviumnetworks.com> * gcc.target/mips/octeon-baddu-1.c: New test. diff --git a/gcc/testsuite/gcc.c-torture/compile/20080922-1.c b/gcc/testsuite/gcc.c-torture/compile/20080922-1.c new file mode 100644 index 0000000..853ec4f --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/20080922-1.c @@ -0,0 +1,29 @@ +typedef struct rtx_def *rtx; +typedef struct rtvec_def *rtvec; +enum rtx_code { PARALLEL, SET }; +union rtunion_def { + rtx rt_rtx; + rtvec rt_rtvec; +}; +typedef union rtunion_def rtunion; +struct rtx_def { + rtunion fld; +}; +struct rtvec_def { + int num_elem; +}; +extern rtx operand; + +rtx peephole2_insns (rtx x0, enum rtx_code code) +{ + switch (code) + { + case SET: + operand = (((x0)->fld).rt_rtx); + return operand; + case PARALLEL: + if ((((((x0)->fld).rt_rtvec))->num_elem) == 2) + return 0; + break; + } +} diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-7.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-7.c index d93a1a2..bd81831 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-7.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-7.c @@ -29,10 +29,10 @@ intflt foo(intflt j) return a.u.k; } -/* { dg-final { scan-tree-dump-times "Inserted pretmp" 1 "fre" { xfail *-*-* } } } */ -/* { dg-final { scan-tree-dump-times "Replaced a.u.f with pretmp" 3 "fre" { xfail *-*-* } } } */ -/* { dg-final { scan-tree-dump-times "Replaced a.u.k with j" 1 "fre" { xfail *-*-* } } } */ -/* { dg-final { scan-tree-dump "= VIEW_CONVERT_EXPR<float>\\\(j_" "fre" { xfail *-*-* } } } */ -/* { dg-final { scan-tree-dump "return j" "optimized" { xfail *-*-* } } } */ +/* { dg-final { scan-tree-dump-times "Inserted pretmp" 1 "fre" } } */ +/* { dg-final { scan-tree-dump-times "Replaced a.u.f with pretmp" 3 "fre" } } */ +/* { dg-final { scan-tree-dump-times "Replaced a.u.k with j" 1 "fre" } } */ +/* { dg-final { scan-tree-dump "= VIEW_CONVERT_EXPR<float>\\\(j_" "fre" } } */ +/* { dg-final { scan-tree-dump "return j" "optimized" } } */ /* { dg-final { cleanup-tree-dump "fre" } } */ /* { dg-final { cleanup-tree-dump "optimized" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-8.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-8.c index 1494dbb..6e17bd5 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-8.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-8.c @@ -28,6 +28,6 @@ intflt foo(int i, int b) } } -/* { dg-final { scan-tree-dump-times "Replaced u.f with pretmp" 2 "fre" { xfail *-*-* } } } */ -/* { dg-final { scan-tree-dump-times "Inserted pretmp" 2 "fre" { xfail *-*-* } } } */ +/* { dg-final { scan-tree-dump-times "Replaced u.f with pretmp" 2 "fre" } } */ +/* { dg-final { scan-tree-dump-times "Inserted pretmp" 2 "fre" } } */ /* { dg-final { cleanup-tree-dump "fre" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-9.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-9.c index 24c4ae3..18595ed 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-9.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-9.c @@ -23,6 +23,6 @@ void __frame_state_for1 (volatile char *state_in) } } -/* { dg-final { scan-tree-dump-times "Eliminated: 1" 2 "fre" { xfail *-*-* } } } */ -/* { dg-final { scan-tree-dump-times "Insertions: 1" 2 "fre" { xfail *-*-* } } } */ +/* { dg-final { scan-tree-dump-times "Eliminated: 1" 2 "fre" } } */ +/* { dg-final { scan-tree-dump-times "Insertions: 1" 2 "fre" } } */ /* { dg-final { cleanup-tree-dump "fre" } } */ |