re PR target/59401 ([SH] GBR addressing mode optimization produces wrong code)
authorOleg Endo <olegendo@gcc.gnu.org>
Sun, 12 Oct 2014 23:14:07 +0000 (23:14 +0000)
committerOleg Endo <olegendo@gcc.gnu.org>
Sun, 12 Oct 2014 23:14:07 +0000 (23:14 +0000)
commit4eac9c2b0207ed53bc35898af9586987ee7733c9
tree610e90d2b517f700340fd9cb8457211a19491af4
parent2a22f99cb12d82712dd93cfef808b1cef543601b
re PR target/59401 ([SH] GBR addressing mode optimization produces wrong code)

gcc/
PR target/59401
* config/sh/sh-protos (sh_find_equiv_gbr_addr): Use rtx_insn* instead
of rtx.
* config/sh/sh.c (sh_find_equiv_gbr_addr): Use def chains instead of
insn walking.
(sh_find_equiv_gbr_addr): Do nothing if input mem is already a GBR
address.  Use def chains to handle GBR clobbering call insns.

gcc/testsuite/
PR target/59401
PR target/54760
* gcc.target/pr54760-5.c: New.
* gcc.target/pr54760-6.c: New.
* gcc.target/sh/pr59401-1.c: New.

From-SVN: r216128
gcc/ChangeLog
gcc/config/sh/sh-protos.h
gcc/config/sh/sh.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/sh/pr54760-5.c [new file with mode: 0644]
gcc/testsuite/gcc.target/sh/pr54760-6.c [new file with mode: 0644]
gcc/testsuite/gcc.target/sh/pr59401-1.c [new file with mode: 0644]