public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/27971] eliminate shift in array[(x>>2)&3]
Date: Fri, 09 Jun 2006 06:20:00 -0000	[thread overview]
Message-ID: <20060609061837.15437.qmail@sourceware.org> (raw)
In-Reply-To: <bug-27971-5748@http.gcc.gnu.org/bugzilla/>



------- Comment #1 from pinskia at gcc dot gnu dot org  2006-06-09 06:18 -------
This works correctly on powerpc.  The rtl we get on x86_64 is:
(insn 10 7 11 2 (parallel [
            (set (reg:DI 61)
                (lshiftrt:DI (reg/v:DI 59 [ x ])
                    (const_int 2 [0x2])))
            (clobber (reg:CC 17 flags))
        ]) 456 {*lshrdi3_1_rex64} (insn_list:REG_DEP_TRUE 6 (nil))
    (expr_list:REG_DEAD (reg/v:DI 59 [ x ])
        (expr_list:REG_UNUSED (reg:CC 17 flags)
            (nil))))

(insn 11 10 13 2 (parallel [
            (set (reg:DI 62)
                (and:DI (reg:DI 61)
                    (const_int 3 [0x3])))
            (clobber (reg:CC 17 flags))
        ]) 297 {*anddi_1_rex64} (insn_list:REG_DEP_TRUE 10 (nil))
    (expr_list:REG_DEAD (reg:DI 61)
        (expr_list:REG_UNUSED (reg:CC 17 flags)
            (nil))))

(insn 13 11 17 2 (set (reg:SI 64)
        (mem/s:SI (plus:DI (mult:DI (reg:DI 62)
                    (const_int 4 [0x4]))
                (symbol_ref:DI ("array") <var_decl 0x2aaaaaf4bbb0 array>)) [3
array S4 A32])) 40 {*movsi_1} (insn_list:REG_DEP_TRUE 11 (nil))
    (expr_list:REG_DEAD (reg:DI 62)
        (nil)))

so I wonder if the something is not being reduced correctly.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
          Component|pending                     |target
     Ever Confirmed|0                           |1
   GCC host triplet|x86_64-linux-gnu            |
   Last reconfirmed|0000-00-00 00:00:00         |2006-06-09 06:18:37
               date|                            |


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


  reply	other threads:[~2006-06-09  6:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-09  6:18 [Bug pending/27971] New: " dean at arctic dot org
2006-06-09  6:20 ` pinskia at gcc dot gnu dot org [this message]
2006-06-09  6:43 ` [Bug target/27971] " pinskia at gcc dot gnu dot org
2007-11-28 23:06 ` raksit at google dot com
2007-12-05 19:28 ` raksit at google dot com
2008-01-11  4:51 ` raksit at gcc dot gnu dot org
2008-01-14 19:57 ` raksit 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=20060609061837.15437.qmail@sourceware.org \
    --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).