diff options
author | Jeff Law <law@redhat.com> | 2010-11-18 07:34:29 -0700 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2010-11-18 07:34:29 -0700 |
commit | 12c2b0adb1afc982d140aae47be336730e1484b1 (patch) | |
tree | 1aa8d0cd58fc831d4d7e1f4b79f832849d03932c /gcc/postreload.c | |
parent | d96283a052cc3e9db9c7fc3e1cf3f85632611de2 (diff) | |
download | gcc-12c2b0adb1afc982d140aae47be336730e1484b1.zip gcc-12c2b0adb1afc982d140aae47be336730e1484b1.tar.gz gcc-12c2b0adb1afc982d140aae47be336730e1484b1.tar.bz2 |
re PR middle-end/46297 (gfortran.dg/g77/980701-0.f FAILs with -Os -fno-asynchronous-unwind-tables)
PR middle-end-optimization/46297
* postreload.c (reload_combine_note_store): Deal with embedded
side effects in MEM expressions.
* gfortran.dg/pr46297.f: New test.
From-SVN: r166905
Diffstat (limited to 'gcc/postreload.c')
-rw-r--r-- | gcc/postreload.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/postreload.c b/gcc/postreload.c index 1772c9e..6bbdf3a 100644 --- a/gcc/postreload.c +++ b/gcc/postreload.c @@ -1409,6 +1409,31 @@ reload_combine_note_store (rtx dst, const_rtx set, void *data ATTRIBUTE_UNUSED) GET_MODE (dst)); dst = SUBREG_REG (dst); } + + /* Some targets do argument pushes without adding REG_INC notes. */ + + if (MEM_P (dst)) + { + dst = XEXP (dst, 0); + if (GET_CODE (dst) == PRE_INC || GET_CODE (dst) == POST_INC + || GET_CODE (dst) == PRE_DEC || GET_CODE (dst) == POST_DEC) + { + regno = REGNO (XEXP (dst, 0)); + mode = GET_MODE (XEXP (dst, 0)); + for (i = hard_regno_nregs[regno][mode] - 1 + regno; i >= regno; i--) + { + /* We could probably do better, but for now mark the register + as used in an unknown fashion and set/clobbered at this + insn. */ + reg_state[i].use_index = -1; + reg_state[i].store_ruid = reload_combine_ruid; + reg_state[i].real_store_ruid = reload_combine_ruid; + } + } + else + return; + } + if (!REG_P (dst)) return; regno += REGNO (dst); |