Bug 58684 - powerpc uses only unordered floating-point compares
Summary: powerpc uses only unordered floating-point compares
Status: ASSIGNED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.9.0
: P3 normal
Target Milestone: ---
Assignee: Segher Boessenkool
URL:
Keywords:
: 83759 84366 91331 (view as bug list)
Depends on:
Blocks: 93393
  Show dependency treegraph
 
Reported: 2013-10-10 16:34 UTC by Joseph S. Myers
Modified: 2022-03-08 16:20 UTC (History)
3 users (show)

See Also:
Host:
Target: powerpc*-*
Build:
Known to work:
Known to fail:
Last reconfirmed: 2015-03-21 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph S. Myers 2013-10-10 16:34:32 UTC
When compiling for powerpc (classic hard-float), floating-point compares always use the fcmpu instructions that don't raise exceptions for unordered operands, never the exception-raising fcmpo variants.  The correct behavior is to raise exceptions for comparisons such as "x < y", but not for "x == y" or "__builtin_isless (x, y)".
Comment 1 David Edelsohn 2015-03-21 18:38:03 UTC
This is language-dependent.  And the comparison insn must know which condition codes will be tested.
Comment 2 Joseph S. Myers 2018-01-09 23:08:27 UTC
*** Bug 83759 has been marked as a duplicate of this bug. ***
Comment 3 seurer 2018-01-30 16:51:47 UTC
Author: seurer
Date: Tue Jan 30 16:51:14 2018
New Revision: 257190

URL: https://gcc.gnu.org/viewcvs?rev=257190&root=gcc&view=rev
Log:
[PATCH, rs6000] pr58684, pr83759 xfail test cases that fail on powerpc64.

This patch xfails a few test cases on powerpc64 that fail after r256380
due to a longstanding issue with floating-point compares.

See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58684 for more information.


2018-01-30  Bill Seurer  <seurer@linux.vnet.ibm.com>

	PR 58684
	* gcc/testsuite/gcc.dg/torture/inf-compare-1.c: Add xfail.
	* gcc/testsuite/gcc.dg/torture/inf-compare-2.c: Add xfail.
	* gcc/testsuite/gcc.dg/torture/inf-compare-3.c: Add xfail.
	* gcc/testsuite/gcc.dg/torture/inf-compare-4.c: Add xfail.


Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/torture/inf-compare-1.c
    trunk/gcc/testsuite/gcc.dg/torture/inf-compare-2.c
    trunk/gcc/testsuite/gcc.dg/torture/inf-compare-3.c
    trunk/gcc/testsuite/gcc.dg/torture/inf-compare-4.c
Comment 4 Segher Boessenkool 2018-03-23 23:42:00 UTC
I have a patch.
Comment 5 Segher Boessenkool 2018-03-27 01:55:15 UTC
*** Bug 84366 has been marked as a duplicate of this bug. ***
Comment 6 Segher Boessenkool 2018-03-27 01:56:33 UTC
Patch at https://gcc.gnu.org/ml/gcc-patches/2018-03/msg01405.html .
Comment 7 Martin Liška 2018-11-19 12:59:29 UTC
Can the bug be marked as resolved?
Comment 8 jsm-csl@polyomino.org.uk 2018-11-19 13:47:13 UTC
I see no sign of Segher's patch to fix the bug (as opposed to some XFAILs 
pending a fix) having been committed, and a trivial testcase still 
generates fcmpu instructions with a compiler from yesterday, so no.
Comment 9 Segher Boessenkool 2018-11-19 17:48:00 UTC
It is not resolved yet no.  That patch has some biggish issues still.
Comment 10 Segher Boessenkool 2019-08-05 17:28:44 UTC
*** Bug 91331 has been marked as a duplicate of this bug. ***