diff options
author | Richard Guenther <rguenther@suse.de> | 2008-08-28 15:26:13 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2008-08-28 15:26:13 +0000 |
commit | 99781d25b63399b931f4392e7cea7fb50be66484 (patch) | |
tree | e070c7bc3d3b623d358a0bede56e095b930f917a /gcc | |
parent | b7fdeec95fa7638342b3d3319f9ac177e830ceed (diff) | |
download | gcc-99781d25b63399b931f4392e7cea7fb50be66484.zip gcc-99781d25b63399b931f4392e7cea7fb50be66484.tar.gz gcc-99781d25b63399b931f4392e7cea7fb50be66484.tar.bz2 |
re PR tree-optimization/37207 (ice at tree-ssa-ifcombine.c:222 for -Os)
2008-08-28 Richard Guenther <rguenther@suse.de>
PR tree-optimization/37207
* tree-ssa-ifcombine.c (recognize_single_bit_test): Fix
tuplification bug.
* gcc.c-torture/compile/pr37207.c: New testcase.
From-SVN: r139714
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/pr37207.c | 21 | ||||
-rw-r--r-- | gcc/tree-ssa-ifcombine.c | 2 |
4 files changed, 33 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4af737e..2759095 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2008-08-28 Richard Guenther <rguenther@suse.de> + + PR tree-optimization/37207 + * tree-ssa-ifcombine.c (recognize_single_bit_test): Fix + tuplification bug. + 2008-08-28 Dodji Seketeli <dodji@redhat.com> PR c++/36741 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 96b49b6..4befcbb 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2008-08-28 Richard Guenther <rguenther@suse.de> + + PR tree-optimization/37207 + * gcc.c-torture/compile/pr37207.c: New testcase. + 2008-08-28 Janus Weil <janus@gcc.gnu.org> PR fortran/37253 diff --git a/gcc/testsuite/gcc.c-torture/compile/pr37207.c b/gcc/testsuite/gcc.c-torture/compile/pr37207.c new file mode 100644 index 0000000..72333d2 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr37207.c @@ -0,0 +1,21 @@ +void +func_18 ( int t ) +{ + unsigned l_889; + int l_895 = 1; + for (0; 1; ++l_889) + { + int t1 = 0; + if (func_81 (1)) + { + int rhs = l_895; + if (rhs == 0) + rhs = 1; + if (1 & (t % rhs)) + t1 = 1; + } + func_98 (t1); + l_895 = 0; + } +} + diff --git a/gcc/tree-ssa-ifcombine.c b/gcc/tree-ssa-ifcombine.c index 143608e..a4a74ee 100644 --- a/gcc/tree-ssa-ifcombine.c +++ b/gcc/tree-ssa-ifcombine.c @@ -212,7 +212,7 @@ recognize_single_bit_test (gimple cond, tree *name, tree *bit) stmt = SSA_NAME_DEF_STMT (orig_name); while (is_gimple_assign (stmt) - && (gimple_assign_copy_p (stmt) + && (gimple_assign_ssa_name_copy_p (stmt) || (gimple_assign_cast_p (stmt) && integral_operand_p (gimple_assign_lhs (stmt)) && integral_operand_p (gimple_assign_rhs1 (stmt)) |