From: Uros Bizjak Date: Wed, 7 May 2008 07:19:01 +0000 (+0200) Subject: i386.c (ix86_expand_copysign): Force non-zero constant TFmode op0 to register. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=537d4fa684f272ea72c1c8db58e4f1dcd3b7cda4;p=gcc.git i386.c (ix86_expand_copysign): Force non-zero constant TFmode op0 to register. * config/i386/i386.c (ix86_expand_copysign): Force non-zero constant TFmode op0 to register. From-SVN: r135025 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2a12ec1431a..f35a21b5eee 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2008-05-08 Uros Bizjak + + * config/i386/i386.c (ix86_expand_copysign): Force non-zero constant + TFmode op0 to register. + 2008-05-07 Alan Modra * c-decl.c (grokdeclarator): Comment typo. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index d0ebd80822e..b123fa09e53 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -11245,7 +11245,7 @@ ix86_expand_fp_absneg_operator (enum rtx_code code, enum machine_mode mode, void ix86_expand_copysign (rtx operands[]) { - enum machine_mode mode, vmode; + enum machine_mode mode; rtx dest, op0, op1, mask, nmask; dest = operands[0]; @@ -11253,7 +11253,6 @@ ix86_expand_copysign (rtx operands[]) op1 = operands[2]; mode = GET_MODE (dest); - vmode = mode == SFmode ? V4SFmode : V2DFmode; if (GET_CODE (op0) == CONST_DOUBLE) { @@ -11264,6 +11263,10 @@ ix86_expand_copysign (rtx operands[]) if (mode == SFmode || mode == DFmode) { + enum machine_mode vmode; + + vmode = mode == SFmode ? V4SFmode : V2DFmode; + if (op0 == CONST0_RTX (mode)) op0 = CONST0_RTX (vmode); else @@ -11275,9 +11278,12 @@ ix86_expand_copysign (rtx operands[]) CONST0_RTX (SFmode), CONST0_RTX (SFmode)); else v = gen_rtvec (2, op0, CONST0_RTX (DFmode)); + op0 = force_reg (vmode, gen_rtx_CONST_VECTOR (vmode, v)); } } + else if (op0 != CONST0_RTX (mode)) + op0 = force_reg (mode, op0); mask = ix86_build_signbit_mask (mode, 0, 0);