[Bug target/65162] [5 Regression][SH] Redundant tests when storing bswapped T bit result in unaligned mem

2015-02-22 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65162 Oleg Endo olegendo at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |NEW Last

[Bug target/65164] New: [5 Regression][SH] missed subc in integer sign function

2015-02-22 Thread olegendo at gcc dot gnu.org
Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: olegendo at gcc dot gnu.org Target: sh*-*-* These are integer sign functions taken from a book. For some of them the code got worse after the introduction of the treg_set_expr stuff

[Bug target/65166] New: [SH] use div1 to do R[n] = ((R[n] 1) | T) - R[m]

2015-02-22 Thread olegendo at gcc dot gnu.org
: target Assignee: unassigned at gcc dot gnu.org Reporter: olegendo at gcc dot gnu.org Target: sh*-*-* The single-step division instruction 'div1 Rm,Rn' does R[n] = ((R[n] 1) | T) - R[m] if M = 0 and Q = 0. Thus it could be utilized to do that calculation. I've

[Bug target/61142] [SH] QImode/HImode @(R0,Rm),Rn does not load to Rn = R0

2015-02-22 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61142 --- Comment #4 from Oleg Endo olegendo at gcc dot gnu.org --- Created attachment 34839 -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=34839action=edit A set of peepholes This is a set of peepholes I have accumulated, although untested

[Bug target/65153] [SH][4.9 Regression] insn does not satisfy its constraints when compiling libmcrypt

2015-02-22 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65153 --- Comment #9 from Oleg Endo olegendo at gcc dot gnu.org --- (In reply to Oleg Endo from comment #8) I've tried to disable the peephole on trunk and compared CSiBE results. It seems the peephole doesn't hit very often: sum: 3371887

[Bug target/65153] [SH][4.9 Regression] insn does not satisfy its constraints when compiling libmcrypt

2015-02-22 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65153 --- Comment #11 from Oleg Endo olegendo at gcc dot gnu.org --- Sure. I was actually referring to trunk all the time :) I agree to remove the problematic peephole on 4.9 branch.

[Bug target/65151] [SH][4.9 Regression] Internal compiler error when trying to build libav 11.2 on sh4

2015-02-21 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65151 --- Comment #6 from Oleg Endo olegendo at gcc dot gnu.org --- (In reply to Oleg Endo from comment #5) The problem is the following insn: (insn 45 11 12 2 (set (reg:HI 168 [ x ]) (subreg/s/u:HI (reg:SI 147 t) 0)) cchMsw9Z.out:9 -1

[Bug target/65151] [SH][4.9 Regression] Internal compiler error when trying to build libav 11.2 on sh4

2015-02-21 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65151 --- Comment #7 from Oleg Endo olegendo at gcc dot gnu.org --- The following fixes the problem: Index: gcc/config/sh/sh.c === --- gcc/config/sh/sh.c(revision 220889) +++ gcc

[Bug target/65153] [SH][4.9 Regression] insn does not satisfy its constraints when compiling libmcrypt

2015-02-21 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65153 Oleg Endo olegendo at gcc dot gnu.org changed: What|Removed |Added CC||kkojima at gcc

[Bug target/65151] Internal compiler error when trying to build libav 11.2 on sh4

2015-02-21 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65151 Oleg Endo olegendo at gcc dot gnu.org changed: What|Removed |Added CC||olegendo at gcc

[Bug target/65153] sh: insn does not satisfy its constraints when compiling libmcrypt

2015-02-21 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65153 Oleg Endo olegendo at gcc dot gnu.org changed: What|Removed |Added CC||olegendo at gcc

[Bug target/65151] [SH][4.9 Regression] Internal compiler error when trying to build libav 11.2 on sh4

2015-02-21 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65151 Oleg Endo olegendo at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |NEW Last

[Bug target/65153] [SH][4.9 Regression] insn does not satisfy its constraints when compiling libmcrypt

2015-02-21 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65153 Oleg Endo olegendo at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |NEW Last

[Bug target/65153] [SH][4.9 Regression] insn does not satisfy its constraints when compiling libmcrypt

