public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "alalaw01 at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/40073] Vector short/char shifts generate sub-optimal code
Date: Fri, 12 Jun 2015 09:56:00 -0000	[thread overview]
Message-ID: <bug-40073-4-ilU9y44EKN@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-40073-4@http.gcc.gnu.org/bugzilla/>

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

alalaw01 at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |alalaw01 at gcc dot gnu.org
            Version|4.5.0                       |6.0

--- Comment #6 from alalaw01 at gcc dot gnu.org ---
Same problem on AArch64 (at -O3). We've decided the shift is to be done on
integers, widening the arguments and then truncating, before we hit the
vectorizer:

  int i;
  short unsigned int _4;
  int _5;
  int _8;
  short unsigned int _9;
  int pretmp_18;
  unsigned int ivtmp_21;
  unsigned int ivtmp_22;

  <bb 2>:
  pretmp_18 = (int) j_6(D);

  <bb 3>:
  # i_14 = PHI <i_11(4), 0(2)>
  # ivtmp_22 = PHI <ivtmp_21(4), 1024(2)>
  _4 = b[i_14];
  _5 = (int) _4;
  _8 = _5 << pretmp_18;
  _9 = (short unsigned int) _8;
  a[i_14] = _9;
  i_11 = i_14 + 1;
  ivtmp_21 = ivtmp_22 - 1;
  if (ivtmp_21 == 0)


  parent reply	other threads:[~2015-06-12  9:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-40073-4@http.gcc.gnu.org/bugzilla/>
2014-04-26  7:00 ` glisse at gcc dot gnu.org
2015-06-12  9:56 ` alalaw01 at gcc dot gnu.org [this message]
2015-06-12 10:08 ` pinskia at gcc dot gnu.org
2015-06-12 11:39 ` alalaw01 at gcc dot gnu.org
2015-06-12 12:01 ` glisse at gcc dot gnu.org
2022-03-08 17:25 ` law at gcc dot gnu.org
2009-05-08 16:57 [Bug tree-optimization/40073] New: " meissner at linux dot vnet dot ibm dot com
2009-05-08 16:59 ` [Bug tree-optimization/40073] " meissner at linux dot vnet dot ibm dot com
2009-05-08 17:02 ` meissner at linux dot vnet dot ibm dot com
2009-05-08 17:03 ` meissner at linux dot vnet dot ibm dot com
2009-05-08 17:05 ` meissner at linux dot vnet dot ibm dot com
2009-05-08 17:06 ` meissner at linux dot vnet dot ibm dot com
2009-05-08 20:39 ` rguenth at gcc dot gnu dot 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-40073-4-ilU9y44EKN@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).