blob: 762f2eded500dfab5b8a361a81ca47c0aae219f0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
/* PR target/98522 */
/* { dg-do run { target { ! ia32 } } } */
/* { dg-options "-O2" } */
/* { dg-require-effective-target fenv_exceptions } */
#include <emmintrin.h>
#include <fenv.h>
__m64
__attribute__((noinline))
test_cvt (__m128 a)
{
return _mm_cvt_ps2pi (a);
}
__m64
__attribute__((noinline))
test_cvtt (__m128 a)
{
return _mm_cvtt_ps2pi (a);
}
int
main ()
{
__m128 x = (__m128)(__m128i){0x0000000000000000LL, 0x7fffffffffffffffLL};
volatile __m64 y;
feclearexcept (FE_INVALID);
y = test_cvt(x);
y = test_cvtt (x);
if (fetestexcept (FE_INVALID))
__builtin_abort ();
return 0;
}
|