2015-02-21 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65153 Oleg Endo olegendo at gcc dot gnu.org changed: What|Removed |Added Summary|sh: insn does not satisfy |[SH][4.9

[Bug target/65151] [SH][4.9 Regression] Internal compiler error when trying to build libav 11.2 on sh4

2015-02-21 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65151 --- Comment #4 from Oleg Endo olegendo at gcc dot gnu.org --- Created attachment 34825 -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=34825action=edit a reduced test case

[Bug target/65151] [SH][4.9 Regression] Internal compiler error when trying to build libav 11.2 on sh4

2015-02-21 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65151 --- Comment #5 from Oleg Endo olegendo at gcc dot gnu.org --- The problem is the following insn: (insn 45 11 12 2 (set (reg:HI 168 [ x ]) (subreg/s/u:HI (reg:SI 147 t) 0)) cchMsw9Z.out:9 -1 (expr_list:REG_DEAD (reg:SI 147 t

[Bug target/64793] [SH] missed delay slot

2015-02-17 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64793 --- Comment #5 from Oleg Endo olegendo at gcc dot gnu.org --- Author: olegendo Date: Tue Feb 17 21:08:24 2015 New Revision: 220772 URL: https://gcc.gnu.org/viewcvs?rev=220772root=gccview=rev Log: gcc/ PR target/64793 * config/sh/sh.md

[Bug target/59375] internal compiler error: in expand_shift_1, at expmed.c:2245

2015-02-17 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59375 Oleg Endo olegendo at gcc dot gnu.org changed: What|Removed |Added CC||glaubitz

[Bug target/59375] internal compiler error: in expand_shift_1, at expmed.c:2245

2015-02-17 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59375 Oleg Endo olegendo at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED

[Bug target/64793] [SH] missed delay slot

2015-02-17 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64793 Oleg Endo olegendo at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED

[Bug target/64793] [SH] missed delay slot

2015-02-15 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64793 --- Comment #4 from Oleg Endo olegendo at gcc dot gnu.org --- Thanks! If I'm not mistaken, it looks like there's an overall improvement of ~0.35%. I think I'll go with it.

[Bug target/65069] New: [SH] Calculate constants

2015-02-15 Thread olegendo at gcc dot gnu.org
: unassigned at gcc dot gnu.org Reporter: olegendo at gcc dot gnu.org Target: sh*-*-* If constants don't fit into K08 or I08 they are usually placed into the constant pool and loaded using a PC-relative load. Some constants however can be calculated with 2..3 arithmetic insns

[Bug c/64833] [SH]: Error: pcrel too far when compiling imagemagick and graphicsmagick on Debian sh4

2015-02-15 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64833 Oleg Endo olegendo at gcc dot gnu.org changed: What|Removed |Added Target||sh

[Bug target/64833] [SH]: Error: pcrel too far when compiling imagemagick and graphicsmagick on Debian sh4

2015-02-15 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64833 --- Comment #2 from Oleg Endo olegendo at gcc dot gnu.org --- Would it be possible for you to pull a precompiled source from the build via the '-save-temps' option?

[Bug target/64793] [SH] missed delay slot

2015-02-14 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64793 Oleg Endo olegendo at gcc dot gnu.org changed: What|Removed |Added CC||kkojima at gcc

[Bug target/59375] internal compiler error: in expand_shift_1, at expmed.c:2245

2015-02-12 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59375 --- Comment #7 from Oleg Endo olegendo at gcc dot gnu.org --- Any updates regarding this problem?

[Bug other/29842] [meta-bug] outstanding patches / issues from STMicroelectronics

2015-02-11 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=29842 Bug 29842 depends on bug 29849, which changed state. Bug 29849 Summary: sh-linux uses inefficient multilib https://gcc.gnu.org/bugzilla/show_bug.cgi?id=29849 What|Removed |Added

[Bug target/29849] sh-linux uses inefficient multilib

2015-02-11 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=29849 Oleg Endo olegendo at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED

[Bug middle-end/64974] [SH] Weird expansion of 'expected' operand in atomic_compare_and_swapmode

2015-02-10 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64974 --- Comment #2 from Oleg Endo olegendo at gcc dot gnu.org --- The problem got slightly worse with r220594. The dead store to the stack frame is not eliminated anymore. Before the memory operands' addresses were loaded into a reg using

[Bug target/64661] [SH] Allow @(disp,reg) address mode for atomics

2015-02-10 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64661 Oleg Endo olegendo at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED

[Bug target/64479] [4.8 Regression][SH] wrong optimization delayed-branch

2015-02-10 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64479 Oleg Endo olegendo at gcc dot gnu.org changed: What|Removed |Added Status|NEW |RESOLVED

[Bug target/29849] sh-linux uses inefficient multilib

2015-02-10 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=29849 Oleg Endo olegendo at gcc dot gnu.org changed: What|Removed |Added CC||kkojima at gcc

[Bug target/64661] [SH] Allow @(disp,reg) address mode for atomics

2015-02-10 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64661 --- Comment #1 from Oleg Endo olegendo at gcc dot gnu.org --- Author: olegendo Date: Tue Feb 10 20:47:33 2015 New Revision: 220594 URL: https://gcc.gnu.org/viewcvs?rev=220594root=gccview=rev Log: gcc/ PR target/64661 * config/sh/sh

[Bug middle-end/64974] [SH] Weird expansion of 'expected' operand in atomic_compare_and_swapmode

2015-02-10 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64974 --- Comment #1 from Oleg Endo olegendo at gcc dot gnu.org --- Author: olegendo Date: Tue Feb 10 20:47:33 2015 New Revision: 220594 URL: https://gcc.gnu.org/viewcvs?rev=220594root=gccview=rev Log: gcc/ PR target/64661 * config/sh/sh

[Bug target/55302] [SH] Add support for logical ops with GBR mems

2015-02-08 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55302 --- Comment #1 from Oleg Endo olegendo at gcc dot gnu.org --- If the atomic model allows it, the GBR logical ops can also be to implement atomic operations on GBR relative memory.

[Bug middle-end/64974] New: [SH] Weird expansion of 'expected' operand in atomic_compare_and_swapmode

2015-02-08 Thread olegendo at gcc dot gnu.org
Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: olegendo at gcc dot gnu.org Target: sh*-*-* While working on PR 64661, I've noticed that the expansion of the atomic_compare_and_swapmode pattern's 'expected

[Bug target/50751] SH Target: Displacement addressing does not work for QImode and HImode

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

[Bug target/64660] [SH] Convert atomic_fetch_op to atomic_op_fetch

2015-02-05 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64660 Oleg Endo olegendo at gcc dot gnu.org changed: What|Removed |Added Status|NEW |RESOLVED

[Bug target/64660] [SH] Convert atomic_fetch_op to atomic_op_fetch

2015-02-03 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64660 --- Comment #2 from Oleg Endo olegendo at gcc dot gnu.org --- Author: olegendo Date: Tue Feb 3 20:24:13 2015 New Revision: 220376 URL: https://gcc.gnu.org/viewcvs?rev=220376root=gccview=rev Log: gcc/ PR target/64660 * config/sh/sync.md

[Bug rtl-optimization/56590] Replace auto-inc-dec pass with generic address mode selection pass

2015-02-03 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56590 --- Comment #2 from Oleg Endo olegendo at gcc dot gnu.org --- (In reply to amker from comment #1) This surely sounds interesting. Like I suggested in PR62173, RTL optimizer might be able to do more in address expression re-association

[Bug target/64851] [SH] Add atomic not

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

[Bug target/64851] [SH] Add atomic not

2015-02-01 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64851 --- Comment #1 from Oleg Endo olegendo at gcc dot gnu.org --- Author: olegendo Date: Sun Feb 1 11:12:47 2015 New Revision: 220317 URL: https://gcc.gnu.org/viewcvs?rev=220317root=gccview=rev Log: gcc/ PR target/64851 * config/sh/sync.md

[Bug target/64659] [SH] Immedate values not used for atomic ops

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

[Bug target/53949] [SH] Add support for mac.w / mac.l instructions

2015-01-31 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53949 --- Comment #13 from Oleg Endo olegendo at gcc dot gnu.org --- A more interesting real-world example from libjpeg would be function jpeg_idct_ifast (jidctint.c). If we take the code as-is, there are few mac opportunities due to sharing

[Bug target/53949] [SH] Add support for mac.w / mac.l instructions

2015-01-30 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53949 Oleg Endo olegendo at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |NEW Last

[Bug target/64785] [5 Regression][SH] and|or|xor #imm not used

2015-01-28 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64785 --- Comment #2 from Oleg Endo olegendo at gcc dot gnu.org --- (In reply to Oleg Endo from comment #1) Another more radical approach could be to insert an RTL pass that pre-allocates the R0 reg for those insns that have z constraint

[Bug target/64659] [SH] Immedate values not used for atomic ops

2015-01-28 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64659 --- Comment #3 from Oleg Endo olegendo at gcc dot gnu.org --- Author: olegendo Date: Wed Jan 28 21:11:37 2015 New Revision: 220217 URL: https://gcc.gnu.org/viewcvs?rev=220217root=gccview=rev Log: gcc/ PR target/64659 * config/sh

[Bug target/64851] New: [SH] Add atomic not

2015-01-28 Thread olegendo at gcc dot gnu.org
: unassigned at gcc dot gnu.org Reporter: olegendo at gcc dot gnu.org Target: sh*-*-* Although the __atomic builtins cover only add,sub,or,xor,and,nand, an atomic not operation can be implicitly done by - xor (val, -1) - nand (val, -1) Combine is already trying to simplify

[Bug target/64660] [SH] Convert atomic_fetch_op to atomic_op_fetch

2015-01-28 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64660 Oleg Endo olegendo at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |NEW Last

[Bug target/64785] [5 Regression][SH] and|or|xor #imm not used

2015-01-27 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64785 Oleg Endo olegendo at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |NEW Last

[Bug target/53987] [SH] Unnecessary zero-extensions

2015-01-27 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53987 --- Comment #11 from Oleg Endo olegendo at gcc dot gnu.org --- (In reply to Oleg Endo from comment #9) Another related issue is this example function: unsigned char h (unsigned char a, int b) { return (unsigned char)(a + b

[Bug target/49263] SH Target: underutilized TST #imm, R0 instruction

2015-01-26 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49263 --- Comment #26 from Oleg Endo olegendo at gcc dot gnu.org --- Author: olegendo Date: Mon Jan 26 23:56:05 2015 New Revision: 220144 URL: https://gcc.gnu.org/viewcvs?rev=220144root=gccview=rev Log: gcc/ PR target/49263 * config/sh/sh.c

[Bug target/54236] [SH] Improve addc and subc insn utilization

2015-01-25 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54236 --- Comment #11 from Oleg Endo olegendo at gcc dot gnu.org --- Author: olegendo Date: Sun Jan 25 16:41:25 2015 New Revision: 220093 URL: https://gcc.gnu.org/viewcvs?rev=220093root=gccview=rev Log: gcc/testsuite/ PR target/54236

[Bug libstdc++/29366] atomics config for sh is weird

2015-01-25 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=29366 --- Comment #8 from Oleg Endo olegendo at gcc dot gnu.org --- Author: olegendo Date: Sun Jan 25 16:54:33 2015 New Revision: 220094 URL: https://gcc.gnu.org/viewcvs?rev=220094root=gccview=rev Log: libstdc++-v3/ PR target/29366 * config

[Bug target/59533] [SH] Missed cmp/pz opportunity

2015-01-25 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59533 --- Comment #5 from Oleg Endo olegendo at gcc dot gnu.org --- The issues mentioned above have been fixed by the treg_set_expr patch (r220081). There is one more thing, though: int test2 (int x) { return x 0; } It's effectively a lshiftrt 31

[Bug target/59533] [SH] Missed cmp/pz opportunity

2015-01-25 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59533 --- Comment #6 from Oleg Endo olegendo at gcc dot gnu.org --- (In reply to Oleg Endo from comment #5) The same would apply to: int test (unsigned char* x, int y, int z) { return ((*x 7) ^ 0) 1; } which compiles to mov.b @r4,r1

[Bug target/64792] New: [5 Regression][SH] movu.b movu.w not working

2015-01-25 Thread olegendo at gcc dot gnu.org
: target Assignee: unassigned at gcc dot gnu.org Reporter: olegendo at gcc dot gnu.org Target: sh*-*-* The treg_set_expr patch from r220081 disabled early matching of the SH2A movu.b and movu.w patterns during RTL expansion and combine. This was done because it's otherwise

[Bug target/64793] New: [SH] missed delay slot

2015-01-25 Thread olegendo at gcc dot gnu.org
: unassigned at gcc dot gnu.org Reporter: olegendo at gcc dot gnu.org Target: sh*-*-* The following test case int test0 (const char* x, int a, int b, int c) { if (x[a] == 92) return b; return c; } compiled with -O2 -m4 results in: mov r5,r0 mov.b

[Bug target/59533] [SH] Missed cmp/pz opportunity

2015-01-25 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59533 --- Comment #7 from Oleg Endo olegendo at gcc dot gnu.org --- If a shll is followed by a cbranch: unsigned int test_09_0 (int x, unsigned int y, unsigned int z) { return ~(x 31) ? y : z; } shllr4 bf .L4 mov

[Bug target/64785] New: [5 Regression][SH] and|or|xor #imm not used

2015-01-25 Thread olegendo at gcc dot gnu.org
Assignee: unassigned at gcc dot gnu.org Reporter: olegendo at gcc dot gnu.org Target: sh*-*-* It seems that for some reason loading a constant is now favored instead of using the #imm,R0 alternative. void test000 (int* x, int xb) { x[0] = xb 128; } void test001

[Bug c++/64786] New: Eliminate exceptions thrown/caught inside a function

2015-01-25 Thread olegendo at gcc dot gnu.org
Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: olegendo at gcc dot gnu.org If I'm not mistaken, in the following example: int test (int a, int b, int* c) { enum err_a_t { ERR_A }; enum err_b_t { ERR_B }; try { if ((a + b) == 123) throw ERR_A

[Bug target/52933] SH Target: Use div0s for integer sign comparisons

2015-01-24 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52933 --- Comment #7 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

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/64345] [SH] Improve single bit extraction

