Viewing file: avx512fp16-trunchf.c (1.37 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
/* { dg-do compile } */ /* { dg-options "-O2 -mavx512fp16" } */ /* { dg-final { scan-assembler-times "vcvttsh2si\[ \\t\]+\[^\{\n\]*(?:%xmm\[0-9\]|\\(%e\[bs\]p\\))+, %eax(?:\n|\[ \\t\]+#)" 3 } } */ /* { dg-final { scan-assembler-times "vcvttsh2usi\[ \\t\]+\[^\{\n\]*(?:%xmm\[0-9\]|\\(%e\[bs\]p\\))+, %eax(?:\n|\[ \\t\]+#)" 2 } } */ /* { dg-final { scan-assembler-times "vcvttsh2si\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+, %rax(?:\n|\[ \\t\]+#)" 1 { target { ! ia32 } } } } */ /* { dg-final { scan-assembler-times "vcvttsh2usi\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+, %rax(?:\n|\[ \\t\]+#)" 1 { target { ! ia32 } } } } */ /* { dg-final { scan-assembler "xorl\[ \\t\]+%edx, %edx" { target ia32 } } } */
#include <immintrin.h>
short __attribute__ ((noinline, noclone)) trunc_f16_to_si16 (_Float16 f) { return f; }
unsigned short __attribute__ ((noinline, noclone)) trunc_f16_to_su16 (_Float16 f) { return f; }
int __attribute__ ((noinline, noclone)) trunc_f16_to_si32 (_Float16 f) { return f; }
unsigned int __attribute__ ((noinline, noclone)) trunc_f16_to_su32 (_Float16 f) { return f; }
long long __attribute__ ((noinline, noclone)) trunc_f16_to_si64 (_Float16 f) { return f; }
unsigned long long __attribute__ ((noinline, noclone)) trunc_f16_to_su64 (_Float16 f) { return f; }
unsigned long long __attribute__ ((noinline, noclone)) trunc_f16_to_su64_zext (_Float16 f) { return (unsigned int) f; }
|