public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hjl.tools at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/50088] movzbl is generated instead of movl
Date: Wed, 17 Aug 2011 14:43:00 -0000	[thread overview]
Message-ID: <bug-50088-4-So5zOOT7QO@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-50088-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50088

--- Comment #16 from H.J. Lu <hjl.tools at gmail dot com> 2011-08-17 14:37:35 UTC ---
The testcase has ...

  int n8 = (arr[7] * 9 + 8) & 15;

  for (i = 0; i < len; i+=8)
    {
      n1 = (n1 + 1) & 15;

      s += arr[i] << n1;

The shift count is 32bit, which causes 32bit spill. Since shift/rotate
instructions only take 8bit register (CL) as shift count, we load 8bit
into CL. How do we solve this?


  parent reply	other threads:[~2011-08-17 14:38 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-15 13:08 [Bug rtl-optimization/50088] New: " enkovich.gnu at gmail dot com
2011-08-15 13:14 ` [Bug rtl-optimization/50088] " rguenth at gcc dot gnu.org
2011-08-15 13:30 ` enkovich.gnu at gmail dot com
2011-08-15 14:56 ` hjl.tools at gmail dot com
2011-08-15 15:32 ` rguenth at gcc dot gnu.org
2011-08-15 16:01 ` hjl.tools at gmail dot com
2011-08-15 17:27 ` hjl.tools at gmail dot com
2011-08-15 17:35 ` hjl.tools at gmail dot com
2011-08-16  6:57 ` enkovich.gnu at gmail dot com
2011-08-16  7:31 ` enkovich.gnu at gmail dot com
2011-08-16 14:46 ` hjl.tools at gmail dot com
2011-08-16 14:47 ` hjl.tools at gmail dot com
2011-08-16 17:13 ` hjl.tools at gmail dot com
2011-08-17  9:12 ` enkovich.gnu at gmail dot com
2011-08-17 13:42 ` hjl.tools at gmail dot com
2011-08-17 14:29 ` enkovich.gnu at gmail dot com
2011-08-17 14:43 ` hjl.tools at gmail dot com [this message]
2011-08-17 14:54 ` rguenth at gcc dot gnu.org
2011-08-17 21:32 ` hjl.tools at gmail dot com
2011-08-17 22:32 ` hjl.tools at gmail dot com
2011-08-17 22:49 ` hjl.tools at gmail dot com

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-50088-4-So5zOOT7QO@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).