2015-01-24 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64345 --- Comment #1 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/59533] [SH] Missed cmp/pz opportunity

2015-01-24 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59533 --- Comment #4 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/54236] [SH] Improve addc and subc insn utilization

2015-01-24 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54236 --- Comment #10 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/53987] [SH] Unnecessary zero-extensions

2015-01-24 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53987 --- Comment #10 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/49263] SH Target: underutilized TST #imm, R0 instruction

2015-01-24 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49263 --- Comment #25 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 other/29842] [meta-bug] outstanding patches / issues from STMicroelectronics

2015-01-23 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=29842 --- Comment #5 from Oleg Endo olegendo at gcc dot gnu.org --- (In reply to Oleg Endo from comment #4) https://sourceware.org/bugzilla/show_bug.cgi?id=10373 https://sourceware.org/bugzilla/show_bug.cgi?id=10378 These two issues have been

[Bug target/64760] New: [SH] Avoid multiple #imm,r0 insns with the same #imm value

2015-01-23 Thread olegendo at gcc dot gnu.org
Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: olegendo at gcc dot gnu.org Target: sh*-*-* In libstdc++ there is code such as: mov r9,r0 cmp/eq #-1,r0 mov r1,r0 movtr2 cmp/eq

[Bug target/64736] New: [SH] ICE in dwarf2cfi.c:2318

