public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "linkw at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/96789] x264: sub4x4_dct() improves when vectorization is disabled
Date: Fri, 25 Sep 2020 12:52:14 +0000	[thread overview]
Message-ID: <bug-96789-4-QlEUQP261N@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-96789-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96789

--- Comment #19 from Kewen Lin <linkw at gcc dot gnu.org> ---
(In reply to rguenther@suse.de from comment #17)
> On Fri, 18 Sep 2020, linkw at gcc dot gnu.org wrote:
> 
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96789
> > 
> > --- Comment #15 from Kewen Lin <linkw at gcc dot gnu.org> ---
> > (In reply to rguenther@suse.de from comment #14)
> > > On Fri, 18 Sep 2020, linkw at gcc dot gnu.org wrote:
> > > 
> > > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96789
> > > > 
> > > > --- Comment #13 from Kewen Lin <linkw at gcc dot gnu.org> ---
> > > > >   2) on Power, the conversion from unsigned char to unsigned short is nop
> > > > > conversion, when we counting scalar cost, it's counted, then add costs 32
> > > > > totally onto scalar cost. Meanwhile, the conversion from unsigned short to
> > > > > signed short should be counted but it's not (need to check why further). 
> > > > 
> > > > UH to SH conversion is true when calling vect_nop_conversion_p, so it's not
> > > > even put into the cost vector. 
> > > > 
> > > > tree_nop_conversion_p's comments saying:
> > > > 
> > > > /* Return true iff conversion from INNER_TYPE to OUTER_TYPE generates
> > > >    no instruction.  */
> > > > 
> > > > I may miss something here, but UH to SH conversion does need one explicit
> > > > extend instruction *extsh*, the precision/mode equality check looks wrong for
> > > > this conversion.
> > > 
> > > Well, it isn't a RTL predicate and it only needs extension because
> > > there's never a HImode pseudo but always SImode subregs.
> > 
> > Thanks Richi! Should we take care of this case? or neglect this kind of
> > extension as "no instruction"? I was intent to handle it in target specific
> > code, but it isn't recorded into cost vector while it seems too heavy to do the
> > bb_info slp_instances revisits in finish_cost.
> 
> I think it's not something we should handle on GIMPLE.

Got it! For 

          else if (vect_nop_conversion_p (stmt_info))
            continue;

Is it a good idea to change it to call record_stmt_cost like the others? 
  1) introduce one vect_cost_for_stmt enum type eg: nop_stmt
  2) builtin_vectorization_cost return zero for it by default as before.
  3) targets can adjust the cost according to its need

  parent reply	other threads:[~2020-09-25 12:52 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-26  3:19 [Bug tree-optimization/96789] New: " linkw at gcc dot gnu.org
2020-08-26  6:53 ` [Bug target/96789] " rguenth at gcc dot gnu.org
2020-08-26  7:13 ` linkw at gcc dot gnu.org
2020-08-27  3:28 ` linkw at gcc dot gnu.org
2020-08-27  6:40 ` rguenth at gcc dot gnu.org
2020-08-27 11:16 ` rguenth at gcc dot gnu.org
2020-08-31  4:05 ` linkw at gcc dot gnu.org
2020-09-16 10:03 ` linkw at gcc dot gnu.org
2020-09-16 11:17 ` rguenth at gcc dot gnu.org
2020-09-16 12:25 ` linkw at gcc dot gnu.org
2020-09-16 13:04 ` rguenth at gcc dot gnu.org
2020-09-17  2:50 ` linkw at gcc dot gnu.org
2020-09-17  5:06 ` linkw at gcc dot gnu.org
2020-09-18  9:11 ` linkw at gcc dot gnu.org
2020-09-18 10:30 ` rguenther at suse dot de
2020-09-18 13:40 ` linkw at gcc dot gnu.org
2020-09-19 15:45 ` crazylht at gmail dot com
2020-09-21  7:14 ` rguenther at suse dot de
2020-09-25 12:46 ` linkw at gcc dot gnu.org
2020-09-25 12:52 ` linkw at gcc dot gnu.org [this message]
2020-09-25 12:57 ` rguenth at gcc dot gnu.org
2020-09-25 13:05 ` rguenth at gcc dot gnu.org
2020-09-27  2:56 ` crazylht at gmail dot com
2020-09-27  3:07 ` crazylht at gmail dot com
2020-09-27  6:48 ` rguenther at suse dot de
2020-09-27 10:20 ` linkw at gcc dot gnu.org
2020-09-27 10:36 ` linkw at gcc dot gnu.org
2020-09-27 10:42 ` linkw at gcc dot gnu.org
2020-09-28  5:45 ` crazylht at gmail dot com
2020-09-28  6:40 ` linkw at gcc dot gnu.org
2020-09-28  6:48 ` rguenth at gcc dot gnu.org
2020-09-28  6:59 ` rguenth at gcc dot gnu.org
2020-09-28 12:54 ` linkw at gcc dot gnu.org
2020-09-28 13:27 ` rguenth at gcc dot gnu.org
2020-09-29  2:05 ` crazylht at gmail dot com
2020-09-29 12:27 ` rsandifo at gcc dot gnu.org
2020-11-03  6:28 ` cvs-commit at gcc dot gnu.org
2020-11-05  2:25 ` linkw 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-96789-4-QlEUQP261N@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: link
Be 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).