Re: [SH][committed] PR 113533

2024-10-17 Thread Oleg Endo
On Mon, 2024-10-14 at 11:37 +0900, Oleg Endo wrote: > For memory loads/stores (that contain a MEM rtx) sh_rtx_costs would wrongly > report a cost lower than 1 insn which is not accurate as it makes > loads/stores appear cheaper than simple arithmetic insns. The cost of a > load/store insn is at le

[SH][committed] PR 113533

2024-10-13 Thread Oleg Endo
For memory loads/stores (that contain a MEM rtx) sh_rtx_costs would wrongly report a cost lower than 1 insn which is not accurate as it makes loads/stores appear cheaper than simple arithmetic insns. The cost of a load/store insn is at least 1 insn plus the cost of the address expression (some add

[SH][committed] Add -fno-math-errno to fsca,fsrra tests.

2024-10-13 Thread Oleg Endo
Without -fno-math-errno some of the test might fail because the expected insns will not be generated. Tested with make -k check RUNTESTFLAGS="--target_board=sh-sim\{-m2/-ml,-m2/- mb,-m2a/-mb,-m4/-ml,-m4/-mb,-m4a/-ml,-m4a/-mb}" Committed to master. gcc/testsuite/ChangeLog: * gcc.target/sh

[SH, committed]: Fix outage caused by secondary combine pass (was: Re: [RFC/PATCH] libgcc: sh: Use soft-fp for non-hosted SH3/SH4)

2024-07-20 Thread Oleg Endo
Hi, I've committed the attached patch to fix the full gcc + libstdc++ build on sh-elf. Best regards, Oleg Endo On Sat, 2024-07-06 at 07:35 -0600, Jeff Law wrote: > > On 7/5/24 1:28 AM, Sébastien Michelland wrote: > > Hi Oleg! > > > > > I don't understand why this is being limited to SH3 and

[SH][committed] Fix PR 111001

2023-10-23 Thread Oleg Endo
The attached patch fixes PR 111001. Committed to master, cherry-picked to GCC-13, GCC-12 and GCC-11. Sanity tested with 'make all-gcc'. Bootstrapped on GCC-13 sh4-linux by Adrian. Cheers, Oleg gcc/ChangeLog: PR target/111001 * config/sh/sh_treg_combine.cc (sh_tre

[SH][committed] Fix PR 101177

2023-10-20 Thread Oleg Endo
The attached patch fixes PR 101177. Committed to master, cherry-picked to GCC-13, GCC-12 and GCC-11. Sanity tested with 'make all-gcc'. Cheers, Oleg gcc/ChangeLog: PR target/101177 * config/sh/sh.md (unnamed split pattern): Fix comparison of find_regno_note result. From

[SH][committed] Fix PR 101469

2023-07-13 Thread Oleg Endo
Hi, The attached patch fixes PR 101469. Tested by the original reporter Rin Okuyama on NetBSD with GCC 10.5. Applied to master, GCC 11, GCC 12, GCC 13 after 'make all' sanity check. Cheers, Oleg gcc/ChangeLog: PR target/101469 * config/sh/sh.md (peephole2): Handle case where el

Re: [SH][committed] Fix PR 88630

2019-10-11 Thread Oleg Endo
On Fri, 2019-10-11 at 00:36 +0900, Oleg Endo wrote: > Hi, > > When we did the refactoring of SH's FPSCR handling back in GCC 5, we > missed one thing regarding ST-40, it seems. > > The attached patch fixes the issue as confirmed on the real > hardware. > Also tested on sh-sim with > make -k chec

[SH][committed] Fix PR 88630

2019-10-10 Thread Oleg Endo
Hi, When we did the refactoring of SH's FPSCR handling back in GCC 5, we missed one thing regarding ST-40, it seems. The attached patch fixes the issue as confirmed on the real hardware. Also tested on sh-sim with make -k check RUNTESTFLAGS="--target_board=sh-sim\{-m2/-ml,-m2/-mb,- m2a/-mb,-m4/-

[SH][committed] Fix PR 88562

2019-10-01 Thread Oleg Endo
Hi, The attached patch fixes PR 88562. Tested on trunk with make -k check RUNTESTFLAGS="--target_board=sh-sim\{-m2/-ml,-m2/-mb,-m2a/-mb,-m4/-ml,-m4/-mb}" Committed to trunk, GCC 9, GCC 8, GCC 7 as r276411, r276412, r276413, r276414. Cheers, Oleg gcc/ChangeLog: PR target/88562

[SH][committed] Fix PR 86805

2019-09-28 Thread Oleg Endo
Hi, This also sets TARGET_HAVE_SPECULATION_SAFE_VALUE to speculation_safe_value_not_needed for SH. Tested with "make all-gcc". Committed on trunk as r276244 and on GCC 9 as r276245. Cheers, Oleg gcc/ChangeLog PR target/86805 * config/sh/sh.c (TARGET_HAVE_SPECULATION_SAFE_VALUE

[SH][committed] Fix PR 80672

2019-09-28 Thread Oleg Endo
Hi, The attached patch fixes PR 80672. Tested by building the compiler with "make all-gcc" and manually invoking it and checking that the option is parsed as expected. Committed to trunk as r276240, GCC 9 as r276241, GCC 8 as r276242, GCC 7 as r276243. Cheers, Oleg gcc/ChangeLog PR tar

[SH][committed] Fix PR 81485

2018-01-21 Thread Oleg Endo
Hi, The following fixes PR 81485. Tested 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 r256930. Cheers, Oleg gcc/ChangeLog: PR target/81485 * config/sh/sh-protos.h (sh_find_set_of_reg): Remove a

[SH][committed] Fix PR 80870

2018-01-20 Thread Oleg Endo
Hi, The following fixed PR 80870. For whatever reason one of the source files in config/sh was still including and directly... Committed as r256926 (trunk), r256928 (GCC 7), r256929 (GCC 6). Cheers, Oleg gcc/ChangeLog: PR target/80870 * config/sh/sh_optimize_sett_clrt.cc:

[sh, committed] Wrap ASM_OUTPUT_ADDR_VEC_ELT in do {} while (0)

2017-11-23 Thread Tom de Vries
Hi, this patch wraps the sh version of ASM_OUTPUT_ADDR_VEC_ELT in "do {} while (0)". This allows the macro to be used in if-then-elses without curly braces. Build for sh. Committed as obvious. Thanks, - Tom [sh] Wrap ASM_OUTPUT_ADDR_VEC_ELT in do {} while (0) 2017-11-23 To

[SH][committed] Fix PR 83111

2017-11-23 Thread Oleg Endo
Hi, The attached patch fixes PR 83111. Committed to mainline as r255096 and to GCC 7 branch as r255097. Cheers, Oleg gcc/ChangeLog PR target/83111 * config/sh/sh.md (udivsi3, divsi3, sibcall_value_pcrel, sibcall_value_pcrel_fdpic): Use local variable instead of o

Re: [SH][committed] Cleanup div and mul patterns

2017-11-22 Thread Tom de Vries
On 05/03/2016 08:50 AM, Oleg Endo wrote: Hi, The attached patch cleans up the SH div and mul patterns a bit. Almost no changes in CSiBE, except for a few minor improvements. Tested on sh-elf with make -k check RUNTESTFLAGS="--target_board=sh-sim\{-m2/-ml,-m2/-mb, -m2a/-mb,-m4/-ml,-m4/-mb,-m4a/

Re: [SH][committed] Fix cset_zero pattern regressions

2016-09-27 Thread Oleg Endo
On Sun, 2016-09-25 at 16:06 +0900, Oleg Endo wrote: >  > This fixes a fallout that actually goes back to 5.0 but went > unnoticed.  The costs for movt and movrt type of insns were not > correctly reported and ifcvt thus made some bad choices for SH.  A > new cset_zero pattern variant is also requir

[SH][committed] Fix cset_zero pattern regressions

2016-09-25 Thread Oleg Endo
Hi, This fixes a fallout that actually goes back to 5.0 but went unnoticed. The costs for movt and movrt type of insns were not correctly reported and ifcvt thus made some bad choices for SH.  A new cset_zero pattern variant is also required to fix the matching for some recent changes in the middl

[SH][committed] Fix build after changes for PR 52171

2016-06-04 Thread Oleg Endo
Hi, The recent changes for PR 52171 didn't update the users of the renamed function 'move_by_pieces_ninsns'. The attached patch fixes this. Tested with "make all". Committed as r237090. Cheers, Oleg gcc/ChangeLog: PR tree-optimization/52171 * config/sh/sh.c (sh_use_by_

[SH][committed] Avoid potential slient wrong-code with reg+reg addr. modes

2016-06-03 Thread Oleg Endo
Hi, The attached patch removes the hardcoded "r0" when printing reg+reg addressing mode mems on SH. 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 r237088. Cheers, Oleg gcc/ChangeLog: *

[SH][committed] Use default ASM_OUTPUT_SYMBOL_REF

2016-05-31 Thread Oleg Endo
Hi, Since the SH5 stuff is gone, there's no need to override the ASM_OUTPUT_SYMBOL_REF target macro anymore. 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 r236930. Cheers, Oleg gcc/ChangeLog:

[SH][committed] Simplify DImode add, sub, neg patterns

2016-05-31 Thread Oleg Endo
Hi, The attached patch simplifies some DImode patterns on SH. The force_reg in the expand patterns can also be expressed by using the appropriate predicate, which eliminates the need for the expand patterns altogether. Tested on sh-elf with make -k check RUNTESTFLAGS="--target_board=sh-sim\{-m2/

Re: [SH][committed] Remove SH5 support in compiler

2016-05-11 Thread Oleg Endo
On Wed, 2016-05-04 at 00:42 +0200, Eric Botcazou wrote: > > Did that. Looks there are no changes after regeneration. > > Not in the libada directory: > > eric@polaris:~/svn/gcc/libada> svn info configure configure.ac > Path: configure > Name: configure > Working Copy Root Path: /home/eric/svn/gc

[SH][committed] Convert GET_SH_ARG_CLASS into a function

2016-05-08 Thread Oleg Endo
Hi, The attached patch converts the GET_SH_ARG_CLASS macro into a function. No functional change. 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 r236009. Cheers, Oleg gcc/ChangeLog: *

[SH][committed] Various cleanups

2016-05-08 Thread Oleg Endo
Hi, The attached patch performs various cleanups in the SH code. No functional changes. 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 r236008. Cheers, Oleg gcc/ChangeLog: * config/sh/

[SH][committed] Improve utilization of zero-displacement conditional branches

2016-05-06 Thread Oleg Endo
Hi, On SH a conditional branch with a (physical) zero displacement jumps over the next instruction. On some SH hardware implementations these branches are handled in a special way which allows using it for conditional execution. A while ago I've added some hardcoded asm patterns to utilize this.

[SH][committed] Remove deprecated options

2016-05-06 Thread Oleg Endo
Hi, The attached patch removes some deprecated SH options. Tested on sh-elf with 'make all-gcc' and with 'make info dvi pdf'. Committed as r235960. Cheers, Oleg gcc/ChangeLog: * config/sh/sh.opt (madjust-unroll, minvalid-symbols, msoft-atomic, mspace): Remove deprecated options.

[SH][committed] Fix length of ic_invalidate_line_sh4a pattern

2016-05-06 Thread Oleg Endo
Hi, The attached patch fixes the length of the ic_invalidate_line_sh4a pattern. 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 r235957. Cheers, Oleg gcc/ChangeLog: * config/sh/sh.md (i

[SH][committed] Remove some workaround combine patterns

2016-05-06 Thread Oleg Endo
Hi, The attached patch removes some workaround combine patterns. As far as I remember this issue has been addressed by some match.pd patterns. In any case, CSiBE code size shows no difference and the SH specific testcases mentioned in the code pass without the patterns. Tested on sh-elf with m

[SH][committed] Fix PR 58219

2016-05-06 Thread Oleg Endo
Hi, The attached patch fixes PR 58219. 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 r235954. gcc/ChangeLog: PR target/58219 * config/sh/predicates.md (long_displacement_mem_op

[SH][committed] Add some more missing div0s cases

2016-05-06 Thread Oleg Endo
Hi, The attached patch addresses some of the remaining things as mentioned in the PR. 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 r235952. Cheers, Oleg gcc/ChangeLog: PR target/5293

[SH][committed] Add another rotcr variant

2016-05-06 Thread Oleg Endo
Hi, The attached patch adds another combine pattern variant for the SH rotcr instruction. 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 r235950. Cheers, Oleg gcc/ChangeLog: PR target/

[SH][committed] Add support for additional SH2A post-inc/pre-dec addressing modes

2016-05-04 Thread Oleg Endo
Hi, The attached patch adds support for the following SH2A addressing modes: mov.b @-Rm,R0 mov.w @-Rm,R0 mov.l @-Rm,R0 mov.b R0,@Rn+ mov.w R0,@Rn+ mov.l R0,@Rn+ The patch also tweaks the post-inc/pre-dec addressing mode usage on non -SH2

Re: [SH][committed] Remove SH5 support in compiler

2016-05-03 Thread Eric Botcazou
> Did that. Looks there are no changes after regeneration. Not in the libada directory: eric@polaris:~/svn/gcc/libada> svn info configure configure.ac Path: configure Name: configure Working Copy Root Path: /home/eric/svn/gcc URL: svn+ssh://gcc.gnu.org/svn/gcc/trunk/libada/configure Relative URL

[SH][committed] Cleanup div and mul patterns

2016-05-02 Thread Oleg Endo
Hi, The attached patch cleans up the SH div and mul patterns a bit. Almost no changes in CSiBE, except for a few minor improvements. 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 r235803. Chee

[SH][committed] Remove *negnegt, *movtt patterns

2016-05-02 Thread Oleg Endo
Hi, The *negnegt, *movtt patterns seem to have no effect anymore. Removing them doesn't show any changes in the CSiBE set and the known related test cases in the testsuite pass. Tested on sh-elf with make -k check RUNTESTFLAGS="--target_board=sh-sim\{-m2/-ml,-m2/-mb, -m2a/-mb,-m4/-ml,-m4/-mb,-m

[SH][committed] Remove defunct mcbranchdi, mcmpeqdi options

2016-05-01 Thread Oleg Endo
Hi, The attached patch removes the defunct mcmpeqdi and mcmpeqdi options, which have been obsoleted a while ago. Moreover, it seems that the cbranchdi4 patterns can be simplified. CSiBE shows some code motion and some +/- 4/8 bytes code size changes, but I didn't spot anything special. Tested o

Re: [SH][committed] Simplify some predicates

2016-05-01 Thread Oleg Endo
On Sun, 2016-05-01 at 17:05 -0500, Segher Boessenkool wrote: > On Sun, May 01, 2016 at 12:40:15PM +0900, Oleg Endo wrote: > > The attached patch mainly simplifies some of the predicates. There > > is > > no functional change, except the removal of the "mov_nop" pattern, > > which resulted in a fe

Re: [SH][committed] Simplify some predicates

2016-05-01 Thread Segher Boessenkool
Hi Oleg, On Sun, May 01, 2016 at 12:40:15PM +0900, Oleg Endo wrote: > The attached patch mainly simplifies some of the predicates. There is > no functional change, except the removal of the "mov_nop" pattern, > which resulted in a few +- 4/8 byte code size changes in the CSiBE set, > which look l

[SH][committed] Remove constraints in expanders

2016-05-01 Thread Oleg Endo
Hi, Constraints in expanders do nothing, so we can remove them. That's what the patch does. 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 r235691. Cheers, Oleg gcc/ChangeLog: * con

[SH][committed] Use TARGET_FPU_DOUBLE condition

2016-04-30 Thread Oleg Endo
Hi, The attach patch simplifies the 'TARGET_SH4 || TARGET_SH2A_DOUBLE' checks to 'TARGET_FPU_DOUBLE'. 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 r235689. Cheers, Oleg gcc/ChangeLog:

[SH][committed] Simplify some predicates

2016-04-30 Thread Oleg Endo
Hi, The attached patch mainly simplifies some of the predicates. There is no functional change, except the removal of the "mov_nop" pattern, which resulted in a few +- 4/8 byte code size changes in the CSiBE set, which look like register allocation choices. But not sure what the original purpose

Re: [SH][committed] Remove SH5 support in compiler

2016-04-30 Thread Oleg Endo
Joseph, Thanks for keeping an eye on that. On Sat, 2016-04-30 at 09:39 +, Joseph Myers wrote: > On Sat, 30 Apr 2016, Oleg Endo wrote: > > > * config.guess: Remove SH5 support. > > * config.sub: Likewise. > > Please revert. These files must come verbatim from config.git with > no

Re: [SH][committed] Remove SH5 support in compiler

2016-04-30 Thread Joseph Myers
On Sat, 30 Apr 2016, Oleg Endo wrote: > * config.guess: Remove SH5 support. > * config.sub: Likewise. Please revert. These files must come verbatim from config.git with no local changes. If you persuade config-patches that SH5 support should be removed there then you can import n

Re: [SH][committed] Remove SH5 support in compiler

2016-04-30 Thread Oleg Endo
On Sat, 2016-04-30 at 14:44 +0900, Oleg Endo wrote: > On Sat, 2016-04-30 at 10:58 +0900, Oleg Endo wrote: > > On Fri, 2016-04-29 at 23:11 +0900, Oleg Endo wrote: > > > On Fri, 2016-04-29 at 19:45 +0900, Oleg Endo wrote: > > > > On Thu, 2016-04-28 at 10:27 +0900, Oleg Endo wrote: > > > > > > > > >

Re: [SH][committed] Remove SH5 support in compiler

2016-04-29 Thread Oleg Endo
On Sat, 2016-04-30 at 10:58 +0900, Oleg Endo wrote: > On Fri, 2016-04-29 at 23:11 +0900, Oleg Endo wrote: > > On Fri, 2016-04-29 at 19:45 +0900, Oleg Endo wrote: > > > On Thu, 2016-04-28 at 10:27 +0900, Oleg Endo wrote: > > > > > > > The removal of SH5 support from GCC has been announced here > >

Re: [SH][committed] Remove SH5 support in compiler

2016-04-29 Thread Oleg Endo
On Fri, 2016-04-29 at 23:11 +0900, Oleg Endo wrote: > On Fri, 2016-04-29 at 19:45 +0900, Oleg Endo wrote: > > On Thu, 2016-04-28 at 10:27 +0900, Oleg Endo wrote: > > > > > The removal of SH5 support from GCC has been announced here > > > https://gcc.gnu.org/ml/gcc/2015-08/msg00101.html > > > > >

Re: [SH][committed] Remove SH5 support in compiler

2016-04-29 Thread Oleg Endo
On Fri, 2016-04-29 at 19:45 +0900, Oleg Endo wrote: > On Thu, 2016-04-28 at 10:27 +0900, Oleg Endo wrote: > > > The removal of SH5 support from GCC has been announced here > > https://gcc.gnu.org/ml/gcc/2015-08/msg00101.html > > > > The attached patch removes support for SH5 in the compiler back

Re: [SH][committed] Remove SH5 support in compiler

2016-04-29 Thread Oleg Endo
On Thu, 2016-04-28 at 10:27 +0900, Oleg Endo wrote: > The removal of SH5 support from GCC has been announced here > https://gcc.gnu.org/ml/gcc/2015-08/msg00101.html > > The attached patch removes support for SH5 in the compiler back end. > There are still some leftovers and new simplification o

[SH][committed] Remove SH5 support in compiler

2016-04-27 Thread Oleg Endo
Hi, The removal of SH5 support from GCC has been announced here https://gcc.gnu.org/ml/gcc/2015-08/msg00101.html The attached patch removes support for SH5 in the compiler back end. There are still some leftovers and new simplification opportunities. These will be addressed in later follow up

Re: [SH][committed] Fix PR 70416

2016-04-08 Thread Oleg Endo
On Sun, 2016-04-03 at 21:55 +0900, Oleg Endo wrote: > The attached patch fixes PR 70416. For details, please see the PR > audit trail. > > 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}" > > and no new fa

[SH][committed] Fix PR 70416

2016-04-03 Thread Oleg Endo
Hi, The attached patch fixes PR 70416. For details, please see the PR audit trail. 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}" and no new failures. Committed to trunk as r234702. Backport to GCC 5 branch

[SH][committed] Fix PR 69806

2016-02-22 Thread Oleg Endo
Hi, The attached patch fixes PR 69806. 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 r233601. Cheers, Oleg gcc/ChangeLog PR target/69806 PR target/54089 * config/sh/sh.

[SH][committed] Fix PR 67260

2016-02-13 Thread Oleg Endo
Hi, The attached patch(es) fix PR 67260. For details please see the discussion in the PR log. Tested on trunk and 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}" and on GCC 5 and GCC 4.9 branch with make all-gcc and co

[SH][committed] Fix PR 67636

2016-02-12 Thread Oleg Endo
Hi, The attached patch fixes PR 67636 in a simple way by adding yet another bit extraction pattern as mentioned in PR 64345#c3. 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 to trunk as r233397. C

[SH][committed] Adjust some test cases

2016-02-11 Thread Oleg Endo
Hi, Some SH specific test cases have started showing failures recently. This one was easy. Committed as r233346. Cheers, Oleg gcc/testsuite/ChangeLog: * gcc.target/sh/pr54089-8.c: Adjust optimization level. Index: gcc/testsuite/gcc.target/sh/pr54089-8.c ==

[SH][committed] Fix PR 69713

2016-02-11 Thread Oleg Endo
Hi, The attached patch fixes PR 69713. For details please see the comments in the PR. Tested on trunk and 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 to trunk as r233324, 5 branch as r233326 and 4.9 branc

[SH][committed] Fix PR 68277

2015-11-16 Thread Oleg Endo
Hi, The attached patch fixes PR 68277. Tested by Kaz on trunk on sh4-linux. I've also done a sanity check on GCC 5 branch with "make all" on sh-elf. Committed to trunk as r230425 and to GCC 5 branch as r230426. Cheers, Oleg gcc/ChangeLog: PR target/68277 * config/sh/sh.md (adds

[SH][committed]

2015-10-02 Thread Oleg Endo
Hi, The attached SH patch converts sequences such as: movtr2 movtr13 into: movtr2 mov r2,r13 This shortens the live range of the T bit register and is better for parallel execution. It doesn't happen often, but it's easy to avoid it. Unfortunately

Re: [SH][committed] Improve treg_set_expr matching

2015-10-01 Thread Oleg Endo
On Mon, 2015-09-28 at 23:03 +0900, Oleg Endo wrote: > Hi, > > This patch has been hanging around in my queue for a while. Basically, > it uses reverse_condition to get better matching for treg_set_expr. > Tested on sh-elf with > make -k check RUNTESTFLAGS="--target_board=sh-sim > \{-m2/-ml,-m2/-m

[SH][committed] Improve treg_set_expr matching

2015-09-28 Thread Oleg Endo
Hi, This patch has been hanging around in my queue for a while. Basically, it uses reverse_condition to get better matching for treg_set_expr. 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}" and no new failures

Re: [SH][committed] Fix PR 67391

2015-09-28 Thread Oleg Endo
On Sun, 2015-09-27 at 21:03 +0900, Oleg Endo wrote: > On Wed, 2015-09-23 at 21:04 +0900, Oleg Endo wrote: > > Hi, > > > > The attached patch fixes PR 67391. Some additional reg overlapping were > > added to the addsi3 patterns while making LRA on SH work, but not all of > > them seem to be good.

Re: [SH][committed] Fix PR 67391

2015-09-27 Thread Oleg Endo
On Wed, 2015-09-23 at 21:04 +0900, Oleg Endo wrote: > Hi, > > The attached patch fixes PR 67391. Some additional reg overlapping were > added to the addsi3 patterns while making LRA on SH work, but not all of > them seem to be good. Removing them, seems to be working just fine. > Tested on sh-el

[SH][committed] Fix PR 67675

2015-09-25 Thread Oleg Endo
Hi, This patch adds more fine grained alignment checks to SH's builtin strcmp and strncmp expanders. If one of the input pointers is known to be at least 4 byte aligned, there's no need to check it. Tested on sh-elf with make -k check RUNTESTFLAGS="--target_board=sh-sim \{-m2/-ml,-m2/-mb,-m2a/-m

[SH][committed] Fix PR 67391

2015-09-23 Thread Oleg Endo
Hi, The attached patch fixes PR 67391. Some additional reg overlapping were added to the addsi3 patterns while making LRA on SH work, but not all of them seem to be good. Removing them, seems to be working just fine. Tested on sh-elf (LRA enabled) with make -k check RUNTESTFLAGS="--target_board=

[SH][committed] Adjust pr64345-1.c testcase for SH2A

2015-09-21 Thread Oleg Endo
Hi, There have been some changes to the generated bitfiddling code for SH2A and the test case caught them. Those changes are good, and the test case can be adjusted accordingly. Tested on sh-elf with make -k check-gcc RUNTESTFLAGS="sh.exp --target_board=sh-sim\{-m2a/-mb}" Committed as r227971.

Re: [SH][committed] FIx PR 67657

2015-09-21 Thread Oleg Endo
On Mon, 2015-09-21 at 22:04 +0900, Oleg Endo wrote: > 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

[SH][committed] FIx PR 67657

2015-09-21 Thread Oleg Endo
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 c

[SH][committed] Remove SH5/SH64 documentation

2015-09-21 Thread Oleg Endo
Hi, As announced here https://gcc.gnu.org/ml/gcc/2015-08/msg00101.html this patch removes some SH5/SH64 related documentation. Tested with make info dvi pdf. Committed as r227959. Cheers, Oleg gcc/ChangeLog: * doc/invoke.texi (SH Options): Undocument SH5/SH64 related options. Ind

[SH][committed] Add some test cases for PR 59478

2015-09-20 Thread Oleg Endo
Hi, This adds some known-to-work test cases from the PR. Tested on sh-elf with make -k check-gcc RUNTESTFLAGS="sh.exp=pr59478.c --target_board=sh-sim \{-m2/-ml,-m2/-mb,-m2a/-mb,-m4/-ml,-m4/-mb,-m4a/-ml,-m4a/-mb}" Committed as r227958. Cheers, Oleg gcc/testsuite/ChangeLog: PR target/5947

[SH][committed] Fix PR 67126

2015-09-20 Thread Oleg Endo
Hi, This fixes PR 67126 by updating the patterns to match new combine behavior. 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}" and no new failures. Committed as r227957. Cheers, Oleg gcc/ChangeLog: PR

