public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "laurent.alfonsi at st dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/51244] [SH] Inefficient conditional branch and code around T bit Date: Tue, 23 Jul 2013 08:21:00 -0000 [thread overview] Message-ID: <bug-51244-4-VXWKzG42Ui@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-51244-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51244 --- Comment #61 from Laurent Aflonsi <laurent.alfonsi at st dot com> --- Yes that's the point. L3 can be reached by another block (L2): tst r2,r2 mov #-1,r2 negc r2,r2 .L3: tst r2,r2 bt/s .L11 [...] .L2: mov.l @r4,r2 tst r2,r2 bra .L3 movt r2 The movt(L2) and the tst(L3) are both removed, and that's coherent for that run path, because it is preceded by the tst r2,r2. But that makes the first path incoherent because L3 can be reached by the very first block. I have written a first fix, too restrictive ("pr25869-19.c scan-assembler-not movt" is failing) : --- ./gcc/gcc/config/sh/sh.md.orig +++ ./gcc/gcc/config/sh/sh.md @@ -8523,7 +8523,8 @@ T bit. Notice that some T bit stores such as negc also modify the T bit. */ if (modified_between_p (get_t_reg_rtx (), s1.insn, testing_insn) - || modified_in_p (get_t_reg_rtx (), s1.insn)) + || modified_in_p (get_t_reg_rtx (), s1.insn) + || !no_labels_between_p(s1.insn, testing_insn)) operands[2] = NULL_RTX; break; The idea would be to check if "s1.insn block dominates testing_insn block", but I don't know how to write it at this stage. More generally, I'm surprised to see that optimization at mapping level, isn't this a generic problematic that should be handled at rtl dead code elimination stage on the T bit register ? Thanks, Laurent
next prev parent reply other threads:[~2013-07-23 8:21 UTC|newest] Thread overview: 89+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-11-20 20:29 [Bug target/51244] New: SH Target: Inefficient conditional branch oleg.endo@t-online.de 2011-11-22 23:36 ` [Bug target/51244] " kkojima at gcc dot gnu.org 2011-12-27 22:03 ` oleg.endo@t-online.de 2011-12-27 23:17 ` oleg.endo@t-online.de 2011-12-28 0:42 ` oleg.endo@t-online.de 2011-12-28 4:57 ` oleg.endo@t-online.de 2011-12-28 16:07 ` oleg.endo@t-online.de 2011-12-28 22:30 ` kkojima at gcc dot gnu.org 2011-12-30 22:18 ` oleg.endo@t-online.de 2012-02-26 23:36 ` olegendo at gcc dot gnu.org 2012-03-02 21:57 ` olegendo at gcc dot gnu.org 2012-03-03 12:32 ` olegendo at gcc dot gnu.org 2012-03-04 17:25 ` olegendo at gcc dot gnu.org 2012-03-05 23:13 ` olegendo at gcc dot gnu.org 2012-03-05 23:38 ` olegendo at gcc dot gnu.org 2012-03-06 8:28 ` olegendo at gcc dot gnu.org 2012-03-06 8:50 ` kkojima at gcc dot gnu.org 2012-03-06 9:48 ` olegendo at gcc dot gnu.org 2012-03-06 10:36 ` kkojima at gcc dot gnu.org 2012-03-06 10:38 ` kkojima at gcc dot gnu.org 2012-03-06 10:39 ` kkojima at gcc dot gnu.org 2012-03-06 10:40 ` kkojima at gcc dot gnu.org 2012-03-06 11:30 ` olegendo at gcc dot gnu.org 2012-03-06 23:43 ` olegendo at gcc dot gnu.org 2012-03-08 1:26 ` olegendo at gcc dot gnu.org 2012-03-08 11:12 ` kkojima at gcc dot gnu.org 2012-03-08 11:15 ` kkojima at gcc dot gnu.org 2012-03-08 11:17 ` kkojima at gcc dot gnu.org 2012-03-09 0:27 ` olegendo at gcc dot gnu.org 2012-03-09 1:45 ` kkojima at gcc dot gnu.org 2012-03-09 8:41 ` kkojima at gcc dot gnu.org 2012-03-09 10:02 ` olegendo at gcc dot gnu.org 2012-03-09 10:37 ` kkojima at gcc dot gnu.org 2012-03-11 13:18 ` olegendo at gcc dot gnu.org 2012-03-15 8:11 ` kkojima at gcc dot gnu.org 2012-03-20 1:46 ` olegendo at gcc dot gnu.org 2012-03-20 2:33 ` kkojima at gcc dot gnu.org 2012-03-20 20:41 ` olegendo at gcc dot gnu.org 2012-05-07 20:53 ` olegendo at gcc dot gnu.org 2012-05-08 21:43 ` olegendo at gcc dot gnu.org 2012-06-30 12:01 ` olegendo at gcc dot gnu.org 2012-07-02 19:24 ` olegendo at gcc dot gnu.org 2012-07-08 15:03 ` olegendo at gcc dot gnu.org 2012-07-23 22:58 ` olegendo at gcc dot gnu.org 2012-07-23 23:29 ` olegendo at gcc dot gnu.org 2012-07-26 0:20 ` olegendo at gcc dot gnu.org 2012-07-30 6:46 ` olegendo at gcc dot gnu.org 2012-08-09 15:55 ` olegendo at gcc dot gnu.org 2012-08-12 22:47 ` olegendo at gcc dot gnu.org 2012-08-20 20:51 ` olegendo at gcc dot gnu.org 2012-08-30 22:54 ` olegendo at gcc dot gnu.org 2012-08-31 10:55 ` kkojima at gcc dot gnu.org 2012-08-31 15:50 ` olegendo at gcc dot gnu.org 2012-09-04 8:03 ` olegendo at gcc dot gnu.org 2012-09-23 21:36 ` [Bug target/51244] [SH] Inefficient conditional branch and code around T bit olegendo at gcc dot gnu.org 2012-09-23 21:42 ` olegendo at gcc dot gnu.org 2012-10-03 21:39 ` olegendo at gcc dot gnu.org 2012-10-12 0:41 ` olegendo at gcc dot gnu.org 2012-10-15 22:08 ` olegendo at gcc dot gnu.org 2012-11-03 12:01 ` olegendo at gcc dot gnu.org 2013-07-18 16:11 ` laurent.alfonsi at st dot com 2013-07-18 16:12 ` laurent.alfonsi at st dot com 2013-07-20 14:38 ` olegendo at gcc dot gnu.org 2013-07-23 8:21 ` laurent.alfonsi at st dot com [this message] 2013-07-27 19:28 ` olegendo at gcc dot gnu.org 2013-07-28 8:51 ` olegendo at gcc dot gnu.org 2013-07-28 12:26 ` olegendo at gcc dot gnu.org 2013-07-31 21:46 ` olegendo at gcc dot gnu.org 2013-08-23 0:13 ` olegendo at gcc dot gnu.org 2013-08-23 0:25 ` kkojima at gcc dot gnu.org 2013-09-24 22:43 ` olegendo at gcc dot gnu.org 2013-10-03 22:50 ` olegendo at gcc dot gnu.org 2013-10-12 20:47 ` olegendo at gcc dot gnu.org 2013-10-12 21:26 ` olegendo at gcc dot gnu.org 2013-12-05 17:54 ` olegendo at gcc dot gnu.org 2013-12-06 10:47 ` olegendo at gcc dot gnu.org 2014-05-10 20:19 ` olegendo at gcc dot gnu.org 2014-05-16 22:55 ` olegendo at gcc dot gnu.org 2014-09-13 18:48 ` olegendo at gcc dot gnu.org 2014-11-22 15:07 ` olegendo at gcc dot gnu.org 2014-11-22 15:50 ` olegendo at gcc dot gnu.org 2014-11-22 16:08 ` olegendo at gcc dot gnu.org 2014-12-01 6:50 ` olegendo at gcc dot gnu.org 2014-12-17 22:53 ` olegendo at gcc dot gnu.org 2014-12-17 23:08 ` olegendo at gcc dot gnu.org 2014-12-17 23:15 ` olegendo at gcc dot gnu.org 2014-12-24 21:56 ` olegendo at gcc dot gnu.org 2015-01-24 13:06 ` olegendo at gcc dot gnu.org 2015-03-01 19: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-51244-4-VXWKzG42Ui@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).