public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "steven at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/17387] Redundant instructions in loop optimization
Date: Thu, 27 Jan 2005 01:36:00 -0000	[thread overview]
Message-ID: <20050127013618.26460.qmail@sourceware.org> (raw)
In-Reply-To: <20040909235415.17387.hjl@lucon.org>


------- Additional Comments From steven at gcc dot gnu dot org  2005-01-27 01:36 -------
My first suspicion was the `register' keyword, but that's not it: 
 
-------------------------------------------------- 
extern unsigned int S[]; 
extern unsigned int state[]; 
 
unsigned int 
foo () 
{ 
  unsigned int t; 
  int j; 
 
  t=0; 
  for (j=0; j<16; j+=4) 
   { 
     t = state[j + 0] ^= S[t]; 
     t = state[j + 1] ^= S[t]; 
   } 
  return t; 
} 
-------------------------------------------------- 
 
--> 
 
-------------------------------------------------- 
foo: 
.LFB2: 
        xorl    %eax, %eax 
        movl    $4, %ecx 
        movl    $state, %edx 
        .p2align 4,,7 
.L2: 
        mov     %eax, %eax 
        movl    S(,%rax,4), %eax 
        xorl    (%rdx), %eax 
        movl    %eax, (%rdx) 
        mov     %eax, %eax        <-- bah! 
        movl    S(,%rax,4), %eax 
        xorl    4(%rdx), %eax 
        movl    %eax, 4(%rdx) 
        addq    $16, %rdx 
        decl    %ecx 
        jne     .L2 
        rep ; ret 
.LFE2: 
-------------------------------------------------- 

-- 


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


  parent reply	other threads:[~2005-01-27  1:36 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-09 23:54 [Bug c/17387] New: " hjl at lucon dot org
2004-09-10  0:36 ` [Bug rtl-optimization/17387] " pinskia at gcc dot gnu dot org
2004-09-10  2:50 ` law at gcc dot gnu dot org
2004-09-10  8:05 ` pinskia at gcc dot gnu dot org
2004-09-10  9:53 ` hubicka at gcc dot gnu dot org
2004-09-10 23:22 ` pinskia at gcc dot gnu dot org
2004-09-11 19:55 ` rakdver at gcc dot gnu dot org
2004-11-27 20:49 ` pinskia at gcc dot gnu dot org
2005-01-23 13:36 ` steven at gcc dot gnu dot org
2005-01-24 18:17 ` hjl at lucon dot org
2005-01-24 18:53 ` pinskia at gcc dot gnu dot org
2005-01-27  1:27 ` steven at gcc dot gnu dot org
2005-01-27  1:36 ` steven at gcc dot gnu dot org [this message]
2005-01-27  1:43 ` steven at gcc dot gnu dot org
2005-01-27  4:03 ` hjl at lucon dot org
2005-01-27  6:05 ` rth at gcc dot gnu dot org
2005-01-27  7:14 ` stevenb at suse dot de
2005-01-27 10:14 ` steven at gcc dot gnu dot org
2005-01-27 10:27 ` steven at gcc dot gnu dot org
2005-01-27 10:28 ` steven at gcc dot gnu dot org
2005-01-27 13:36 ` pinskia at gcc dot gnu dot org
2005-09-29  3:44 ` pinskia at gcc dot gnu dot org
     [not found] <bug-17387-682@http.gcc.gnu.org/bugzilla/>
2006-01-15 20:30 ` pinskia at gcc dot gnu dot org
2006-02-27 23:55 ` hjl at lucon dot org
2007-04-20 20:58 ` steven at gcc dot gnu dot org
2007-04-20 21:10 ` steven at gcc dot gnu dot org
2007-05-25 20:32 ` steven 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=20050127013618.26460.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).