public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/28545]  New: Wrong code for hoisted multiplication
@ 2006-07-30 18:42 ben at decadentplace dot org dot uk
  2006-07-30 18:46 ` [Bug c/28545] " ben at decadentplace dot org dot uk
                   ` (22 more replies)
  0 siblings, 23 replies; 24+ messages in thread
From: ben at decadentplace dot org dot uk @ 2006-07-30 18:42 UTC (permalink / raw)
  To: gcc-bugs

I have some code that calls
    memset(p, cr+1, cr*cr);
inside a loop.  (Will attach this later.)

gcc 4.1.2 (snapshot from 20060715) appears to attempt to calculate cr*cr
outside the loop and then load it when needed. However, the generated code uses
the wrong register for one the multiplicands:

        movl    %edi, %ecx     /* edi contains cr */
        xorl    %eax, %eax
        imull   %ebx, %ecx     /* ebx contains another variable */
        leal    1(%edi), %ebx


-- 
           Summary: Wrong code for hoisted multiplication
           Product: gcc
           Version: 4.1.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ben at decadentplace dot org dot uk
 GCC build triplet: i486-linux-gnu
  GCC host triplet: i486-linux-gnu
GCC target triplet: i486-linux-gnu


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


^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2007-01-14  6:07 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-30 18:42 [Bug c/28545] New: Wrong code for hoisted multiplication ben at decadentplace dot org dot uk
2006-07-30 18:46 ` [Bug c/28545] " ben at decadentplace dot org dot uk
2006-07-30 19:02 ` [Bug middle-end/28545] " ben at decadentplace dot org dot uk
2006-07-30 19:05 ` [Bug middle-end/28545] [4.1 only] " pinskia at gcc dot gnu dot org
2006-07-30 20:11 ` ben at decadentplace dot org dot uk
2006-07-31  1:41 ` pinskia at gcc dot gnu dot org
2006-07-31  8:23 ` [Bug middle-end/28545] [4.1 Regression] " rguenth at gcc dot gnu dot org
2006-10-14  9:26 ` rguenth at gcc dot gnu dot org
2006-10-14 10:19 ` rguenth at gcc dot gnu dot org
2006-10-14 10:41 ` rguenth at gcc dot gnu dot org
2006-10-14 11:11 ` rguenth at gcc dot gnu dot org
2006-10-14 14:49 ` rguenth at gcc dot gnu dot org
2006-10-14 15:05 ` patchapp at dberlin dot org
2006-10-14 15:13 ` pinskia at gcc dot gnu dot org
2006-10-14 16:08 ` [Bug tree-optimization/28545] " pinskia at gcc dot gnu dot org
2006-10-14 16:09 ` pinskia at gcc dot gnu dot org
2006-10-16 14:36 ` amacleod at redhat dot com
2006-11-01 18:15 ` mmitchel at gcc dot gnu dot org
2006-11-06 15:15 ` rguenth at gcc dot gnu dot org
2006-11-06 15:17 ` rguenth at gcc dot gnu dot org
2006-11-07 19:37 ` pinskia at gcc dot gnu dot org
2006-11-12  1:49 ` pinskia at gcc dot gnu dot org
2006-11-12  1:49 ` pinskia at gcc dot gnu dot org
2007-01-14  6:07 ` pinskia at gcc dot gnu dot org

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).