[Bug target/59401] [SH] GBR addressing mode optimization produces wrong code

2016-08-12 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59401 Oleg Endo changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug target/59401] [SH] GBR addressing mode optimization produces wrong code

2014-10-16 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59401 --- Comment #13 from Oleg Endo --- Author: olegendo Date: Thu Oct 16 12:21:29 2014 New Revision: 216314 URL: https://gcc.gnu.org/viewcvs?rev=216314&root=gcc&view=rev Log: gcc/ PR target/59401 * config/sh/sh.h (CALL_REALLY_USED_REGISTERS)

[Bug target/59401] [SH] GBR addressing mode optimization produces wrong code

2014-10-15 Thread kkojima at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59401 --- Comment #12 from Kazumoto Kojima --- (In reply to Oleg Endo from comment #11) > Kaz, could you please add the attached patch to your test run? No new failures for the top level "make -k check" on sh4-unknown-linux-gnu.

[Bug target/59401] [SH] GBR addressing mode optimization produces wrong code

2014-10-15 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59401 --- Comment #11 from Oleg Endo --- Created attachment 33723 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33723&action=edit Make GBR call preserved by default (In reply to Oleg Endo from comment #10) > (In reply to Kazumoto Kojima from co

[Bug target/59401] [SH] GBR addressing mode optimization produces wrong code

2014-10-13 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59401 --- Comment #10 from Oleg Endo --- (In reply to Kazumoto Kojima from comment #9) > (In reply to Oleg Endo from comment #8) > > change the > > value for gbr in sh.h CALL_USED_REGISTERS from '1' to '0' and confirm that > > everything is still OK? >

[Bug target/59401] [SH] GBR addressing mode optimization produces wrong code

2014-10-13 Thread kkojima at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59401 --- Comment #9 from Kazumoto Kojima --- (In reply to Oleg Endo from comment #8) > change the > value for gbr in sh.h CALL_USED_REGISTERS from '1' to '0' and confirm that > everything is still OK? The comment and document about CALL_USED_REGISTER

[Bug target/59401] [SH] GBR addressing mode optimization produces wrong code

2014-10-13 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59401 --- Comment #8 from Oleg Endo --- (In reply to Kazumoto Kojima from comment #7) > (In reply to Oleg Endo from comment #6) > > Kaz, what's your opinion on making GBR to be call preserved by default? > > Looks OK to me for 5.0. It's clearly an AB

[Bug target/59401] [SH] GBR addressing mode optimization produces wrong code

2014-10-13 Thread kkojima at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59401 --- Comment #7 from Kazumoto Kojima --- (In reply to Oleg Endo from comment #6) > Kaz, what's your opinion on making GBR to be call preserved by default? Looks OK to me for 5.0. It's clearly an ABI change but a change to the more robust directi

[Bug target/59401] [SH] GBR addressing mode optimization produces wrong code

2014-10-13 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59401 --- Comment #6 from Oleg Endo --- (In reply to Oleg Endo from comment #5) > Ugh, there's actually another problem with this thing, I think: > > ... > > By default, GBR is marked as call-clobbered. Currently, if the GBR mem > optimization thing

[Bug target/59401] [SH] GBR addressing mode optimization produces wrong code

2014-10-13 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59401 --- Comment #5 from Oleg Endo --- Ugh, there's actually another problem with this thing, I think: void other (void); int test0 (void) { int x = ((int*)__builtin_thread_pointer ())[2]; other (); return ((int*)__builtin_thread_pointer ())

[Bug target/59401] [SH] GBR addressing mode optimization produces wrong code

2014-10-12 Thread kkojima at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59401 --- Comment #4 from Kazumoto Kojima --- (In reply to Oleg Endo from comment #3) > Do you have an opinion on that? Looks the latter is enough for the released branches. I'm OK with eather way, though.

[Bug target/59401] [SH] GBR addressing mode optimization produces wrong code

2014-10-12 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59401 Oleg Endo changed: What|Removed |Added CC||kkojima at gcc dot gnu.org --- Comment #3 fr

[Bug target/59401] [SH] GBR addressing mode optimization produces wrong code

2014-10-12 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59401 --- Comment #2 from Oleg Endo --- Author: olegendo Date: Sun Oct 12 23:14:07 2014 New Revision: 216128 URL: https://gcc.gnu.org/viewcvs?rev=216128&root=gcc&view=rev Log: gcc/ PR target/59401 * config/sh/sh-protos (sh_find_equiv_gbr_addr)

[Bug target/59401] [SH] GBR addressing mode optimization produces wrong code

2013-12-05 Thread olegendo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59401 --- Comment #1 from Oleg Endo --- An example where the base address is retrieved from the GBR in one basic block, but used in different basic blocks: struct tcb_t { int x, y, z, w; }; int test_01 (int a, tcb_t* b, int c) { tcb_t* tcb = (tcb_