Mercurial > hg > CbC > CbC_llvm
comparison clang/test/CodeGen/target-builtin-error-3.c @ 207:2e18cbf3894f
LLVM12
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 08 Jun 2021 06:07:14 +0900 |
parents | 1d019706d866 |
children |
comparison
equal
deleted
inserted
replaced
173:0572611fdcc8 | 207:2e18cbf3894f |
---|---|
16 typedef __attribute__ ((ext_vector_type(16),__aligned__( 64))) float float16; | 16 typedef __attribute__ ((ext_vector_type(16),__aligned__( 64))) float float16; |
17 static inline half8 __attribute__((__overloadable__)) convert_half( float8 a ) { | 17 static inline half8 __attribute__((__overloadable__)) convert_half( float8 a ) { |
18 return __extension__ ({ __m256 __a = (a); (__m128i)__builtin_ia32_vcvtps2ph256((__v8sf)__a, (0x00)); }); // expected-error {{'__builtin_ia32_vcvtps2ph256' needs target feature f16c}} | 18 return __extension__ ({ __m256 __a = (a); (__m128i)__builtin_ia32_vcvtps2ph256((__v8sf)__a, (0x00)); }); // expected-error {{'__builtin_ia32_vcvtps2ph256' needs target feature f16c}} |
19 } | 19 } |
20 static inline half16 __attribute__((__overloadable__)) convert_half( float16 a ) { | 20 static inline half16 __attribute__((__overloadable__)) convert_half( float16 a ) { |
21 half16 r; | 21 half16 r; |
22 r.lo = convert_half( a.lo); | 22 r.lo = convert_half(a.lo); |
23 return r; | 23 return r; |
24 } | 24 } |
25 void avx_test( uint16_t *destData, float16 argbF) | 25 void avx_test( uint16_t *destData, float16 argbF) |
26 { | 26 { |
27 ((half16U*)destData)[0] = convert_half(argbF); | 27 // expected-warning@+1{{AVX vector argument of type 'float16' (vector of 16 'float' values) without 'avx512f' enabled changes the ABI}} |
28 ((half16U *)destData)[0] = convert_half(argbF); | |
28 } | 29 } |