Add option for whether ceil etc. can raise "inexact", adjust x86 conditions.
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / sse2-rint-inline-2.c
blob3ebf7a7af69cbf86b37e32a2b996a784f6a49c43
1 /* Test rint and related functions expanded inline for SSE2. rint
2 should be expanded even when spurious "inexact" not allowed. */
3 /* { dg-do compile } */
4 /* { dg-options "-O2 -msse2 -mfpmath=sse -fno-fp-int-builtin-inexact" } */
5 /* { dg-add-options c99_runtime } */
6 /* { dg-require-effective-target sse2 } */
8 #define TEST(FN, TYPE) \
9 do \
10 { \
11 volatile TYPE a = 1.5, b; \
12 b = FN (a); \
13 } \
14 while (0)
16 #define FN_TESTS(FN) \
17 do \
18 { \
19 TEST (__builtin_ ## FN, double); \
20 TEST (__builtin_ ## FN ## f, float); \
21 } \
22 while (0)
24 void
25 test (void)
27 FN_TESTS (rint);
30 /* { dg-final { scan-assembler-not "\[ \t\]rint" } } */