]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/22585 (ICE with long doubles in expand_simple_unop)
authorUros Bizjak <uros@kss-loka.si>
Wed, 21 Sep 2005 18:39:07 +0000 (20:39 +0200)
committerIan Lance Taylor <ian@gcc.gnu.org>
Wed, 21 Sep 2005 18:39:07 +0000 (18:39 +0000)
PR target/22585
* config/i386/i386.c (ix86_prepare_fp_compare_args): Do not
force integer op1 into register for XFmode compares.

From-SVN: r104498

gcc/ChangeLog
gcc/config/i386/i386.c

index 415fd5c5d9b5e82f63797d5b00d1f1f0d370956e..58b8a36bb6e14d96233cb43194de463726f511fe 100644 (file)
@@ -1,3 +1,9 @@
+2005-09-21  Uros Bizjak  <uros@kss-loka.si>
+
+       PR target/22585
+       * config/i386/i386.c (ix86_prepare_fp_compare_args): Do not
+       force integer op1 into register for XFmode compares.
+
 2005-09-21  Kazu Hirata  <kazu@codesourcery.com>
 
        PR middle-end/23971
index a53df0be9c53e11d6596231f155ac343da167e84..914e66ea0e0629b18716dcdeae16b28983d3a764 100644 (file)
@@ -9065,15 +9065,17 @@ ix86_prepare_fp_compare_args (enum rtx_code code, rtx *pop0, rtx *pop1)
   int is_sse = TARGET_SSE_MATH && SSE_FLOAT_MODE_P (op_mode);
 
   /* All of the unordered compare instructions only work on registers.
-     The same is true of the fcomi compare instructions.  The same is
-     true of the XFmode compare instructions if not comparing with
-     zero (ftst insn is used in this case).  */
+     The same is true of the fcomi compare instructions.  The XFmode
+     compare instructions require registers except when comparing
+     against zero or when converting operand 1 from fixed point to
+     floating point.  */
 
   if (!is_sse
       && (fpcmp_mode == CCFPUmode
          || (op_mode == XFmode
              && ! (standard_80387_constant_p (op0) == 1
-                   || standard_80387_constant_p (op1) == 1))
+                   || standard_80387_constant_p (op1) == 1)
+             && GET_CODE (op1) != FLOAT)
          || ix86_use_fcomi_compare (code)))
     {
       op0 = force_reg (op_mode, op0);