re PR target/51244 ([SH] Inefficient conditional branch and code around T bit)
authorOleg Endo <olegendo@gcc.gnu.org>
Wed, 17 Dec 2014 23:08:14 +0000 (23:08 +0000)
committerOleg Endo <olegendo@gcc.gnu.org>
Wed, 17 Dec 2014 23:08:14 +0000 (23:08 +0000)
commit89f8797ee13b8ce48c50ad829cf0989564b5bfb8
tree0712f51fab9bdec89bec5432d03c151f3e270220
parentff49a9ba7b528078691a9f4e811bcdd4e9f99cdd
re PR target/51244 ([SH] Inefficient conditional branch and code around T bit)

gcc/
PR target/51244
* config/sh/sh_treg_combine.cc (is_conditional_insn): New function.
(cbranch_trace): Add member rtx* condition_rtx_in_insn, initialize it
accordingly in constructor.
(cbranch_trace::branch_condition_rtx_ref): New function.
(cbranch_trace::branch_condition_rtx): Use branch_condition_rtx_ref.
(sh_treg_combine::try_invert_branch_condition): Invert condition rtx
in insn using reversed_comparison_code and validate_change instead of
invert_jump_1.
(sh_treg_combine::execute): Look for conditional insns in basic blocks
in addition to conditional branches.
* config/sh/sh.md (*movsicc_div0s): Remove combine patterns.

From-SVN: r218850
gcc/ChangeLog
gcc/config/sh/sh.md
gcc/config/sh/sh_treg_combine.cc