This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/79487] Invalid _Decimal32 comparison on s390x
- From: "krebbel at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 14 Feb 2017 15:28:46 +0000
- Subject: [Bug target/79487] Invalid _Decimal32 comparison on s390x
- Auto-submitted: auto-generated
- References: <bug-79487-4@http.gcc.gnu.org/bugzilla/>
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.