Hello!

2014-07-21  Uros Bizjak  <ubiz...@gmail.com>

    PR target/61855
    * config/i386/avx512fintrin.h: Move constants for mantissa extraction
    out of #ifdef __OPTIMIZE__.

testsuite/ChangeLog:

2014-07-21  Uros Bizjak  <ubiz...@gmail.com>

    PR target/61855
    * gcc.target/i386/pr61855.c: New test.

Tested on x86_64-linux-gnu and committed to mainline SVN and 4.9 branch.

Uros.
Index: config/i386/avx512fintrin.h
===================================================================
--- config/i386/avx512fintrin.h (revision 212882)
+++ config/i386/avx512fintrin.h (working copy)
@@ -8103,6 +8103,22 @@
   return __builtin_ia32_movntdqa512 ((__v8di *)__P);
 }
 
+/* Constants for mantissa extraction */
+typedef enum
+{
+  _MM_MANT_NORM_1_2,           /* interval [1, 2)      */
+  _MM_MANT_NORM_p5_2,          /* interval [0.5, 2)    */
+  _MM_MANT_NORM_p5_1,          /* interval [0.5, 1)    */
+  _MM_MANT_NORM_p75_1p5                /* interval [0.75, 1.5) */
+} _MM_MANTISSA_NORM_ENUM;
+
+typedef enum
+{
+  _MM_MANT_SIGN_src,           /* sign = sign(SRC)     */
+  _MM_MANT_SIGN_zero,          /* sign = 0             */
+  _MM_MANT_SIGN_nan            /* DEST = NaN if sign(SRC) = 1 */
+} _MM_MANTISSA_SIGN_ENUM;
+
 #ifdef __OPTIMIZE__
 extern __inline __m128
 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
@@ -8182,22 +8198,6 @@
                                                    (__mmask8) __U, __R);
 }
 
-/* Constants for mantissa extraction */
-typedef enum
-{
-  _MM_MANT_NORM_1_2,           /* interval [1, 2)      */
-  _MM_MANT_NORM_p5_2,          /* interval [0.5, 2)    */
-  _MM_MANT_NORM_p5_1,          /* interval [0.5, 1)    */
-  _MM_MANT_NORM_p75_1p5                /* interval [0.75, 1.5) */
-} _MM_MANTISSA_NORM_ENUM;
-
-typedef enum
-{
-  _MM_MANT_SIGN_src,           /* sign = sign(SRC)     */
-  _MM_MANT_SIGN_zero,          /* sign = 0             */
-  _MM_MANT_SIGN_nan            /* DEST = NaN if sign(SRC) = 1 */
-} _MM_MANTISSA_SIGN_ENUM;
-
 extern __inline __m512d
 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
 _mm512_getmant_round_pd (__m512d __A, _MM_MANTISSA_NORM_ENUM __B,
Index: testsuite/gcc.target/i386/pr61855.c
===================================================================
--- testsuite/gcc.target/i386/pr61855.c (revision 0)
+++ testsuite/gcc.target/i386/pr61855.c (working copy)
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f" } */
+
+#include <x86intrin.h>
+
+__m512 test (__m512 x)
+{
+  return _mm512_getmant_ps(x, _MM_MANT_NORM_1_2, _MM_MANT_SIGN_zero);
+}
+

Reply via email to