This is the mail archive of the gcc-patches@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]

[tree-ssa] Fix 14413


We failed to clear the TRUE/FALSE flags on the remaining edge after we 
eliminate
a PHI.  Opps

Bootstrapped and regression tested on i686-pc-linux-gnu.

	* tree-ssa-phiopt.c (conditional_replacement): Clear EDGE_TRUE_VALUE
	and EDGE_FALSE_VALUE on the remaining edge after eliminating a PHI. 

Index: tree-ssa-phiopt.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-ssa-phiopt.c,v
retrieving revision 1.1.2.7
diff -c -p -r1.1.2.7 tree-ssa-phiopt.c
*** tree-ssa-phiopt.c	28 Feb 2004 01:06:20 -0000	1.1.2.7
--- tree-ssa-phiopt.c	4 Mar 2004 05:04:33 -0000
*************** conditional_replacement (basic_block bb,
*** 245,259 ****
    bb_ann (bb)->phi_nodes = NULL;
    
    /* Disconnect the edge leading into the empty block.  That will
!       make the empty block unreachable and it will be removed later.  */
    if (cond_block->succ->dest == bb)
      {
        cond_block->succ->flags |= EDGE_FALLTHRU;
        ssa_remove_edge (cond_block->succ->succ_next);
      }
    else
      {
        cond_block->succ->succ_next->flags |= EDGE_FALLTHRU;
        ssa_remove_edge (cond_block->succ);
      }
    
--- 245,262 ----
    bb_ann (bb)->phi_nodes = NULL;
    
    /* Disconnect the edge leading into the empty block.  That will
!      make the empty block unreachable and it will be removed later.  */
    if (cond_block->succ->dest == bb)
      {
        cond_block->succ->flags |= EDGE_FALLTHRU;
+       cond_block->succ->flags &= ~(EDGE_TRUE_VALUE | EDGE_FALSE_VALUE);
        ssa_remove_edge (cond_block->succ->succ_next);
      }
    else
      {
        cond_block->succ->succ_next->flags |= EDGE_FALLTHRU;
+       cond_block->succ->succ_next->flags
+ 	&= ~(EDGE_TRUE_VALUE | EDGE_FALSE_VALUE);
        ssa_remove_edge (cond_block->succ);
      }
    




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