From 9ccb17b4c47e4c43367cc78059d5deac32672de8 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Fri, 31 Oct 2014 20:47:36 +0100 Subject: [PATCH] re PR rtl-optimization/63620 (RELOAD lost SET_GOT dependency on Darwin) PR target/63620 * config/i386/i386.md (*pushtf): Allow only CONST_DOUBLES that won't be reloaded through memory. (*pushxf): Ditto. (*pushdf): Ditto. From-SVN: r216987 --- gcc/ChangeLog | 8 ++++++++ gcc/config/i386/i386.md | 19 ++++++++++++++++--- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6a130836fde..8fb70a1b190 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2014-10-31 Uros Bizjak + + PR target/63620 + * config/i386/i386.md (*pushtf): Allow only CONST_DOUBLES that won't + be reloaded through memory. + (*pushxf): Ditto. + (*pushdf): Ditto. + 2014-10-31 Jakub Jelinek PR rtl-optimization/63659 diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index a1803d56612..7e4f328aa7f 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -2733,10 +2733,14 @@ ;; Floating point push instructions. +;; %%% Remove CONST_DOUBLE workaround after PR63620 is fixed! (define_insn "*pushtf" [(set (match_operand:TF 0 "push_operand" "=<,<") (match_operand:TF 1 "general_no_elim_operand" "x,*roF"))] - "TARGET_64BIT || TARGET_SSE" + "(TARGET_64BIT || TARGET_SSE) + && (!can_create_pseudo_p () + || GET_CODE (operands[1]) != CONST_DOUBLE + || standard_sse_constant_p (operands[1]))" { /* This insn should be already split before reg-stack. */ gcc_unreachable (); @@ -2758,10 +2762,13 @@ operands[0] = replace_equiv_address (operands[0], stack_pointer_rtx); }) +;; %%% Remove CONST_DOUBLE workaround after PR63620 is fixed! (define_insn "*pushxf" [(set (match_operand:XF 0 "push_operand" "=<,<") (match_operand:XF 1 "general_no_elim_operand" "f,Yx*roF"))] - "" + "!can_create_pseudo_p () + || GET_CODE (operands[1]) != CONST_DOUBLE + || standard_80387_constant_p (operands[1]) > 0" { /* This insn should be already split before reg-stack. */ gcc_unreachable (); @@ -2789,10 +2796,16 @@ operands[0] = replace_equiv_address (operands[0], stack_pointer_rtx); }) +;; %%% Remove CONST_DOUBLE workaround after PR63620 is fixed! (define_insn "*pushdf" [(set (match_operand:DF 0 "push_operand" "=<,<,<,<") (match_operand:DF 1 "general_no_elim_operand" "f,Yd*roF,rmF,x"))] - "" + "!can_create_pseudo_p () + || GET_CODE (operands[1]) != CONST_DOUBLE + || (!(TARGET_SSE2 && TARGET_SSE_MATH) + && standard_80387_constant_p (operands[1]) > 0) + || (TARGET_SSE2 && TARGET_SSE_MATH + && standard_sse_constant_p (operands[1]))" { /* This insn should be already split before reg-stack. */ gcc_unreachable (); -- 2.30.2