aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorLevy Hsu <admin@levyhsu.com>2024-09-03 15:44:06 +0930
committerLevy Hsu <admin@levyhsu.com>2024-09-05 01:34:05 +0000
commitb851bce473d8e573b1b586c71d47e71067b4fa66 (patch)
tree46e6f50f0a95f510a17ef226d71ebfc39ec1c49f /gcc
parent55024148694bc5ccf4f5c727e7ba645fd0cc7b38 (diff)
downloadgcc-b851bce473d8e573b1b586c71d47e71067b4fa66.zip
gcc-b851bce473d8e573b1b586c71d47e71067b4fa66.tar.gz
gcc-b851bce473d8e573b1b586c71d47e71067b4fa66.tar.bz2
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.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/i386/i386.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/config/i386/i386.cc b/gcc/config/i386/i386.cc
index e8744fa..c18a264 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;