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 target/30825] [4.3 Regression] current mainline fails to bootstrap when -msse is used
Date: Fri, 23 Feb 2007 13:54:00 -0000	[thread overview]
Message-ID: <20070223135435.5145.qmail@sourceware.org> (raw)
In-Reply-To: <bug-30825-14115@http.gcc.gnu.org/bugzilla/>



------- Comment #4 from ubizjak at gmail dot com  2007-02-23 13:54 -------
Got it.

This regression is indeed introduced by patch that fixes inter-unit moves
(http://gcc.gnu.org/viewcvs?view=rev&revision=121767) as was found out in PR
30921.

The failure is due to slight register preference change introduced by the above
patch. The consequence of this change is, that a mmx register is allocated when
-mmmx (or -msseX) is used in bootstrap flags. This affects all subsequent x87
FP calculations, so they always show "nan" in active shared x87/mm registers
due to missing emms insn.

Attached patch tries to set register preferences back as they were before
inter-unit moves patch. Using this patch, I was able to bootstrap gcc using
"-O2 -msse" and "-O2 -march=pentium4" BOOT_CFLAGS. For the former case, patch
was also regression tested for c testsuite without new failures.

2007-02-23  Uros Bizjak  <ubizjak@gmail.com>

        * config/i386/i386.md (*movdi_1_rex64, zero_extendsidi2_32,
        zero_extendsidi2_rex64): Penalize MMX register<->memory moves.
        (*movsf_1): Penalize MMX moves.

Index: i386.md
===================================================================
--- i386.md     (revision 122219)
+++ i386.md     (working copy)
@@ -2022,9 +2022,9 @@

 (define_insn "*movdi_1_rex64"
   [(set (match_operand:DI 0 "nonimmediate_operand"
-         "=r,r  ,r,m ,!m,*y,*y,?r ,m ,?*Ym,*y,*x,*x,?r ,m,?*Yi,*x,?*x,?*Ym")
+         "=r,r  ,r,m ,!m,*y,*y,?r ,?m,?*Ym,?*y,*x,*x,?r ,m,?*Yi,*x,?*x,?*Ym")
        (match_operand:DI 1 "general_operand"
-         "Z ,rem,i,re,n ,C ,*y,*Ym,*y,r   ,m ,C ,*x,*Yi,*x,r  ,m ,*Ym,*x"))]
+         "Z ,rem,i,re,n ,C ,*y,*Ym,*y,r   ,m  ,C ,*x,*Yi,*x,r  ,m ,*Ym,*x"))]
   "TARGET_64BIT && !(MEM_P (operands[0]) && MEM_P (operands[1]))"
 {
   switch (get_attr_type (insn))
@@ -2326,9 +2326,9 @@

 (define_insn "*movsf_1"
   [(set (match_operand:SF 0 "nonimmediate_operand"
-         "=f,m,f,r  ,m ,x,x,x ,m,*y,m ,*y,Yi,r ,*Ym,r  ")
+         "=f,m,f,r  ,m ,x,x,x ,m,!*y,!m ,!*y,!Yi,!r ,!*Ym,!r ")
        (match_operand:SF 1 "general_operand"
-         "fm,f,G,rmF,Fr,C,x,xm,x,m ,*y,*y,r ,Yi,r  ,*Ym"))]
+         "fm,f,G,rmF,Fr,C,x,xm,x,m  , *y, *y,r  ,Yi ,r   ,*Ym"))]
   "!(MEM_P (operands[0]) && MEM_P (operands[1]))
    && (reload_in_progress || reload_completed
        || (ix86_cmodel == CM_MEDIUM || ix86_cmodel == CM_LARGE)
@@ -3401,9 +3401,9 @@
 })

 (define_insn "zero_extendsidi2_32"
-  [(set (match_operand:DI 0 "nonimmediate_operand"
"=r,?r,?o,?*Ym,*y,?*Yi,*Y2")
+  [(set (match_operand:DI 0 "nonimmediate_operand"
"=r,?r,?o,?*Ym,?*y,?*Yi,?*Y2")
        (zero_extend:DI
-        (match_operand:SI 1 "nonimmediate_operand" "0,rm,r ,r   ,m ,r   ,m")))
+        (match_operand:SI 1 "nonimmediate_operand" "0,rm,r ,r   ,m  ,r  
,m")))
    (clobber (reg:CC FLAGS_REG))]
   "!TARGET_64BIT"
   "@
@@ -3418,9 +3418,9 @@
    (set_attr "type" "multi,multi,multi,mmxmov,mmxmov,ssemov,ssemov")])

 (define_insn "zero_extendsidi2_rex64"
-  [(set (match_operand:DI 0 "nonimmediate_operand" "=r,o,?*Ym,*y,?*Yi,*Y2")
+  [(set (match_operand:DI 0 "nonimmediate_operand" "=r,o,?*Ym,?*y,?*Yi,?*Y2")
      (zero_extend:DI
-       (match_operand:SI 1 "nonimmediate_operand"  "rm,0,r   ,m ,r   ,m")))]
+       (match_operand:SI 1 "nonimmediate_operand"  "rm,0,r   ,m  ,r   ,m")))]
   "TARGET_64BIT"
   "@
    mov\t{%k1, %k0|%k0, %k1}


-- 

ubizjak at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rth at gcc dot gnu dot org
           Severity|normal                      |critical
           Keywords|                            |ssemmx
            Summary|[4.3 Regression] current    |[4.3 Regression] current
                   |mainline fails to bootstrap |mainline fails to bootstrap
                   |with --with-arch=athlon64   |when -msse is used


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


  parent reply	other threads:[~2007-02-23 13:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-16 16:14 [Bug bootstrap/30825] New: current mainline fails to bootstrap with --with-arch=athlon64 jvb at wongr dot net
2007-02-23  0:43 ` [Bug target/30825] [4.3 Regression] " pinskia at gcc dot gnu dot org
2007-02-23  0:43 ` pinskia at gcc dot gnu dot org
2007-02-23  7:34 ` ubizjak at gmail dot com
2007-02-23 10:22 ` ubizjak at gmail dot com
2007-02-23 13:54 ` ubizjak at gmail dot com [this message]
2007-02-23 16:12 ` [Bug target/30825] [4.3 Regression] current mainline fails to bootstrap when -msse is used rth at gcc dot gnu dot org
2007-02-23 18:19 ` uros at gcc dot gnu dot org
2007-02-23 18:21 ` ubizjak 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=20070223135435.5145.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).