public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/100173] telecom/viterb00data_1 has 16.92% regression compared O2 -ftree-vectorize -fvect-cost-model=very-cheap to O2  on CLX/ICX, 9% regression on znver3
Date: Thu, 29 Apr 2021 12:15:29 +0000	[thread overview]
Message-ID: <bug-100173-4-6y6YSVRHIu@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-100173-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Hongtao.liu from comment #4)
> > but yes, cselim will also sink the first store, moving it across the
> 
> Can we also sink loads?

loads are usually hoisted, not sunk.

> assign pointer to another temp pointer in both if
> and else bb, and then load val from this temp pointer. those assignments
> that in if and else branch would be finially transformed to conditional mov. 

Hmm, so conditional move is faster.  No, I don't think we'd do this at
the moment and I'm not sure we want in general (since aggressive
if-conversion tends to be bad).

> performance can benifit 100% with below change.
> 
>  for (i = 0; i < (1<<5)/2; i++) {
> 
>     esMetricIn = *pBranchMetric++;
> 
>     esMetric1 = pIn1->m_esPathMetric - esMetricIn;
>     esMetric2 = pIn2->m_esPathMetric + esMetricIn;
> 
>     e_s16 *t1p = (esMetric1 >= esMetric2) ? &(pIn1->m_esState) :
> &(pIn2->m_esState);
>     e_s16 t1  = (esMetric1 >= esMetric2) ? esMetric1 : esMetric2;
>     pOut->m_esPathMetric = t1;
>     pOut->m_esState = *t1p << 1;
>     pOut++;
> 
>     esMetric1 = pIn1->m_esPathMetric + esMetricIn;
>     esMetric2 = pIn2->m_esPathMetric - esMetricIn;
> 
>     e_s16 *t2p = (esMetric1 >= esMetric2) ? &(pIn1->m_esState) :
> &(pIn2->m_esState);
>     e_s16 t2  = (esMetric1 >= esMetric2) ? esMetric1 : esMetric2;
>     pOut->m_esPathMetric = t2;
>     pOut->m_esState = *t2p << 1;
>     pOut++;
> 
>     pIn1++;
>     pIn2++;
>   }

      parent reply	other threads:[~2021-04-29 12:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-21  5:48 [Bug tree-optimization/100173] New: " crazylht at gmail dot com
2021-04-21  6:46 ` [Bug tree-optimization/100173] " rguenth at gcc dot gnu.org
2021-04-29  3:02 ` crazylht at gmail dot com
2021-04-29  6:57 ` rguenther at suse dot de
2021-04-29 11:02 ` crazylht at gmail dot com
2021-04-29 12:15 ` rguenth at gcc dot gnu.org [this message]

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-100173-4-6y6YSVRHIu@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).