Skip to content
Snippets Groups Projects
Commit 8486e9f2 authored by liuhongt's avatar liuhongt
Browse files

AVX512FP16: Add fpclass/getexp/getmant instructions.

Add vfpclassph/vfpclasssh/vgetexpph/vgetexpsh/vgetmantph/vgetmantsh.

gcc/ChangeLog:

	* config/i386/avx512fp16intrin.h (_mm_fpclass_sh_mask):
	New intrinsic.
	(_mm_mask_fpclass_sh_mask): Likewise.
	(_mm512_mask_fpclass_ph_mask): Likewise.
	(_mm512_fpclass_ph_mask): Likewise.
	(_mm_getexp_sh): Likewise.
	(_mm_mask_getexp_sh): Likewise.
	(_mm_maskz_getexp_sh): Likewise.
	(_mm512_getexp_ph): Likewise.
	(_mm512_mask_getexp_ph): Likewise.
	(_mm512_maskz_getexp_ph): Likewise.
	(_mm_getexp_round_sh): Likewise.
	(_mm_mask_getexp_round_sh): Likewise.
	(_mm_maskz_getexp_round_sh): Likewise.
	(_mm512_getexp_round_ph): Likewise.
	(_mm512_mask_getexp_round_ph): Likewise.
	(_mm512_maskz_getexp_round_ph): Likewise.
	(_mm_getmant_sh): Likewise.
	(_mm_mask_getmant_sh): Likewise.
	(_mm_maskz_getmant_sh): Likewise.
	(_mm512_getmant_ph): Likewise.
	(_mm512_mask_getmant_ph): Likewise.
	(_mm512_maskz_getmant_ph): Likewise.
	(_mm_getmant_round_sh): Likewise.
	(_mm_mask_getmant_round_sh): Likewise.
	(_mm_maskz_getmant_round_sh): Likewise.
	(_mm512_getmant_round_ph): Likewise.
	(_mm512_mask_getmant_round_ph): Likewise.
	(_mm512_maskz_getmant_round_ph): Likewise.
	* config/i386/avx512fp16vlintrin.h (_mm_mask_fpclass_ph_mask):
	New intrinsic.
	(_mm_fpclass_ph_mask): Likewise.
	(_mm256_mask_fpclass_ph_mask): Likewise.
	(_mm256_fpclass_ph_mask): Likewise.
	(_mm256_getexp_ph): Likewise.
	(_mm256_mask_getexp_ph): Likewise.
	(_mm256_maskz_getexp_ph): Likewise.
	(_mm_getexp_ph): Likewise.
	(_mm_mask_getexp_ph): Likewise.
	(_mm_maskz_getexp_ph): Likewise.
	(_mm256_getmant_ph): Likewise.
	(_mm256_mask_getmant_ph): Likewise.
	(_mm256_maskz_getmant_ph): Likewise.
	(_mm_getmant_ph): Likewise.
	(_mm_mask_getmant_ph): Likewise.
	(_mm_maskz_getmant_ph): Likewise.
	* config/i386/i386-builtin-types.def: Add corresponding builtin types.
	* config/i386/i386-builtin.def: Add corresponding new builtins.
	* config/i386/i386-expand.c
	(ix86_expand_args_builtin): Handle new builtin types.
	(ix86_expand_round_builtin): Ditto.
	* config/i386/sse.md (vecmemsuffix): Add HF vector modes.
	(<avx512>_getexp<mode><mask_name><round_saeonly_name>): Adjust
	to support HF vector modes.
	(avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name):
	Ditto.
	(avx512dq_fpclass<mode><mask_scalar_merge_name>): Ditto.
	(avx512dq_vmfpclass<mode><mask_scalar_merge_name>): Ditto.
	(<avx512>_getmant<mode><mask_name><round_saeonly_name>): Ditto.
	(avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
	Ditto.

gcc/testsuite/ChangeLog:

	* gcc.target/i386/avx-1.c: Add test for new builtins.
	* gcc.target/i386/sse-13.c: Ditto.
	* gcc.target/i386/sse-23.c: Ditto.
	* gcc.target/i386/sse-14.c: Add test for new intrinsics.
	* gcc.target/i386/sse-22.c: Ditto.
parent b6e944df
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment