aboutsummaryrefslogtreecommitdiff
path: root/gcc/reg-stack.c
diff options
context:
space:
mode:
authorqing zhao <qinzhao@gcc.gnu.org>2020-12-02 23:48:02 +0100
committerqing zhao <qinzhao@gcc.gnu.org>2020-12-02 23:48:02 +0100
commit2cace1cd683318e83e8a613f1aa2f2b16e37a342 (patch)
tree6b5c2daa325b3e06b07abcd18188f0717c22013a /gcc/reg-stack.c
parentdc2b372ed1b1e9af6db45051cff95478c7616807 (diff)
downloadgcc-2cace1cd683318e83e8a613f1aa2f2b16e37a342.zip
gcc-2cace1cd683318e83e8a613f1aa2f2b16e37a342.tar.gz
gcc-2cace1cd683318e83e8a613f1aa2f2b16e37a342.tar.bz2
rtl-optimization: Fix data flow maintenance bug in reg-stack.c [pr97777]
reg-stack pass does not maintain the data flow information correctly. call df_insn_rescan_all after the transformation is done. gcc/ PR rtl-optimization/97777 * reg-stack.c (rest_of_handle_stack_regs): call df_insn_rescan_all if reg_to_stack return true. gcc/testsuite/ PR rtl-optimization/97777 * gcc.target/i386/pr97777.c: New test.
Diffstat (limited to 'gcc/reg-stack.c')
-rw-r--r--gcc/reg-stack.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/reg-stack.c b/gcc/reg-stack.c
index 8f98bd8..3dab843 100644
--- a/gcc/reg-stack.c
+++ b/gcc/reg-stack.c
@@ -3426,7 +3426,8 @@ static unsigned int
rest_of_handle_stack_regs (void)
{
#ifdef STACK_REGS
- reg_to_stack ();
+ if (reg_to_stack ())
+ df_insn_rescan_all ();
regstack_completed = 1;
#endif
return 0;