This turns {CLOBBER}s into resets, eliding an otherwise necessary
debug temp and the constructor copying.

Bootstrapped on x86_64-unknown-linux-gnu, testing in progress.

Richard.

2019-04-29  Richard Biener  <rguent...@suse.de>

        * tree-ssa.c (insert_debug_temp_for_var_def): For {CLOBBER}
        rhs issue a reset.

Index: gcc/tree-ssa.c
===================================================================
--- gcc/tree-ssa.c      (revision 270643)
+++ gcc/tree-ssa.c      (working copy)
@@ -358,6 +358,11 @@ insert_debug_temp_for_var_def (gimple_st
       else if (value == error_mark_node)
        value = NULL;
     }
+  else if (gimple_clobber_p (def_stmt))
+    /* We can end up here when rewriting a decl into SSA and coming
+       along a clobber for the original decl.  Turn that into
+       # DEBUG decl => NULL  */
+    value = NULL;
   else if (is_gimple_assign (def_stmt))
     {
       bool no_value = false;

Reply via email to