[Bug target/51244] [SH] Inefficient conditional branch and code around T bit

2016-09-27 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51244 --- Comment #88 from Oleg Endo --- Author: olegendo Date: Tue Sep 27 12:50:27 2016 New Revision: 240533 URL: https://gcc.gnu.org/viewcvs?rev=240533=gcc=rev Log: gcc/ PR target/51244 * config/sh/sh.c (sh_rtx_costs): Fix return

[Bug target/51244] [SH] Inefficient conditional branch and code around T bit

2016-09-25 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51244 --- Comment #87 from Oleg Endo --- Author: olegendo Date: Sun Sep 25 06:59:37 2016 New Revision: 240471 URL: https://gcc.gnu.org/viewcvs?rev=240471=gcc=rev Log: This fixes a fallout that actually goes back to 5.0 but went unnoticed. The costs

[Bug target/51244] [SH] Inefficient conditional branch and code around T bit

2015-03-01 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51244 Oleg Endo olegendo at gcc dot gnu.org changed: What|Removed |Added Status|ASSIGNED|RESOLVED

[Bug target/51244] [SH] Inefficient conditional branch and code around T bit

2015-01-24 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51244 --- Comment #85 from Oleg Endo olegendo at gcc dot gnu.org --- Author: olegendo Date: Sat Jan 24 13:04:53 2015 New Revision: 220081 URL: https://gcc.gnu.org/viewcvs?rev=220081root=gccview=rev Log: gcc/ PR target/49263 PR target/53987

[Bug target/51244] [SH] Inefficient conditional branch and code around T bit

2014-12-24 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51244 --- Comment #84 from Oleg Endo olegendo at gcc dot gnu.org --- Author: olegendo Date: Wed Dec 24 21:55:59 2014 New Revision: 219062 URL: https://gcc.gnu.org/viewcvs?rev=219062root=gccview=rev Log: gcc/ PR target/51244 * config/sh/sh.md

[Bug target/51244] [SH] Inefficient conditional branch and code around T bit

2014-12-17 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51244 --- Comment #81 from Oleg Endo olegendo at gcc dot gnu.org --- Author: olegendo Date: Wed Dec 17 22:52:21 2014 New Revision: 218847 URL: https://gcc.gnu.org/viewcvs?rev=218847root=gccview=rev Log: gcc/ PR target/51244 *

[Bug target/51244] [SH] Inefficient conditional branch and code around T bit

2014-12-17 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51244 --- Comment #82 from Oleg Endo olegendo at gcc dot gnu.org --- Author: olegendo Date: Wed Dec 17 23:08:14 2014 New Revision: 218850 URL: https://gcc.gnu.org/viewcvs?rev=218850root=gccview=rev Log: gcc/ PR target/51244 *

[Bug target/51244] [SH] Inefficient conditional branch and code around T bit

2014-12-17 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51244 --- Comment #83 from Oleg Endo olegendo at gcc dot gnu.org --- (In reply to Oleg Endo from comment #71) * The RTL pass does the treg combine only when there is a conditional branch. It should also handle conditional move insns

[Bug target/51244] [SH] Inefficient conditional branch and code around T bit

2014-11-30 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51244 --- Comment #80 from Oleg Endo olegendo at gcc dot gnu.org --- Author: olegendo Date: Mon Dec 1 06:50:06 2014 New Revision: 218200 URL: https://gcc.gnu.org/viewcvs?rev=218200root=gccview=rev Log: gcc/ PR target/63986 PR target/51244

[Bug target/51244] [SH] Inefficient conditional branch and code around T bit

2014-11-22 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51244 --- Comment #77 from Oleg Endo olegendo at gcc dot gnu.org --- Author: olegendo Date: Sat Nov 22 15:06:34 2014 New Revision: 217968 URL: https://gcc.gnu.org/viewcvs?rev=217968root=gccview=rev Log: gcc/ PR target/63986 PR target/51244

[Bug target/51244] [SH] Inefficient conditional branch and code around T bit

2014-11-22 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51244 --- Comment #78 from Oleg Endo olegendo at gcc dot gnu.org --- Author: olegendo Date: Sat Nov 22 15:50:10 2014 New Revision: 217969 URL: https://gcc.gnu.org/viewcvs?rev=217969root=gccview=rev Log: gcc/ PR target/63783 PR target/51244

[Bug target/51244] [SH] Inefficient conditional branch and code around T bit

