diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2021-06-03 20:05:31 +0200 |
---|---|---|
committer | Uros Bizjak <ubizjak@gmail.com> | 2021-06-03 20:06:11 +0200 |
commit | 5883e567564c5b3caecba0c13e8a360a14cdc846 (patch) | |
tree | c2d7ab68442d5fbfd3fda078572071bc6f3b7653 /gcc/fortran/frontend-passes.c | |
parent | 52e130652a76ff3d14c0f572fcd79fa53637ce2c (diff) | |
download | gcc-5883e567564c5b3caecba0c13e8a360a14cdc846.zip gcc-5883e567564c5b3caecba0c13e8a360a14cdc846.tar.gz gcc-5883e567564c5b3caecba0c13e8a360a14cdc846.tar.bz2 |
i386: Add insert and extract patterns for 4-byte vectors [PR100637]
The patch introduces insert and extract patterns for 4-byte vectors.
It effectively only emits PINSR and PEXTR instructions when available,
otherwise falls back to generic code that emulates these instructions
via inserts, extracts, logic operations and shifts in integer registers.
Please note that generic fallback produces better code than the current
approach of constructing new vector in memory (due to store forwarding stall)
so also enable QImode 8-byte vector inserts only with TARGET_SSE4_1.
2021-06-03 Uroš Bizjak <ubizjak@gmail.com>
gcc/
PR target/100637
* config/i386/i386-expand.c (ix86_expand_vector_set):
Handle V2HI and V4QI modes.
(ix86_expand_vector_extract): Ditto.
* config/i386/mmx.md (*pinsrw): New insn pattern.
(*pinsrb): Ditto.
(*pextrw): Ditto.
(*pextrw_zext): Ditto.
(*pextrb): Ditto.
(*pextrb_zext): Ditto.
(vec_setv2hi): New expander.
(vec_extractv2hihi): Ditto.
(vec_setv4qi): Ditto.
(vec_extractv4qiqi): Ditto.
(vec_setv8qi): Enable only for TARGET_SSE4_1.
(vec_extractv8qiqi): Ditto.
gcc/testsuite/
PR target/100637
* gcc.target/i386/vperm-v2hi.c: New test.
* gcc.target/i386/vperm-v4qi.c: Ditto.
Diffstat (limited to 'gcc/fortran/frontend-passes.c')
0 files changed, 0 insertions, 0 deletions