2015-01-22 Thread olegendo at gcc dot gnu.org
Assignee: unassigned at gcc dot gnu.org Reporter: olegendo at gcc dot gnu.org Target: sh*-*-* The problem has been discovered by another patch here: https://gcc.gnu.org/ml/gcc-patches/2015-01/msg01962.html It seems that something is creating RTL which is confusing dwarf2cfi.c

[Bug target/53988] [SH] tst Rm,Rn not used for QI/HImode

2015-01-19 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53988 --- Comment #6 from Oleg Endo olegendo at gcc dot gnu.org --- Author: olegendo Date: Mon Jan 19 22:35:53 2015 New Revision: 219864 URL: https://gcc.gnu.org/viewcvs?rev=219864root=gccview=rev Log: gcc/ PR target/53988 * config/sh/sh

[Bug target/64652] [SH] ICE when using -mdiv=call-fp

2015-01-19 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64652 --- Comment #3 from Oleg Endo olegendo at gcc dot gnu.org --- Author: olegendo Date: Mon Jan 19 23:25:03 2015 New Revision: 219870 URL: https://gcc.gnu.org/viewcvs?rev=219870root=gccview=rev Log: gcc/testsuite/ PR target/64652

[Bug libstdc++/29366] atomics config for sh is weird

2015-01-18 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=29366 --- Comment #6 from Oleg Endo olegendo at gcc dot gnu.org --- Created attachment 34478 -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=34478action=edit proposed workaround patch There hasn't been any update for PR 53579. I'd like to propose