2014-11-22 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51244 --- Comment #79 from Oleg Endo olegendo at gcc dot gnu.org --- Author: olegendo Date: Sat Nov 22 16:07:25 2014 New Revision: 217970 URL: https://gcc.gnu.org/viewcvs?rev=217970root=gccview=rev Log: gcc/ Backport from mainline 2014-11-22

[Bug target/51244] [SH] Inefficient conditional branch and code around T bit

2014-09-13 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51244 --- Comment #76 from Oleg Endo olegendo at gcc dot gnu.org --- When compiling the libgcc divsc3 from PR 55212 with -O2 -m2 -ml (on sh-lra branch) the following sequences are generated: tst r0,r0 subcr0,r0 ! r0: T == 0

[Bug target/51244] [SH] Inefficient conditional branch and code around T bit

2014-05-16 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51244 --- Comment #75 from Oleg Endo olegendo at gcc dot gnu.org --- Author: olegendo Date: Fri May 16 22:54:32 2014 New Revision: 210535 URL: http://gcc.gnu.org/viewcvs?rev=210535root=gccview=rev Log: gcc/ PR target/51244 * config/sh/sh.c

[Bug target/51244] [SH] Inefficient conditional branch and code around T bit

2013-12-06 Thread olegendo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51244 --- Comment #73 from Oleg Endo olegendo at gcc dot gnu.org --- Author: olegendo Date: Fri Dec 6 10:46:53 2013 New Revision: 205734 URL: http://gcc.gnu.org/viewcvs?rev=205734root=gccview=rev Log: PR target/51244 PR target/59343 *

[Bug target/51244] [SH] Inefficient conditional branch and code around T bit

2013-12-05 Thread olegendo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51244 --- Comment #72 from Oleg Endo olegendo at gcc dot gnu.org --- The original test case in PR 59343 is an interesting one with regard to T bit optimizations (or the lack thereof): void validate_number (char **numbertext) { char *ptr =

[Bug target/51244] [SH] Inefficient conditional branch and code around T bit

2013-10-12 Thread olegendo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51244 --- Comment #70 from Oleg Endo olegendo at gcc dot gnu.org --- Author: olegendo Date: Sat Oct 12 20:47:22 2013 New Revision: 203492 URL: http://gcc.gnu.org/viewcvs?rev=203492root=gccview=rev Log: PR target/51244 *

[Bug target/51244] [SH] Inefficient conditional branch and code around T bit

2013-10-12 Thread olegendo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51244 --- Comment #71 from Oleg Endo olegendo at gcc dot gnu.org --- (In reply to Oleg Endo from comment #70) Author: olegendo Date: Sat Oct 12 20:47:22 2013 New Revision: 203492 The issue raised in comment #59 has been fixed on 4.9. There are

[Bug target/51244] [SH] Inefficient conditional branch and code around T bit

2013-10-03 Thread olegendo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51244 Oleg Endo olegendo at gcc dot gnu.org changed: What|Removed |Added Attachment #30889|0 |1 is

[Bug target/51244] [SH] Inefficient conditional branch and code around T bit

2013-09-24 Thread olegendo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51244 Oleg Endo olegendo at gcc dot gnu.org changed: What|Removed |Added Attachment #30689|0 |1 is

[Bug target/51244] [SH] Inefficient conditional branch and code around T bit

2013-08-22 Thread olegendo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51244 --- Comment #66 from Oleg Endo olegendo at gcc dot gnu.org --- Created attachment 30689 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=30689action=edit WIP RTL pass Just wanted to give an update on the issue. I've been writing an SH specific

[Bug target/51244] [SH] Inefficient conditional branch and code around T bit

2013-08-22 Thread kkojima at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51244 --- Comment #67 from Kazumoto Kojima kkojima at gcc dot gnu.org --- (In reply to Oleg Endo from comment #66) Kaz, the WIP status aside, would you be OK with something like that? Yep. Sounds good to me.

[Bug target/51244] [SH] Inefficient conditional branch and code around T bit

2013-07-31 Thread olegendo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51244 --- Comment #65 from Oleg Endo olegendo at gcc dot gnu.org --- (In reply to Oleg Endo from comment #64) would be simplified to this: mov.l @(4,r4),r1 tst r1,r1 // T = @(4,r4) == 0 .L3: bt/s.L5

[Bug target/51244] [SH] Inefficient conditional branch and code around T bit

