On 04/20/2015 11:19 AM, Jakub Jelinek wrote:
On Mon, Apr 20, 2015 at 11:14:03AM -0600, Jeff Law wrote:
while (!gsi_end_p (gsi)
&& (gimple_code (gsi_stmt (gsi)) == GIMPLE_LABEL
|| is_gimple_debug (gsi_stmt (gsi))
- || gimple_nop_p (gsi_stmt (gsi))))
+ || gimple_nop_p (gsi_stmt (gsi))
+ || (gimple_code (gsi_stmt (gsi)) == GIMPLE_ASSIGN
Why this line? There is no need to test for GIMPLE_ASSIGN
(and canonical test for that would be is_gimple_assign (gsi_stmt (gsi))
anyway),
+ && gimple_clobber_p (gsi_stmt (gsi)))))
gimple_clobber_p checks for that too.
Fixed in the obvious way after a bootstrap and regression test on
x86_64-linux-gnu.
Thanks,
Jeff
commit d215c1e90eae1a6cd5ad77a4e9ddd09b03e3abd6
Author: Jeff Law <l...@redhat.com>
Date: Mon Apr 20 13:35:26 2015 -0600
PR tree-optimization/65658
* tree-ssa-threadupdate.c (redirection_block_p): Remove
redundant test for GIMPLE_ASSIGN in last change.
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a4c1076..2262e09 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2015-04-20 Jeff Law <l...@redhat.com>
+
+ PR tree-optimization/65658
+ * tree-ssa-threadupdate.c (redirection_block_p): Remove
+ redundant test for GIMPLE_ASSIGN in last change.
+
2015-04-19 Uros Bizjak <ubiz...@gmail.com>
* config/i386/i386.c (set_pic_reg_ever_live): Remove.
diff --git a/gcc/tree-ssa-threadupdate.c b/gcc/tree-ssa-threadupdate.c
index 9f263bd..0d61c18 100644
--- a/gcc/tree-ssa-threadupdate.c
+++ b/gcc/tree-ssa-threadupdate.c
@@ -1450,8 +1450,7 @@ redirection_block_p (basic_block bb)
&& (gimple_code (gsi_stmt (gsi)) == GIMPLE_LABEL
|| is_gimple_debug (gsi_stmt (gsi))
|| gimple_nop_p (gsi_stmt (gsi))
- || (gimple_code (gsi_stmt (gsi)) == GIMPLE_ASSIGN
- && gimple_clobber_p (gsi_stmt (gsi)))))
+ || gimple_clobber_p (gsi_stmt (gsi))))
gsi_next (&gsi);
/* Check if this is an empty block. */