[Bug target/64652] [SH] ICE when using -mdiv=call-fp

2015-01-18 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64652 --- Comment #1 from Oleg Endo olegendo at gcc dot gnu.org --- Author: olegendo Date: Sun Jan 18 18:12:53 2015 New Revision: 219824 URL: https://gcc.gnu.org/viewcvs?rev=219824root=gccview=rev Log: gcc/ PR target/64652 * config/sh/sh.md

[Bug target/64652] [SH] ICE when using -mdiv=call-fp

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

[Bug target/64661] New: [SH] Allow @(disp,reg) address mode for atomics

2015-01-18 Thread olegendo at gcc dot gnu.org
: target Assignee: unassigned at gcc dot gnu.org Reporter: olegendo at gcc dot gnu.org Target: sh*-*-* Atomics that do not use the 'movli.l' and 'movco.l' insns should be able to use the '@(disp,reg)' address mode for SImode, since those don't have a R0 operand

[Bug target/64662] New: [SH] QImode/HImode atomics should return sign extended SImode values

2015-01-18 Thread olegendo at gcc dot gnu.org
Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: olegendo at gcc dot gnu.org Target: sh*-*-* Currently, QImode/HImode atomic insns return the values as such, although the memory loads actually do a sign extension

[Bug target/64660] New: [SH] Convert atomic_fetch_op to atomic_op_fetch