[SH][committed] Use effective target checks for tests

2015-09-20 Thread Oleg Endo
Hi, The attached patch switches the SH specific tests to use effective target checks rather than e.g. triplets or options. This makes it easier to run or ignore tests when the compiler has been configured for some particular sub-target. Tested with make -k check-gcc -j12 RUNTESTFLAGS="sh.exp --t

Re: [SH][committed] Fix PR 67061

2015-09-20 Thread Oleg Endo
On Mon, 2015-09-14 at 22:50 +0900, Oleg Endo wrote: > Hi, > > The attached patch fixes PR 67061. > Tested on sh-elf trunk r227682 with > make -k check RUNTESTFLAGS="--target_board=sh-sim > \{-m2/-ml,-m2/-mb,-m2a/-mb,-m4/-ml,-m4/-mb,-m4a/-ml,-m4a/-mb}" > > Committed to trunk as r227750. > Will bac

[SH][committed] Fix PR 67061

2015-09-14 Thread Oleg Endo
Hi, The attached patch fixes PR 67061. Tested on sh-elf trunk r227682 with make -k check RUNTESTFLAGS="--target_board=sh-sim \{-m2/-ml,-m2/-mb,-m2a/-mb,-m4/-ml,-m4/-mb,-m4a/-ml,-m4a/-mb}" Committed to trunk as r227750. Will backport to GCC 5 branch later. Cheers, Oleg gcc/ChangeLog: PR

