revert: re PR rtl-optimization/63620 (RELOAD lost SET_GOT dependency on Darwin)
authorUros Bizjak <ubizjak@gmail.com>
Mon, 10 Nov 2014 23:29:59 +0000 (00:29 +0100)
committerUros Bizjak <uros@gcc.gnu.org>
Mon, 10 Nov 2014 23:29:59 +0000 (00:29 +0100)
2014-11-11  Uros Bizjak  <ubizjak@gmail.com>

Revert:
2014-10-31  Uros Bizjak  <ubizjak@gmail.com>

PR target/63620
* config/i386/i386-protos.h (ix86_use_pseudo_pic_reg): Declare.
* config/i386/i386.c (ix86_use_pseudo_pic_reg): Export.
* config/i386/i386.md (*pushtf): Allow only CONST_DOUBLEs that won't
be reloaded through memory.
(*pushxf): Ditto.
(*pushdf): Ditto.

testsuite/ChangeLog:

2014-11-11  Uros Bizjak  <ubizjak@gmail.com>
    Ilya Enkovich  <ilya.enkovich@intel.com>

PR target/63620
* gcc.target/i386/pr63620.c: New test.

Co-Authored-By: Ilya Enkovich <ilya.enkovich@intel.com>
From-SVN: r217325

gcc/ChangeLog
gcc/config/i386/i386-protos.h
gcc/config/i386/i386.c
gcc/config/i386/i386.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr63620.c [new file with mode: 0644]

index 9d7dc265cb6855e646d3113cd248823585cc5e62..bceacd68518dc47b1cb7b4101d993b58637c1330 100644 (file)
@@ -1,3 +1,16 @@
+2014-11-11  Uros Bizjak  <ubizjak@gmail.com>
+
+       Revert:
+       2014-10-31  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR target/63620
+       * config/i386/i386-protos.h (ix86_use_pseudo_pic_reg): Declare.
+       * config/i386/i386.c (ix86_use_pseudo_pic_reg): Export.
+       * config/i386/i386.md (*pushtf): Allow only CONST_DOUBLEs that won't
+       be reloaded through memory.
+       (*pushxf): Ditto.
+       (*pushdf): Ditto.
+
 2014-11-11  Jakub Jelinek  <jakub@redhat.com>
            Martin Liska  <mliska@suse.cz>
 
index d14a107e8c282f44cd5a76ae3ae0c636ba756dc9..c4870d20108c8f118e19b1c8898fefd87226aa41 100644 (file)
@@ -42,8 +42,6 @@ extern enum calling_abi ix86_function_type_abi (const_tree);
 
 extern void ix86_reset_previous_fndecl (void);
 
-extern bool ix86_use_pseudo_pic_reg (void);
-
 #ifdef RTX_CODE
 extern int standard_80387_constant_p (rtx);
 extern const char *standard_80387_constant_opcode (rtx);
index 085eb54762173b8bb3499e99177dad1a0207c5e4..7a59252624ad9d086ed9c69cb95c4f9c4c160c6d 100644 (file)
@@ -6184,7 +6184,7 @@ ix86_maybe_switch_abi (void)
 
 /* Return 1 if pseudo register should be created and used to hold
    GOT address for PIC code.  */
-bool
+static bool
 ix86_use_pseudo_pic_reg (void)
 {
   if ((TARGET_64BIT
index f2b878817cf65d318f06e97d248ae405e09049da..0df66ea6c0ad7feaae9b966455dc290deb3ad3ce 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)
-   && (!ix86_use_pseudo_pic_reg ()
-       || !can_create_pseudo_p ()
-       || GET_CODE (operands[1]) != CONST_DOUBLE
-       || standard_sse_constant_p (operands[1]))"
+  "TARGET_64BIT || TARGET_SSE"
 {
   /* 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"))]
-  "!ix86_use_pseudo_pic_reg ()
-   || !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"))]
-  "!ix86_use_pseudo_pic_reg ()
-   || !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 ();
index d4054e7eb81018d59ee69b231e4622ffd5df5f28..5a9d4dedd75689fe2f78312f7b35f91064b69933 100644 (file)
@@ -1,3 +1,9 @@
+2014-11-11  Uros Bizjak  <ubizjak@gmail.com>
+           Ilya Enkovich  <ilya.enkovich@intel.com>
+
+       PR target/63620
+       * gcc.target/i386/pr63620.c: New test.
+
 2014-11-11  Jakub Jelinek  <jakub@redhat.com>
 
        * gcc.dg/tm/memopt-15.c: Add -msse2 to dg-options.
diff --git a/gcc/testsuite/gcc.target/i386/pr63620.c b/gcc/testsuite/gcc.target/i386/pr63620.c
new file mode 100644 (file)
index 0000000..bf38435
--- /dev/null
@@ -0,0 +1,20 @@
+/* PR target/63620 */
+/* { dg-do compile } */
+/* { dg-require-effective-target fpic } */
+/* { dg-require-effective-target ia32 } */
+/* { dg-options "-O2 -fpic -mfpmath=sse -msse" } */
+
+static const __float128 cf = 0.1E+30Q;
+
+typedef __float128 (*func)(__float128 x);
+
+__float128
+test (__float128 x, int p, func f)
+{
+  x = f (x);
+  if (p)
+    x = f (cf);
+  return x;
+}
+
+/* { dg-final { scan-assembler "get_pc_thunk" } } */