This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/51879] Missed tail merging with non-const/pure calls


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51879

vries at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #26430|0                           |1
        is obsolete|                            |

--- Comment #7 from vries at gcc dot gnu.org 2012-01-25 09:46:52 UTC ---
Created attachment 26454
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26454
Updated tentative patch

This patch was bootstrapped and reg-tested on x86_64, and fails only in 3 tests
- gcc.c-torture/compile/20030224-1.c
- gcc.c-torture/execute/20020412-1.c
- gcc.dg/lto/20090706-1_0.c
on ICE from PR51990.

2012-01-25  Tom de Vries  <tom@codesourcery.com>

    PR tree-optimization/51879
    * tree-ssa-sccvn.h (struct vn_reference_s): Add vdef field.
    * tree-ssa-sccvn.c (visit_reference_op_call): Handle gimple_vdef.
    Handle case that lhs is NULL_TREE.
    (visit_use): Handle non-pure/const calls and calls without result using
    visit_reference_op_call.

    gcc.dg/pr51879.c: New test.
    gcc.dg/pr51879-2.c: Same.
    gcc.dg/pr51879-3.c: Same.
    gcc.dg/pr51879-4.c: Same.
    gcc.dg/pr51879-6.c: Same.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]