[SH][committed] Fix PR 67506

2015-09-10 Thread Oleg Endo
Hi, I've committed the following fix for PR 67506 as r227646 on trunk and as r227647 on the gcc-5 branch. The patch was tested by Kaz on sh4-linux. I've added the testcase and briefly checked it with make all and make -k check RUNTESTFLAGS="compile.exp=pr67506.c --target_board=sh-sim \{-m2/-ml,-

[SH][committed] Fix PR 66930

2015-07-25 Thread Oleg Endo
Hi, This fixes an SH bug that has been discovered during the discussions of PR 66930. Tested by Kaz on sh4-linux. Committed to trunk as r226218 and to GCC 5 branch as r226219. Cheers, Oleg gcc/ChangeLog PR target/66930 * config/sh/sh.c (sh_split_movrt_negc_to_movt_xor): Add miss

Re: [SH][committed] Fix PR 65979 / PR 66611

2015-06-26 Thread Oleg Endo
On 26 Jun 2015, at 08:54, Oleg Endo wrote: > Hi, > > This fixes the problem of emitting an insn from within a peephole pattern > which can't be recognized due to mismatching operand constraints. Tested by > Kaz on sh4-linux. Committed to trunk as r224987. Backport to GCC 5 will > follow.

[SH][committed] Fix PR 65979 / PR 66611

