public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "olegendo at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/52898] SH Target: Inefficient DImode comparisons Date: Sat, 07 Dec 2013 08:05:00 -0000 [thread overview] Message-ID: <bug-52898-4-TkrPGWubOD@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-52898-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52898 --- Comment #7 from Oleg Endo <olegendo at gcc dot gnu.org> --- Kaz, I'd like to deprecate the mcbranchdi and mcmpeqdi options in 4.9 and make the current default values fixed as follows: mcbranchdi is usually enabled (it gets disabled in some SH5 case in sh_option_override). mcmpeqdi is always disabled. As a side effect, it would also "fix" PR 51697 (mcbranchdi will not be disabled for -Os). Are you OK with the following patch for 4.9? Index: gcc/common/config/sh/sh-common.c =================================================================== --- gcc/common/config/sh/sh-common.c (revision 205756) +++ gcc/common/config/sh/sh-common.c (working copy) @@ -34,7 +34,6 @@ { OPT_LEVELS_1_PLUS_SPEED_ONLY, OPT_mdiv_, "inv:minlat", 1 }, { OPT_LEVELS_SIZE, OPT_mdiv_, SH_DIV_STR_FOR_SIZE, 1 }, { OPT_LEVELS_0_ONLY, OPT_mdiv_, "", 1 }, - { OPT_LEVELS_SIZE, OPT_mcbranchdi, NULL, 0 }, /* We can't meaningfully test TARGET_SHMEDIA here, because -m options haven't been parsed yet, hence we'd read only the default. sh_target_reg_class will return NO_REGS if this is Index: gcc/doc/invoke.texi =================================================================== --- gcc/doc/invoke.texi (revision 205756) +++ gcc/doc/invoke.texi (working copy) @@ -959,7 +959,7 @@ -mindexed-addressing -mgettrcost=@var{number} -mpt-fixed @gol -maccumulate-outgoing-args -minvalid-symbols @gol -matomic-model=@var{atomic-model} @gol --mbranch-cost=@var{num} -mzdcbranch -mno-zdcbranch -mcbranchdi -mcmpeqdi @gol +-mbranch-cost=@var{num} -mzdcbranch -mno-zdcbranch @gol -mfused-madd -mno-fused-madd -mfsca -mno-fsca -mfsrra -mno-fsrra @gol -mpretend-cmove -mtas} @@ -20252,15 +20252,6 @@ enabled by default when generating code for SH4 and SH4A. It can be explicitly disabled by specifying @option{-mno-zdcbranch}. -@item -mcbranchdi -@opindex mcbranchdi -Enable the @code{cbranchdi4} instruction pattern. - -@item -mcmpeqdi -@opindex mcmpeqdi -Emit the @code{cmpeqdi_t} instruction pattern even when @option{-mcbranchdi} -is in effect. - @item -mfused-madd @itemx -mno-fused-madd @opindex mfused-madd Index: gcc/config/sh/sh.opt =================================================================== --- gcc/config/sh/sh.opt (revision 205756) +++ gcc/config/sh/sh.opt (working copy) @@ -233,11 +233,11 @@ Assume that zero displacement conditional branches are fast mcbranchdi -Target Var(TARGET_CBRANCHDI4) +Target Undocumented Var(TARGET_CBRANCHDI4) Warn(%qs is deprecated and has no effect) Enable cbranchdi4 pattern mcmpeqdi -Target Var(TARGET_CMPEQDI_T) +Target Undocumented Var(TARGET_CMPEQDI_T) Warn(%qs is deprecated and has no effect) Emit cmpeqdi_t pattern even when -mcbranchdi is in effect. mcut2-workaround Index: gcc/config/sh/sh.c =================================================================== --- gcc/config/sh/sh.c (revision 205756) +++ gcc/config/sh/sh.c (working copy) @@ -771,6 +771,11 @@ SUBTARGET_OVERRIDE_OPTIONS; if (optimize > 1 && !optimize_size) target_flags |= MASK_SAVE_ALL_TARGET_REGS; + + /* Set default values of TARGET_CBRANCHDI4 and TARGET_CMPEQDI_T. */ + TARGET_CBRANCHDI4 = 1; + TARGET_CMPEQDI_T = 0; + sh_cpu = PROCESSOR_SH1; assembler_dialect = 0; if (TARGET_SH2)
next prev parent reply other threads:[~2013-12-07 8:05 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-04-07 11:18 [Bug target/52898] New: SH Target: Inefficient comparison of DImode and immediate constant olegendo at gcc dot gnu.org 2012-04-11 22:48 ` [Bug target/52898] SH Target: Inefficient DImode comparisons olegendo at gcc dot gnu.org 2012-04-11 22:52 ` olegendo at gcc dot gnu.org 2012-04-12 1:13 ` kkojima at gcc dot gnu.org 2012-04-12 6:20 ` olegendo at gcc dot gnu.org 2012-04-12 7:00 ` olegendo at gcc dot gnu.org 2012-09-01 22:47 ` olegendo at gcc dot gnu.org 2013-12-07 8:05 ` olegendo at gcc dot gnu.org [this message] 2013-12-07 10:36 ` kkojima at gcc dot gnu.org 2013-12-08 22:16 ` olegendo at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-52898-4-TkrPGWubOD@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).