2015-01-18 Thread olegendo at gcc dot gnu.org
: target Assignee: unassigned at gcc dot gnu.org Reporter: olegendo at gcc dot gnu.org Target: sh*-*-* Example: void test2 (volatile int* mem) { __atomic_fetch_add (mem, 1, __ATOMIC_ACQ_REL); } void test3 (volatile int* mem) { __atomic_add_fetch (mem, 1

[Bug target/64659] [SH] Immedate values not used for atomic ops

2015-01-18 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64659 Oleg Endo olegendo at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |NEW Last

[Bug target/64659] [SH] Immedate values not used for atomic ops

2015-01-18 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64659 --- Comment #2 from Oleg Endo olegendo at gcc dot gnu.org --- The other issue is that atomic add insns for models other than 'hard-llcs' do not utilize the 'add #imm,Rn' insn at all, because those insns allow 'register_operand' only.

[Bug target/64659] New: [SH] Immedate values not used for atomic ops

2015-01-18 Thread olegendo at gcc dot gnu.org
: target Assignee: unassigned at gcc dot gnu.org Reporter: olegendo at gcc dot gnu.org Target: sh*-*-* Compiling the following example: void test4 (volatile int* mem) { __atomic_or_fetch (mem, 1, __ATOMIC_ACQ_REL); } with -O2 -m4a -m{l|b} -matomic-model=soft-gusa

[Bug target/60884] [SH] improve inlined strlen-like builtin functions

2015-01-17 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60884 --- Comment #5 from Oleg Endo olegendo at gcc dot gnu.org --- The test case gcc.target/sh/memset.c: void test00(char *dstb) { __builtin_memset (dstb, 0, 15); } compiles to: mov r4,r0 tst #3,r0 mov #0,r1

[Bug target/64652] New: [SH] ICE when using -mdiv=call-fp

2015-01-17 Thread olegendo at gcc dot gnu.org
Assignee: unassigned at gcc dot gnu.org Reporter: olegendo at gcc dot gnu.org Target: sh*-*-* Compiling the following example: int test (int a, int b, int c, int d) { return (a / b) + c + d; } with -O2 -m4 -ml -mdiv=call-fp results in: sh_tmp.cpp: In function 'test

[Bug target/53988] [SH] tst Rm,Rn not used for QI/HImode

2015-01-14 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53988 --- Comment #5 from Oleg Endo olegendo at gcc dot gnu.org --- Author: olegendo Date: Wed Jan 14 23:46:34 2015 New Revision: 219623 URL: https://gcc.gnu.org/viewcvs?rev=219623root=gccview=rev Log: gcc/ PR target/53988 * config/sh/sh

[Bug target/53987] [SH] Unnecessary zero-extensions

2015-01-14 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53987 --- Comment #9 from Oleg Endo olegendo at gcc dot gnu.org --- Another related issue is this example function: unsigned char h (unsigned char a, int b) { return (unsigned char)(a + b); } compiling with -O2 -mrenesas (which allows undefined

[Bug target/64479] [4.8 Regression][SH] wrong optimization delayed-branch

2015-01-13 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64479 --- Comment #8 from Oleg Endo olegendo at gcc dot gnu.org --- The issue should be fixed now. I'd like to keep this PR open for a while though. Maybe we can construct a runtime torture test case, although it seems a bit difficult.

[Bug target/61157] [SH] Implement TARGET_ATOMIC_ASSIGN_EXPAND_FENV

2015-01-12 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61157 Oleg Endo olegendo at gcc dot gnu.org changed: What|Removed |Added CC||kkojima at gcc

[Bug target/64479] [4.8 Regression][SH] wrong optimization delayed-branch

2015-01-12 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64479 --- Comment #5 from Oleg Endo olegendo at gcc dot gnu.org --- Author: olegendo Date: Tue Jan 13 00:30:57 2015 New Revision: 219506 URL: https://gcc.gnu.org/viewcvs?rev=219506root=gccview=rev Log: gcc/ PR target/64479 * rtlanal.c

[Bug target/64479] [4.8 Regression][SH] wrong optimization delayed-branch

2015-01-12 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64479 --- Comment #6 from Oleg Endo olegendo at gcc dot gnu.org --- Author: olegendo Date: Tue Jan 13 01:01:14 2015 New Revision: 219507 URL: https://gcc.gnu.org/viewcvs?rev=219507root=gccview=rev Log: gcc/ Backport form mainline 2015-01-13

[Bug target/61157] [SH] Implement TARGET_ATOMIC_ASSIGN_EXPAND_FENV

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

[Bug target/64479] [4.8 Regression][SH] wrong optimization delayed-branch

2015-01-12 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64479 --- Comment #7 from Oleg Endo olegendo at gcc dot gnu.org --- Author: olegendo Date: Tue Jan 13 01:18:56 2015 New Revision: 219508 URL: https://gcc.gnu.org/viewcvs?rev=219508root=gccview=rev Log: gcc/ Backport form mainline 2015-01-13

[Bug target/63321] [SH] Unused T bit result of shll / shlr insns

2015-01-11 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63321 --- Comment #6 from Oleg Endo olegendo at gcc dot gnu.org --- The shll/shlr insns effectively perform two operations: T = zero_extract single bit 0 / 31 from reg reg = reg 1 / reg 1. The other shift insns as in comment #5 perform only

[Bug target/64479] [4.8 Regression][SH] wrong optimization delayed-branch

2015-01-09 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64479 --- Comment #3 from Oleg Endo olegendo at gcc dot gnu.org --- (In reply to Oleg Endo from comment #2) I haven't checked it, but maybe this also helps PR 56451 in some way. Unfortunately it doesn't.

[Bug target/55212] [SH] Switch to LRA

2015-01-08 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #93 from Oleg Endo olegendo at gcc dot gnu.org --- Author: olegendo Date: Thu Jan 8 11:07:45 2015 New Revision: 219341 URL: https://gcc.gnu.org/viewcvs?rev=219341root=gccview=rev Log: gcc/ PR target/55212 * config/sh/sh.md

[Bug target/64479] [4.8 Regression][SH] wrong optimization delayed-branch

2015-01-06 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64479 Oleg Endo olegendo at gcc dot gnu.org changed: What|Removed |Added Target|sh3 |sh

[Bug target/64479] [4.8 Regression][SH] wrong optimization delayed-branch

2015-01-06 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64479 --- Comment #2 from Oleg Endo olegendo at gcc dot gnu.org --- The *cbranch_t splitter is done like 4 times, because there are 4 split passes. The last split pass is split5, which is done right after the delayed-branch pass. Before delayed

[Bug target/53987] [SH] Unnecessary zero-extensions

2014-12-30 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53987 --- Comment #8 from Oleg Endo olegendo at gcc dot gnu.org --- Author: olegendo Date: Tue Dec 30 17:26:18 2014 New Revision: 219110 URL: https://gcc.gnu.org/viewcvs?rev=219110root=gccview=rev Log: gcc/testsuite/ PR target/53987

[Bug target/49263] SH Target: underutilized TST #imm, R0 instruction

2014-12-30 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49263 --- Comment #23 from Oleg Endo olegendo at gcc dot gnu.org --- Author: olegendo Date: Tue Dec 30 18:44:27 2014 New Revision: 219111 URL: https://gcc.gnu.org/viewcvs?rev=219111root=gccview=rev Log: gcc/testsuite/ PR target/49263

[Bug target/49263] SH Target: underutilized TST #imm, R0 instruction

2014-12-30 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49263 --- Comment #24 from Oleg Endo olegendo at gcc dot gnu.org --- Author: olegendo Date: Tue Dec 30 19:11:42 2014 New Revision: 219113 URL: https://gcc.gnu.org/viewcvs?rev=219113root=gccview=rev Log: gcc/testsuite/ PR target/49263

<    4   5   6   7   8   9   10   11   12   13   >