2015-06-25 Thread Oleg Endo
Hi, This fixes the problem of emitting an insn from within a peephole pattern which can't be recognized due to mismatching operand constraints. Tested by Kaz on sh4-linux. Committed to trunk as r224987. Backport to GCC 5 will follow. Cheers, Oleg gcc/ChangeLog: PR target/65979

Re: [SH][committed] Fix gcc.target/sh/pr54236-2.c failures

2015-05-21 Thread Oleg Endo
On Tue, 2015-05-19 at 10:04 +0200, Oleg Endo wrote: > Since a recent change to the tree optimizers > https://gcc.gnu.org/ml/gcc-patches/2015-05/msg00089.html > some related SH patterns stopped working. The attached patch fixes > this. > > Tested briefly with 'make all' and with > make -k check-gc

[SH][committed] Fix pr64366.c test case

2015-05-19 Thread Oleg Endo
Hi, The SH testcase pr64366 would fail on SH2A because -m4 -ml is specified in dg-options of the test case. Target options such as CPU and endianness are usually not specified in the test cases directly, but when invoking the test suite. Fixed with the attached patch. Committed as r223417. Che

[SH][committed] Fix gcc.target/sh/pr54236-2.c failures

2015-05-19 Thread Oleg Endo
Hi, Since a recent change to the tree optimizers https://gcc.gnu.org/ml/gcc-patches/2015-05/msg00089.html some related SH patterns stopped working. The attached patch fixes this. Tested briefly with 'make all' and with make -k check-gcc RUNTESTFLAGS="sh.exp=pr54236* --target_board=sh-sim \{-m2/-

