diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2024-11-24 20:23:34 +0100 |
---|---|---|
committer | Eric Botcazou <ebotcazou@adacore.com> | 2024-11-24 20:23:34 +0100 |
commit | ab952929f7741998e3f28959c85e7abbf88ea79f (patch) | |
tree | f63c51b8fa6ef04c2752a96ccc6475d43e665891 /gcc/function.cc | |
parent | adb4f2329a6da903fffe33b48a03510c52d1a0b8 (diff) | |
download | gcc-ab952929f7741998e3f28959c85e7abbf88ea79f.zip gcc-ab952929f7741998e3f28959c85e7abbf88ea79f.tar.gz gcc-ab952929f7741998e3f28959c85e7abbf88ea79f.tar.bz2 |
Fix vectorization regressions on the SPARC
This fixes the vectorization regressions present on the SPARC by switching
from vcond[u] patterns to vec_cmp[u] + vcond_mask_ patterns. While I was
at it, I merged the patterns for V4HI/V2SI and V8QI enabled with VIS 3/VIS 4
to follow the model of those enabled with VIS 4B, and standardized all the
mnemonics to the version documented in the Oracle SPARC architecture 2015.
gcc/
PR target/117715
* config/sparc/sparc-protos.h (sparc_expand_vcond): Rename to...
(sparc_expand_vcond_mask): ...this.
* config/sparc/sparc.cc (TARGET_VECTORIZE_GET_MASK_MODE): Define.
(sparc_vis_init_builtins): Adjust the CODE_FOR_* identifiers.
(sparc_get_mask_mode): New function.
(sparc_expand_vcond): Rename to...
(sparc_expand_vcond_mask): ...this and adjust.
* config/sparc/sparc.md (unspec): Remove UNSPEC_FCMP & UNSPEC_FUCMP
and rename UNSPEC_FPUCMPSHL into UNSPEC_FPCMPUSHL.
(fcmp<gcond:code><GCM:gcm_name><P:mode>_vis): Merge into...
(fpcmp<gcond:code>8<P:mode>_vis): Merge into...
(fpcmp<fpcmpcond:code><FPCMP:vbits><P:mode>_vis): ...this.
(fucmp<gcond:code>8<P:mode>_vis): Merge into...
(fpcmpu<gcond:code><GCM:gcm_name><P:mode>_vis): Merge into...
(fpcmpu<fpcmpucond:signed_code><FPCMP:vbits><P:mode>_vis): ...this.
(vec_cmp<FPCMP:mode><P:mode>): New expander.
(vec_cmpu<FPCMP:mode><P:mode>): Likewise.
(vcond<GCM:mode><GCM:mode>): Delete.
(vcondv8qiv8qi): Likewise.
(vcondu<GCM:mode><GCM:mode>): Likewise.
(vconduv8qiv8qi): Likewise.
(vcond_mask_<FPCMP:mode><P:mode>): New expander.
(fpcmp<fpcscond:code><FPCSMODE:vbits><P:mode>shl): Adjust.
(fpcmpu<fpcsucond:code><FPCSMODE:vbits><P:mode>shl): Likewise.
(fpcmpde<FPCSMODE:vbits><P:mode>shl): Likewise.
(fpcmpur<FPCSMODE:vbits><P:mode>shl): Likewise.
* doc/md.texi (vcond_mask_len_): Fix pasto.
gcc/testsuite/
* gcc.target/sparc/20230328-1.c: Adjust to new mnemonics.
* gcc.target/sparc/20230328-4.c: Likewise.
* gcc.target/sparc/fcmp.c: Likewise.
* gcc.target/sparc/fucmp.c: Likewise.
Diffstat (limited to 'gcc/function.cc')
0 files changed, 0 insertions, 0 deletions