From: Levy Hsu Date: Tue, 3 Sep 2024 06:14:06 +0000 (+0930) Subject: i386: Integrate BFmode for Enhanced Vectorization in ix86_preferred_simd_mode X-Git-Tag: basepoints/gcc-16~6092 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b851bce473d8e573b1b586c71d47e71067b4fa66;p=thirdparty%2Fgcc.git i386: Integrate BFmode for Enhanced Vectorization in ix86_preferred_simd_mode This change adds BFmode support to the ix86_preferred_simd_mode function enhancing SIMD vectorization for BF16 operations. The update ensures optimized usage of SIMD capabilities improving performance and aligning vector sizes with processor capabilities. gcc/ChangeLog: * config/i386/i386.cc (ix86_preferred_simd_mode): Add BFmode Support. --- diff --git a/gcc/config/i386/i386.cc b/gcc/config/i386/i386.cc index e8744fa77ea..c18a2647c2a 100644 --- a/gcc/config/i386/i386.cc +++ b/gcc/config/i386/i386.cc @@ -24574,6 +24574,14 @@ ix86_preferred_simd_mode (scalar_mode mode) } return word_mode; + case E_BFmode: + if (TARGET_AVX512F && TARGET_EVEX512 && !TARGET_PREFER_AVX256) + return V32BFmode; + else if (TARGET_AVX && !TARGET_PREFER_AVX128) + return V16BFmode; + else + return V8BFmode; + case E_SFmode: if (TARGET_AVX512F && TARGET_EVEX512 && !TARGET_PREFER_AVX256) return V16SFmode;