[SH][committed] Fix gcc.target/sh/pr54236-1.c failures

2015-05-17 Thread Oleg Endo
Hi, Since the recent changes in combine w.r.t. canonical forms of ashift and mult outside mems, some of the SH patterns stopped working. The attached patch fixes the failures in gcc.target/sh/pr54236-1.c. Tested briefly with make -k check-gcc RUNTESTFLAGS="sh.exp --target_board=sh-sim \{-m2/-ml,

Re: [SH][committed] Setting MULTILIB_EXCEPTIONS in gcc/config/sh/t-linux causes problems

2015-03-26 Thread David Howells
> [1. text/x-patch; sh_multilib_sh1_sh2a_ml_1.patch] This works, thanks. I see the following produced: vega>rpm -qlp gcc-sh-linux-gnu-5.0.0-0.1.fc23.x86_64.rpm | grep libgcc /usr/lib/gcc/sh-linux-gnu/5.0.0/libgcc.a /usr/lib/gcc/sh-linux-gnu/5.0.0/m2/libgcc.a /usr/lib/gcc/sh-linux-gnu/

[SH][committed] Setting MULTILIB_EXCEPTIONS in gcc/config/sh/t-linux causes problems

2015-03-26 Thread Oleg Endo
On Thu, 2015-03-26 at 09:45 +0900, Kaz Kojima wrote: > Oleg Endo wrote: > > Sorry, I'm a bit confused. Do you mean something like the attached > > patch? If so, it means that the original patch for this problem > > https://gcc.gnu.org/ml/gcc-patches/2015-03/msg00424.html > > should have been in

