Commit d6038777 by Uros Bizjak Committed by Uros Bizjak

re PR target/91323 (LTGT rtx produces UCOMISS instead of COMISS)

	PR target/91323
	* config/i386/i386-expand.c (ix86_unordered_fp_compare) <case LTGT>:
	Return false.

testsuite/ChangeLog:

	PR target/91323
	* gcc.dg/torture/pr91323.c: New test.

From-SVN: r274005
parent 8c228993
2019-08-02 Uroš Bizjak <ubizjak@gmail.com>
PR target/91323
* config/i386/i386-expand.c (ix86_unordered_fp_compare) <case LTGT>:
Return false.
2019-08-02 Richard Biener <rguenther@suse.de> 2019-08-02 Richard Biener <rguenther@suse.de>
* vec.h (vec::sort): Add gcc_qsort_r support. * vec.h (vec::sort): Add gcc_qsort_r support.
......
...@@ -2286,16 +2286,16 @@ ix86_unordered_fp_compare (enum rtx_code code) ...@@ -2286,16 +2286,16 @@ ix86_unordered_fp_compare (enum rtx_code code)
switch (code) switch (code)
{ {
case GT:
case GE:
case LT: case LT:
case LE: case LE:
case GT:
case GE:
case LTGT:
return false; return false;
case EQ: case EQ:
case NE: case NE:
case LTGT:
case UNORDERED: case UNORDERED:
case ORDERED: case ORDERED:
case UNLT: case UNLT:
......
2019-08-02 Uroš Bizjak <ubizjak@gmail.com>
PR target/91323
* gcc.dg/torture/pr91323.c: New test.
2019-08-02 Paolo Carlini <paolo.carlini@oracle.com> 2019-08-02 Paolo Carlini <paolo.carlini@oracle.com>
* g++.dg/cpp1z/nodiscard6.C: New. * g++.dg/cpp1z/nodiscard6.C: New.
......
/* { dg-do run } */
/* { dg-add-options ieee } */
/* { dg-require-effective-target fenv_exceptions } */
#include <fenv.h>
int
__attribute__ ((noinline, noclone))
f1 (float a, float b)
{
return __builtin_isless (a, b) || __builtin_isgreater (a, b);
}
int
__attribute__ ((noinline, noclone))
f2 (float a, float b)
{
return __builtin_islessgreater (a, b);
}
int
__attribute__ ((noinline, noclone))
f3 (float a, float b)
{
return a < b || a > b;
}
int
main (void)
{
volatile int r;
float nanf = __builtin_nanf ("");
float argf = 1.0f;
feclearexcept (FE_INVALID);
r = f1 (nanf, argf);
if (fetestexcept (FE_INVALID))
__builtin_abort ();
r = f2 (nanf, argf);
if (fetestexcept (FE_INVALID))
__builtin_abort ();
r = f3 (nanf, argf);
if (!fetestexcept (FE_INVALID))
__builtin_abort ();
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment