g++.dg/torture/pr37922.C -O3 -fomit-frame-pointer -funroll-loops was
failing for n32 and n64 on mips64-linux-gnu because we were renaming
the global pointer register to $25, even though $25 is needed by the
sequence that sets up the global pointer.  This in turn was caused by
a missing earlyclobber in the loadgp_newabi_<mode> pattern.

Bit of a brown-paper-bag bug, sorry.  Will backport it to the release
branches soon.

Richard


gcc/
        * config/mips/mips.md (loadgp_newabi_<mode>): Add missing
        earlyclobber.

Index: gcc/config/mips/mips.md
===================================================================
--- gcc/config/mips/mips.md     2011-12-31 11:43:20.000000000 +0000
+++ gcc/config/mips/mips.md     2011-12-31 11:43:28.000000000 +0000
@@ -4838,7 +4838,7 @@ (define_expand "load_const_gp_<mode>"
 ;; of _gp from the start of this function.  Operand 1 is the incoming
 ;; function address.
 (define_insn_and_split "loadgp_newabi_<mode>"
-  [(set (match_operand:P 0 "register_operand" "=d")
+  [(set (match_operand:P 0 "register_operand" "=&d")
        (unspec:P [(match_operand:P 1)
                   (match_operand:P 2 "register_operand" "d")]
                  UNSPEC_LOADGP))]

Reply via email to