[PATCH] Add __m128bf16/__m256bf16/__m512bf16 type for bf16 abi test

Hongtao Liu crazylht@gmail.com
Tue Aug 23 03:01:21 GMT 2022


On Mon, Aug 22, 2022 at 10:16 AM Haochen Jiang via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> Hi all,
>
> This patch added __m128bf16/__m256bf16/__m512bf16 type in testcases.
Ok.
>
> BRs,
> Haochen
>
> gcc/testsuite/ChangeLog:
>
>         * gcc.target/x86_64/abi/bf16/bf16-helper.h:
>         Add _m128bf16/m256bf16/_m512bf16.
>         * gcc.target/x86_64/abi/bf16/m512bf16/bf16-zmm-check.h:
>         Include bf16-helper.h.
> ---
>  gcc/testsuite/gcc.target/x86_64/abi/bf16/bf16-helper.h        | 4 ++++
>  .../gcc.target/x86_64/abi/bf16/m512bf16/bf16-zmm-check.h      | 1 +
>  2 files changed, 5 insertions(+)
>
> diff --git a/gcc/testsuite/gcc.target/x86_64/abi/bf16/bf16-helper.h b/gcc/testsuite/gcc.target/x86_64/abi/bf16/bf16-helper.h
> index 83d89fcf62c..e090a7254f4 100644
> --- a/gcc/testsuite/gcc.target/x86_64/abi/bf16/bf16-helper.h
> +++ b/gcc/testsuite/gcc.target/x86_64/abi/bf16/bf16-helper.h
> @@ -1,3 +1,7 @@
> +typedef __bf16 __m128bf16 __attribute__((__vector_size__(16), __aligned__(16)));
> +typedef __bf16 __m256bf16 __attribute__((__vector_size__(32), __aligned__(32)));
> +typedef __bf16 __m512bf16 __attribute__((__vector_size__(64), __aligned__(64)));
> +
>  typedef union
>  {
>    float f;
> diff --git a/gcc/testsuite/gcc.target/x86_64/abi/bf16/m512bf16/bf16-zmm-check.h b/gcc/testsuite/gcc.target/x86_64/abi/bf16/m512bf16/bf16-zmm-check.h
> index 8379fcfaf8c..9cd39b878dd 100644
> --- a/gcc/testsuite/gcc.target/x86_64/abi/bf16/m512bf16/bf16-zmm-check.h
> +++ b/gcc/testsuite/gcc.target/x86_64/abi/bf16/m512bf16/bf16-zmm-check.h
> @@ -1,4 +1,5 @@
>  #include <stdlib.h>
> +#include "../bf16-helper.h"
>
>  static void do_test (void);
>
> --
> 2.18.1
>


-- 
BR,
Hongtao


More information about the Gcc-patches mailing list