2013-07-28 Thread olegendo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51244 --- Comment #63 from Oleg Endo olegendo at gcc dot gnu.org --- Created attachment 30566 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=30566action=edit Reduced test (In reply to Laurent Aflonsi from comment #58) Created attachment 30524

[Bug target/51244] [SH] Inefficient conditional branch and code around T bit

2013-07-28 Thread olegendo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51244 --- Comment #64 from Oleg Endo olegendo at gcc dot gnu.org --- (In reply to Laurent Aflonsi from comment #61) The movt(L2) and the tst(L3) are both removed, and that's coherent for that run path, because it is preceded by the tst r2,r2. But

[Bug target/51244] [SH] Inefficient conditional branch and code around T bit

2013-07-27 Thread olegendo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51244 --- Comment #62 from Oleg Endo olegendo at gcc dot gnu.org --- (In reply to Laurent Aflonsi from comment #61) More generally, I'm surprised to see that optimization at mapping level, isn't this a generic problematic that should be handled at

[Bug target/51244] [SH] Inefficient conditional branch and code around T bit

2013-07-23 Thread laurent.alfonsi at st dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51244 --- Comment #61 from Laurent Aflonsi laurent.alfonsi at st dot com --- Yes that's the point. L3 can be reached by another block (L2): tstr2,r2 mov#-1,r2 negcr2,r2 .L3: tstr2,r2 bt/s.L11 [...] .L2:

[Bug target/51244] [SH] Inefficient conditional branch and code around T bit

2013-07-20 Thread olegendo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51244 --- Comment #60 from Oleg Endo olegendo at gcc dot gnu.org --- (In reply to Laurent Aflonsi from comment #59) I have a functional regression due to this improvement when we are compiling the enclosed example in -O2. $ sh-superh-elf-gcc -O2

[Bug target/51244] [SH] Inefficient conditional branch and code around T bit

2013-07-18 Thread laurent.alfonsi at st dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51244 Laurent Aflonsi laurent.alfonsi at st dot com changed: What|Removed |Added CC|

[Bug target/51244] [SH] Inefficient conditional branch and code around T bit

2013-07-18 Thread laurent.alfonsi at st dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51244 --- Comment #59 from Laurent Aflonsi laurent.alfonsi at st dot com --- I have a functional regression due to this improvement when we are compiling the enclosed example in -O2. $ sh-superh-elf-gcc -O2 pr51244-20-main.c pr51244-20.c $

[Bug target/51244] [SH] Inefficient conditional branch and code around T bit

2012-11-03 Thread olegendo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51244 --- Comment #57 from Oleg Endo olegendo at gcc dot gnu.org 2012-11-03 12:01:05 UTC --- Author: olegendo Date: Sat Nov 3 12:01:01 2012 New Revision: 193119 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=193119 Log: PR

[Bug target/51244] [SH] Inefficient conditional branch and code around T bit

2012-10-15 Thread olegendo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51244 --- Comment #56 from Oleg Endo olegendo at gcc dot gnu.org 2012-10-15 22:08:14 UTC --- Author: olegendo Date: Mon Oct 15 22:08:07 2012 New Revision: 192481 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=192481 Log: PR

[Bug target/51244] [SH] Inefficient conditional branch and code around T bit

2012-10-11 Thread olegendo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51244 --- Comment #55 from Oleg Endo olegendo at gcc dot gnu.org 2012-10-12 00:41:31 UTC --- Author: olegendo Date: Fri Oct 12 00:41:23 2012 New Revision: 192387 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=192387 Log: PR

[Bug target/51244] [SH] Inefficient conditional branch and code around T bit

2012-10-03 Thread olegendo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51244 --- Comment #54 from Oleg Endo olegendo at gcc dot gnu.org 2012-10-03 21:39:22 UTC --- Author: olegendo Date: Wed Oct 3 21:39:18 2012 New Revision: 192052 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=192052 Log: PR

[Bug target/51244] [SH] Inefficient conditional branch and code around T bit

2012-09-23 Thread olegendo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51244 Oleg Endo olegendo at gcc dot gnu.org changed: What|Removed |Added Summary|SH Target: Inefficient |[SH]

[Bug target/51244] [SH] Inefficient conditional branch and code around T bit

2012-09-23 Thread olegendo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51244 --- Comment #53 from Oleg Endo olegendo at gcc dot gnu.org 2012-09-23 21:41:55 UTC --- Another case that seems to go awry: int test_1 (int a, int b, int c, int* d) { bool x = a == 0; d[2] = !x; return x ? b : c; } -O2 -m4: