public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: H.J. Lu <hjl@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-2253] x86: Handle V16BF in ix86_avx256_split_vector_move_misalign Date: Mon, 29 Aug 2022 14:46:21 +0000 (GMT) [thread overview] Message-ID: <20220829144621.4F8743858D37@sourceware.org> (raw) https://gcc.gnu.org/g:60d1d296b42b22b08d4eaa38bea02100c07261ac commit r13-2253-g60d1d296b42b22b08d4eaa38bea02100c07261ac Author: H.J. Lu <hjl.tools@gmail.com> Date: Fri Aug 26 10:26:06 2022 -0700 x86: Handle V16BF in ix86_avx256_split_vector_move_misalign Handle E_V16BFmode in ix86_avx256_split_vector_move_misalign and add V16BF to V_256H iterator. gcc/ PR target/106748 * config/i386/i386-expand.cc (ix86_avx256_split_vector_move_misalign): Handle E_V16BFmode. * config/i386/sse.md (V_256H): Add V16BF. gcc/testsuite/ PR target/106748 * gcc.target/i386/pr106748.c: New test. Diff: --- gcc/config/i386/i386-expand.cc | 4 ++++ gcc/config/i386/sse.md | 4 ++-- gcc/testsuite/gcc.target/i386/pr106748.c | 20 ++++++++++++++++++++ 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/gcc/config/i386/i386-expand.cc b/gcc/config/i386/i386-expand.cc index 4b216308a18..836ebc82d67 100644 --- a/gcc/config/i386/i386-expand.cc +++ b/gcc/config/i386/i386-expand.cc @@ -745,6 +745,10 @@ ix86_avx256_split_vector_move_misalign (rtx op0, rtx op1) extract = gen_avx_vextractf128v32qi; mode = V16QImode; break; + case E_V16BFmode: + extract = gen_avx_vextractf128v16bf; + mode = V8BFmode; + break; case E_V16HFmode: extract = gen_avx_vextractf128v16hf; mode = V8HFmode; diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index e6ab3c92dcf..259048481b6 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -297,9 +297,9 @@ (define_mode_iterator V_256 [V32QI V16HI V8SI V4DI V8SF V4DF]) -;; All 256bit vector modes including HF vector mode +;; All 256bit vector modes including HF/BF vector modes (define_mode_iterator V_256H - [V32QI V16HI V8SI V4DI V8SF V4DF V16HF]) + [V32QI V16HI V8SI V4DI V8SF V4DF V16HF V16BF]) ;; All 128bit and 256bit vector modes (define_mode_iterator V_128_256 diff --git a/gcc/testsuite/gcc.target/i386/pr106748.c b/gcc/testsuite/gcc.target/i386/pr106748.c new file mode 100644 index 00000000000..6388b1deb23 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr106748.c @@ -0,0 +1,20 @@ +/* { dg-do compile } */ +/* { dg-options "-O0 -mavx256-split-unaligned-store -mavx -fpack-struct" } */ + +typedef __bf16 __m256bf16 __attribute__((__vector_size__(32))); +typedef struct { + __m256bf16 _m256bf16[1]; +} YMM_T; + +struct { + YMM_T ymm0; +} fregs; + +__m256bf16 do_test_u3b_0_0; +int do_test_i; + +void +do_test() +{ + (&fregs.ymm0)[do_test_i]._m256bf16[0] = do_test_u3b_0_0; +}
reply other threads:[~2022-08-29 14:46 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220829144621.4F8743858D37@sourceware.org \ --to=hjl@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).