[SH][committed] FIx PR 67657
Oleg Endo
oleg.endo@t-online.de
Mon Sep 21 13:07:00 GMT 2015
Hi,
This fixes PR 67657 on trunk. It seems that something after the
peephole2 pass is not happy to see things like:
mov.l @r2+,r2
which some of the SH peephole2 patterns create out of e.g.
mov.l @r2+,r0
mov r0,r2
The post-inc is a bit pointless, so this patch catches such cases and
replaces the address in the mem with a non-post-inc address.
Tested on sh-elf with
make -k check RUNTESTFLAGS="--target_board=sh-sim
\{-m2/-ml,-m2/-mb,-m2a/-mb,-m4/-ml,-m4/-mb,-m4a/-ml,-m4a/-mb}"
Committed as r227969.
A backport to GCC 5 will follow.
Cheers,
Oleg
gcc/ChangeLog:
PR target/67657
* config/sh/sh.c (sh_remove_overlapping_post_inc,
sh_peephole_emit_move_insn): Add new functions.
* config/sh/sh-protos.h (sh_remove_overlapping_post_inc,
sh_peephole_emit_move_insn): Declere them.
* config/sh/sh.md: Use them in various peephole2 patterns.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sh_pr67657.patch
Type: text/x-patch
Size: 4076 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20150921/bda74a58/attachment.bin>
More information about the Gcc-patches
mailing list