[SH][committed] Fix PR 65505

2015-03-23 Thread Oleg Endo
Hi, The attached patch is the same as posted in the PR with a test case added. Tested with 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}" and on sh4-linux by Kaz. Committed as r221604. Cheers, Oleg gcc/ChangeLog:

[SH][committed] Fix gcc.target/sh/pr54680.c test

2015-03-10 Thread Oleg Endo
Hi, The SH specific test gcc.target/sh/pr54680.c has started to fail recently. This is because of improved IPA optimizations. For this test the IPA optimization should be turned off. Tested with make -k check-gcc RUNTESTFLAGS="sh.exp=pr54680.c --target_board=sh-sim \{-m2/-ml,-m2/-mb,-m2a/-mb,-m

[SH][committed] Add test case for PR 65153

2015-03-07 Thread Oleg Endo
Hi, This adds the test case for PR 65153. Tested with make -k check-gcc RUNTESTFLAGS="compile.exp=pr65153.c --target_board=sh-sim \{-m2/-ml,-m2/-mb,-m2a/-mb,-m4/-ml,-m4/-mb,-m4a/-ml,-m4a/-mb}" Committed as r221257. Cheers, Oleg gcc/testsuite/ChangeLog: PR target/65153 * gcc.c-to

[SH][committed] Add test case for PR 65249

