PR tree-optimization/54985

Message ID
State New
Headers show

Commit Message

Jeff Law Oct. 26, 2012, 5:35 p.m.
On 10/23/2012 03:43 PM, Jakub Jelinek wrote:
> On Tue, Oct 23, 2012 at 03:34:46PM -0600, Jeff Law wrote:
>>> I think it should be backported to 4.7, perhaps with a few days delay after the
>>> trunk commit.
>> Do we even have debug statements after control flow statements?
> They shouldn't be there, so if you just give up the same way for gsi_stmt
> NULL as well as non-control stmt, it shouldn't make a difference.
> So last_stmt might be just shorter to type and more commonly used, nothing
> more.

Bootstrapped and regression tested on x86_64-unknown-linux-gnu.
* tree-ssa-threadedge.c (cond_arg_set_in_bb): Use last stmt.


diff --git a/gcc/tree-ssa-threadedge.c b/gcc/tree-ssa-threadedge.c
index 6249e2f..ddaa7d1 100644
--- a/gcc/tree-ssa-threadedge.c
+++ b/gcc/tree-ssa-threadedge.c
@@ -584,7 +584,7 @@  cond_arg_set_in_bb (edge e, basic_block bb)
   ssa_op_iter iter;
   use_operand_p use_p;
-  gimple last = gsi_stmt (gsi_last_bb (e->dest));
+  gimple last = last_stmt (e->dest);
   /* E->dest does not have to end with a control transferring
      instruction.  This can occurr when we try to extend a jump