------- 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 <[EMAIL PROTECTED]> * 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