2015-03-07 Thread Oleg Endo
Hi, This adds a test case for PR 65249. Tested with make -k check-c++ RUNTESTFLAGS="dg-torture.exp=pr65249.C --target_board=sh-sim \{-m2/-ml,-m2/-mb,-m2a/-mb,-m4/-ml,-m4/-mb,-m4a/-ml,-m4a/-mb}" Commited as r221256. Cheers, Oleg gcc/testsuite/ChangeLog: PR target/65249 * g++.dg/t

[SH][committed] Add test case for PR 61142

2015-03-01 Thread Oleg Endo
Hi, This adds a test case for PR 61142. Tested with make -k check-gcc RUNTESTFLAGS="sh.exp=pr61142.c --target_board=sh-sim \{-m2/-ml,-m2/-mb,-m2a/-mb,-m4/-ml,-m4/-mb,-m4a/-ml,-m4a/-mb}" Committed as r221089. Cheers, Oleg gcc/testsuite/ChangeLog: PR target/61142 * gcc.target/sh/s

[SH][committed] Fix PR 65163

2015-02-23 Thread Oleg Endo
Hi, The attached patch fixes PR 65163. Although the problem started to show up on trunk and not on the 4.8 / 4.9 branches, I've also backported it, since it's a latent bug. Tested on trunk with make -k check RUNTESTFLAGS="--target_board=sh-sim \{-m2/-ml,-m2/-mb,-m2a/-mb,-m4/-ml,-m4/-mb,-m4a/-ml,-

