]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/config/sh/t-sh
re PR target/51244 ([SH] Inefficient conditional branch and code around T bit)
authorOleg Endo <olegendo@gcc.gnu.org>
Sat, 12 Oct 2013 20:47:22 +0000 (20:47 +0000)
committerOleg Endo <olegendo@gcc.gnu.org>
Sat, 12 Oct 2013 20:47:22 +0000 (20:47 +0000)
commit5d30dc5b6d86563a0a9ffb28429474b0f6c56544
treed10115063632d11cde88f211517d35808a4261b8
parent585a0b99166d96d04c6b65aca3ff797d7316e0ac
re PR target/51244 ([SH] Inefficient conditional branch and code around T bit)

PR target/51244
* config/sh/sh_treg_combine.cc: New SH specific RTL pass.
* config.gcc (SH extra_objs): Add sh_ifcvt.o.
* config/sh/t-sh (sh_treg_combine.o): New entry.
* config/sh/sh.c (sh_fixed_condition_code_regs): New function that
implements the target hook TARGET_FIXED_CONDITION_CODE_REGS.
(register_sh_passes): New function.  Register sh_treg_combine pass.
(sh_option_override): Invoke it.
(sh_canonicalize_comparison): Handle op0_preserve_value.
* sh.md (*cbranch_t"): Do not try to optimize missed test and branch
opportunities.  Canonicalize branch condition.
(nott): Allow only if pseudos can be created for non-SH2A.

PR target/51244
* gcc.dg/torture/p51244-21.c: New.
* gcc.target/sh/pr51244-20.c: New.
* gcc.target/sh/pr51244-20-sh2a.c: New.

From-SVN: r203492
gcc/ChangeLog
gcc/config.gcc
gcc/config/sh/sh.c
gcc/config/sh/sh.md
gcc/config/sh/sh_treg_combine.cc [new file with mode: 0644]
gcc/config/sh/t-sh
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/pr51244-21.c [new file with mode: 0644]
gcc/testsuite/gcc.target/sh/pr51244-20-sh2a.c [new file with mode: 0644]
gcc/testsuite/gcc.target/sh/pr51244-20.c [new file with mode: 0644]