Doing cprop on frame-related instructions blows up spectacularly.
So don't.

2016-06-07  Segher Boessenkool  <seg...@kernel.crashing.org>

        * regcprop.c (copyprop_hardreg_forward_1): Don't change
        RTX_FRAME_RELATED_P instructions.
---
 gcc/regcprop.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gcc/regcprop.c b/gcc/regcprop.c
index 1498300..6aea74f 100644
--- a/gcc/regcprop.c
+++ b/gcc/regcprop.c
@@ -829,6 +829,10 @@ copyprop_hardreg_forward_1 (basic_block bb, struct 
value_data *vd)
            }
        }
 
+      /* Don't change prologue instructions.  */
+      if (RTX_FRAME_RELATED_P (insn))
+       set = NULL;
+
       /* Special-case plain move instructions, since we may well
         be able to do the move from a different register class.  */
       if (set && REG_P (SET_SRC (set)))
-- 
1.9.3

Reply via email to