This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/67657] [SH][5]: internal compiler error: in cselib_record_set, at cselib.c:2396 when compiling libjpeg-turbo
- From: "olegendo at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 21 Sep 2015 05:15:07 +0000
- Subject: [Bug target/67657] [SH][5]: internal compiler error: in cselib_record_set, at cselib.c:2396 when compiling libjpeg-turbo
- Auto-submitted: auto-generated
- References: <bug-67657-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67657
--- Comment #7 from Oleg Endo <olegendo at gcc dot gnu.org> ---
Created attachment 36357
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36357&action=edit
Proposed patch
Although a "mov @r2+,r2" is actually possible and valid (r2 will contain the
value loaded from memory, AFAIR), it doesn't make sense to keep the post-inc,
as the result will be overwritten anyway. The patch catches those cases in the
peepholes and removes the post-inc. I'm now testing this on sh-elf.