aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-forwprop.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-ssa-forwprop.c')
-rw-r--r--gcc/tree-ssa-forwprop.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c
index 4358732..b2ea362 100644
--- a/gcc/tree-ssa-forwprop.c
+++ b/gcc/tree-ssa-forwprop.c
@@ -2962,6 +2962,8 @@ pass_forwprop::execute (function *fun)
!= TARGET_MEM_REF))
{
tree use_lhs = gimple_assign_lhs (use_stmt);
+ if (auto_var_p (use_lhs))
+ DECL_NOT_GIMPLE_REG_P (use_lhs) = 1;
tree new_lhs = build1 (REALPART_EXPR,
TREE_TYPE (TREE_TYPE (use_lhs)),
unshare_expr (use_lhs));
@@ -3013,6 +3015,9 @@ pass_forwprop::execute (function *fun)
= tree_to_uhwi (TYPE_SIZE (elt_t));
unsigned HOST_WIDE_INT n
= tree_to_uhwi (TYPE_SIZE (TREE_TYPE (rhs)));
+ tree use_lhs = gimple_assign_lhs (use_stmt);
+ if (auto_var_p (use_lhs))
+ DECL_NOT_GIMPLE_REG_P (use_lhs) = 1;
for (unsigned HOST_WIDE_INT bi = 0; bi < n; bi += elt_w)
{
unsigned HOST_WIDE_INT ci = bi / elt_w;
@@ -3021,7 +3026,6 @@ pass_forwprop::execute (function *fun)
new_rhs = CONSTRUCTOR_ELT (rhs, ci)->value;
else
new_rhs = build_zero_cst (elt_t);
- tree use_lhs = gimple_assign_lhs (use_stmt);
tree new_lhs = build3 (BIT_FIELD_REF,
elt_t,
unshare_expr (use_lhs),