This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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=gcc&view=rev&rev=192387
Log:
    PR target/51244
    * config/sh/sh.md (negsi_cond, negdi_cond, stack_protect_test): Remove
    get_t_reg_rtx when invoking gen_branch_true or gen_branch_false.
    (*zero_extend<mode>si2_compact): Convert to insn_and_split.  Convert
    zero extensions of T bit stores to reg moves in splitter.  Remove
    obsolete unnamed peephole2 that caught zero extensions after negc T bit
    stores.
    (*branch_true_eq, *branch_false_ne): Delete.
    (branch_true, branch_false): Convert insn to expander.  Move actual
    insn logic to...
    (*cbranch_t): ...this new insn_and_split.  Try to find preceding
    redundant T bit stores and tests and combine them with the conditional
    branch if possible in the splitter.
    (movrt_xor, *movt_movrt): New insn_and_split.
    * config/sh/predicates.md (cbranch_treg_value): New predicate.
    * config/sh/sh-protos.h (sh_eval_treg_value): Forward declare...
    * config/sh/sh.c (sh_eval_treg_value): ...this new function.
    (expand_cbranchsi4, expand_cbranchdi4): Remove get_t_reg_rtx
    when invoking gen_branch_true or gen_branch_false.

    PR target/51244
    * gcc.target/sh/pr51244-13.c: New.
    * gcc.target/sh/pr51244-14.c: New.
    * gcc.target/sh/pr51244-15.c: New.
    * gcc.target/sh/pr51244-16.c: New.


Added:
    trunk/gcc/testsuite/gcc.target/sh/pr51244-13.c
    trunk/gcc/testsuite/gcc.target/sh/pr51244-14.c
    trunk/gcc/testsuite/gcc.target/sh/pr51244-15.c
    trunk/gcc/testsuite/gcc.target/sh/pr51244-16.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/sh/predicates.md
    trunk/gcc/config/sh/sh-protos.h
    trunk/gcc/config/sh/sh.c
    trunk/gcc/config/sh/sh.md
    trunk/gcc/testsuite/ChangeLog


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]