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
This commit is contained in:
parent
8c22899311
commit
d603877768
4 changed files with 65 additions and 3 deletions
|
@ -1,3 +1,9 @@
|
|||
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>
|
||||
|
||||
* vec.h (vec::sort): Add gcc_qsort_r support.
|
||||
|
|
|
@ -2286,16 +2286,16 @@ ix86_unordered_fp_compare (enum rtx_code code)
|
|||
|
||||
switch (code)
|
||||
{
|
||||
case GT:
|
||||
case GE:
|
||||
case LT:
|
||||
case LE:
|
||||
case GT:
|
||||
case GE:
|
||||
case LTGT:
|
||||
return false;
|
||||
|
||||
case EQ:
|
||||
case NE:
|
||||
|
||||
case LTGT:
|
||||
case UNORDERED:
|
||||
case ORDERED:
|
||||
case UNLT:
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
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>
|
||||
|
||||
* g++.dg/cpp1z/nodiscard6.C: New.
|
||||
|
|
51
gcc/testsuite/gcc.dg/torture/pr91323.c
Normal file
51
gcc/testsuite/gcc.dg/torture/pr91323.c
Normal file
|
@ -0,0 +1,51 @@
|
|||
/* { 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;
|
||||
}
|
Loading…
Add table
Reference in a new issue