[SH][committed] Add new option -mcbranch-force-delay-slot

2015-02-17 Thread Oleg Endo
Hi, On some early SH2E versions such as SH7055, there is a hardware bug related to conditional branches without delay slots. The recommended workaround for the bug is not to use conditional branches without delay slots. This is what GCC has been doing, but the comments around those parts were a

[SH][committed] Fix PR 64793

2015-02-17 Thread Oleg Endo
Hi, The attached patch fixes PR 64793. For some reason the SH port would pretend that it can do annulled branch true insns in the delay slot of conditional branches, which then got pulled out from the delay slot by the SH reorg pass. I believe there were some misunderstandings regarding the matt

[SH][committed] Use shorter atomic sequences if result values are unused

2015-02-03 Thread Oleg Endo
Hi, When the result values of atomic ops, such as the previous value of an atomic_fetch_add, are unused, it's possible to use shorter asm sequences on SH. The attached patch does that by checking the reg unused notes of the insns in split1 and replacing them with the simpler variants, if the resu

[SH][committed] Add atomic not insns

2015-02-01 Thread Oleg Endo
Hi, This adds atomic not insns for SH. Although not directly supported by the atomic builtins, for things like atomic xor (-1) or atomic nand (-1) combine will happily try to simplify the insns into a unary not. Committed as r220317. Tested with make -k check-gcc RUNTESTFLAGS="sh.exp=pr64851* --

[SH][committed] Fix PR 64659

2015-01-28 Thread Oleg Endo
Hi, Attached patch allows the atomic ops on SH to utilize some of the immediate value insns, which can save an insn and reg sometimes. The actual changes are in the predicates, constraints and some adjustments to some of the asm snippets. While at it, I've changed uses of register_operand into a

[SH][committed] Add some more addc/subc tests

2015-01-25 Thread Oleg Endo
Hi, This adds some more addc/subc tests which are now working after the treg_set_expr patch. Tested with make -k check-gcc RUNTESTFLAGS="sh.exp=pr54236* --target_board=sh-sim \{-m2/-ml,-m2/-mb,-m2a/-mb,-m4/-ml,-m4/-mb,-m4a/-ml,-m4a/-mb}" Committed as r220093. Cheers, Oleg gcc/testsuite/ChangeLog

Re: [SH][committed] Fix PR 64652

2015-01-19 Thread Oleg Endo
On Sun, 2015-01-18 at 19:14 +0100, Oleg Endo wrote: > Hi, > > The attached patch fixes PR 64652. Tested with > make -k check-gcc RUNTESTFLAGS="sh-torture.exp --target_board=sh-sim > \{-m2/-ml,-m2/-mb,-m2a/-mb,-m4/-ml,-m4/-mb,-m4a/-ml,-m4a/-mb}" > Committed as r219824. > > Cheers, > Oleg > > gcc

[SH][committed] Fix PR 64652

2015-01-18 Thread Oleg Endo
Hi, The attached patch fixes PR 64652. Tested with make -k check-gcc RUNTESTFLAGS="sh-torture.exp --target_board=sh-sim \{-m2/-ml,-m2/-mb,-m2a/-mb,-m4/-ml,-m4/-mb,-m4a/-ml,-m4a/-mb}" Committed as r219824. Cheers, Oleg gcc/ChangeLog: PR target/64652 * config/sh/sh.md (udivsi3_i4,

[SH][committed] PR 53988 - Fix wrong code

2015-01-14 Thread Oleg Endo
Hi, The attached patch fixes a wrong-code issue which was the result of the initial fix for PR 53988. Tested with make -k check RUNTESTFLAGS="--target_board=sh-sim \{-m2/-ml,-m2/-mb,-m2a/-mb,-m4/-ml,-m4/-mb,-m4a/-ml,-m4a/-mb}" and no new failures. Committed as 219623. Backports to 4.8 and 4.9 wi

  1   2   >