This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/79487] Invalid _Decimal32 comparison on s390x


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79487

Andreas Krebbel <krebbel at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2017-02-14
     Ever confirmed|0                           |1

--- Comment #3 from Andreas Krebbel <krebbel at gcc dot gnu.org> ---
(In reply to Dominik Vogt from comment #0)
> Note that this does not happen on Power which has similar DFP instructions. 
> Gcc does not store the constant with 64 bit precision in the literal pool
> there.

On Power the constant is forced into the literal pool right from the start.
This appears to hide it from CSE. We probably would get the same effect by
rejecting decimal floats in legitimate_constant_p:

@@ -3830,6 +3830,9 @@ s390_legitimate_constant_p (machine_mode mode, rtx op)
        return 0;
     }

+  if (DECIMAL_FLOAT_MODE_P (mode))
+    return 0;
+
   /* Accept all non-symbolic constants.  */
   if (!SYMBOLIC_CONST (op))
     return 1;

However, that's probably not a real fix.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]