]> git.ipfire.org Git - thirdparty/gcc.git/commit
i386: Support vectorized BF16 add/sub/mul/div with AVX10.2 instructions
authorLevy Hsu <admin@levyhsu.com>
Mon, 2 Sep 2024 02:24:45 +0000 (10:24 +0800)
committerHaochen Jiang <haochen.jiang@intel.com>
Mon, 2 Sep 2024 02:24:45 +0000 (10:24 +0800)
commitf82fa0da4d9e1fdaf5e4edd70364d5781534ce11
tree41b7040f125db52c7b014bede5582019efa1e38b
parent3b1decef83003db9cf8667977c293435c0f3d024
i386: Support vectorized BF16 add/sub/mul/div with AVX10.2 instructions

AVX10.2 introduces several non-exception instructions for BF16 vector.
Enable vectorized BF add/sub/mul/div operation by supporting standard
optab for them.

gcc/ChangeLog:

* config/i386/sse.md (div<mode>3): New expander for BFmode div.
(VF_BHSD): New mode iterator with vector BFmodes.
(<insn><mode>3<mask_name><round_name>): Change mode to VF_BHSD.
(mul<mode>3<mask_name><round_name>): Likewise.

gcc/testsuite/ChangeLog:

* gcc.target/i386/avx10_2-512-bf-vector-operations-1.c: New test.
* gcc.target/i386/avx10_2-bf-vector-operations-1.c: Ditto.
gcc/config/i386/sse.md
gcc/testsuite/gcc.target/i386/avx10_2-512-bf-vector-operations-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx10_2-bf-vector-operations-1.c [new file with mode: 0644]