re PR rtl-optimization/63620 (RELOAD lost SET_GOT dependency on Darwin)
authorUros Bizjak <ubizjak@gmail.com>
Fri, 31 Oct 2014 19:47:36 +0000 (20:47 +0100)
committerUros Bizjak <uros@gcc.gnu.org>
Fri, 31 Oct 2014 19:47:36 +0000 (20:47 +0100)
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
gcc/config/i386/i386.md

index 6a130836fdea0938cbe2837c1ef62970988c4c85..8fb70a1b190d1dc1767f63d8090ba077e483456a 100644 (file)
@@ -1,3 +1,11 @@
+2014-10-31  Uros Bizjak  <ubizjak@gmail.com>
+
+       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  <jakub@redhat.com>
 
        PR rtl-optimization/63659
index a1803d56612160d0374d56be4cc44624f5a490ec..7e4f328aa7f93bb617efb668af52c88012c6cfad 100644 (file)
 \f
 ;; 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 ();
   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 ();
   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 ();