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

--- Comment #4 from vries at gcc dot gnu.org 2011-10-18 11:12:32 UTC ---
Created attachment 25541
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25541
patch, handles case that either vuse1 or vuse2 is NULL_TREE in update_vuses.

Currently testing on x86_64.

2011-10-18  Tom de Vries  <t...@codesourcery.com>

    PR tree-optimization/50763
    * tree-ssa-tail-merge.c (update_vuses): Add and use vuse1_phi_args
    argument.  Set var to SSA_NAME_VAR of vuse1 or vuse2, and use var.
    Handle case that def_stmt2 is NULL.  Use phi result as phi arg in case
    vuse1 or vuse2 is NULL_TREE.  Replace uses of vuse1 if vuse2 is
    NULL_TREE.  Remove code to limit replacement of uses.
    (replace_block_by): Update vops if phi_vuse1 or phi_vuse2 is NULL_TREE.
    Set vuse1_phi_args if vuse1 is a phi defined in bb1. Add vuse1_phi_args
    as argument to call to update_vuses.

    * gcc.dg/pr50763.c: New test.

Reply via email to