public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/17236] inefficient code for long long multiply on x86
Date: Tue, 18 Dec 2007 18:33:00 -0000	[thread overview]
Message-ID: <20071218183322.29553.qmail@sourceware.org> (raw)
In-Reply-To: <bug-17236-1008@http.gcc.gnu.org/bugzilla/>



------- Comment #16 from ubizjak at gmail dot com  2007-12-18 18:33 -------
(In reply to comment #15)

> Note two moves [(insn 36) and (insn 37)] around (insn 12).

Bah. This is the correct sequence, around (insn 10) that seems to be the root
of all problems:

(insn:HI 9 8 36 2 m.c:2 (parallel [
            (set (reg:SI 2 cx [62])
                (plus:SI (reg:SI 2 cx [62])
                    (reg:SI 0 ax [63])))
            (clobber (reg:CC 17 flags))
        ]) 249 {*addsi_1} (nil))

(insn 36 9 10 2 m.c:2 (set (reg:SI 0 ax)
        (reg:SI 4 si [orig:66 b ] [66])) 47 {*movsi_1} (nil))

(insn:HI 10 36 37 2 m.c:2 (parallel [
            (set (reg:DI 0 ax)
                (mult:DI (zero_extend:DI (reg:SI 0 ax))
                    (zero_extend:DI (reg:SI 3 bx [orig:64 a ] [64]))))
            (clobber (reg:CC 17 flags))
        ]) 304 {*umulsidi3_insn} (nil))

(insn 37 10 11 2 m.c:2 (set (reg:DI 3 bx [61])
        (reg:DI 0 ax)) 88 {*movdi_2} (nil))


DImode AX as found in (insn 10) could simply be propagated up and down RTL
stream as SImode destination of (insn 8) and SImode source of (insn 12). For
some reason, RA is afraid to allocate registers in mixed modes.


-- 


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


  parent reply	other threads:[~2007-12-18 18:33 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-17236-1008@http.gcc.gnu.org/bugzilla/>
2007-02-02  0:17 ` roger at eyesopen dot com
2007-11-23 20:48 ` steven at gcc dot gnu dot org
2007-12-18  7:43 ` bonzini at gnu dot org
2007-12-18  7:53 ` bonzini at gnu dot org
2007-12-18  8:05 ` bonzini at gnu dot org
2007-12-18  8:10 ` ebotcazou at gcc dot gnu dot org
2007-12-18 13:48 ` ubizjak at gmail dot com
2007-12-18 16:02 ` bonzini at gnu dot org
2007-12-18 16:39 ` jakub at gcc dot gnu dot org
2007-12-18 16:51 ` bonzini at gnu dot org
2007-12-18 18:20 ` ubizjak at gmail dot com
2007-12-18 18:33 ` ubizjak at gmail dot com [this message]
2007-12-19  9:49 ` bonzini at gnu dot org
2007-12-19 12:11 ` ubizjak at gmail dot com
2007-12-19 12:14 ` bonzini at gnu dot org
2007-12-19 12:32 ` bonzini at gnu dot org
2007-12-19 12:43 ` bonzini at gnu dot org
2007-12-19 13:12 ` ubizjak at gmail dot com
2007-12-19 13:36 ` bonzini at gnu dot org
2007-12-19 13:49 ` steven at gcc dot gnu dot org
2007-12-19 13:50 ` bonzini at gnu dot org
2007-12-19 13:54 ` bonzini at gnu dot org
2007-12-20 13:53 ` bonzini at gnu dot org
2007-12-20 14:16 ` bonzini at gnu dot org
2008-03-07  8:27 ` bonzini at gnu dot org
2008-03-07  8:42 ` bonzini at gnu dot org
2008-09-06 16:12 ` ubizjak at gmail dot com
2008-09-06 16:19 ` ubizjak at gmail dot com
2008-09-06 16:20 ` ubizjak at gmail dot com
2004-08-30  5:50 [Bug rtl-optimization/17236] New: " dann at godzilla dot ics dot uci dot edu
2004-10-06 23:27 ` [Bug rtl-optimization/17236] " giovannibajo at libero dot it
2005-03-14 18:24 ` cvs-commit at gcc dot gnu dot org
2005-03-15 10:05 ` giovannibajo at libero dot it
2005-03-15 10:07 ` giovannibajo at libero dot it

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