diff options
author | Juzhe-Zhong <juzhe.zhong@rivai.ai> | 2023-11-24 16:34:28 +0800 |
---|---|---|
committer | Pan Li <pan2.li@intel.com> | 2023-11-24 21:28:02 +0800 |
commit | aea337cf740ec33022f3cabfa7dd4333d5ba78ee (patch) | |
tree | 75e9fb559093139364239e06ecde3d1f494608fb /gcc/dwarf2ctf.cc | |
parent | f9a10e91499ec9291fe28f20c34f1f1e65c521e8 (diff) | |
download | gcc-aea337cf740ec33022f3cabfa7dd4333d5ba78ee.zip gcc-aea337cf740ec33022f3cabfa7dd4333d5ba78ee.tar.gz gcc-aea337cf740ec33022f3cabfa7dd4333d5ba78ee.tar.bz2 |
RISC-V: Fix inconsistency among all vectorization hooks
This patches 200+ ICEs exposed by testing with rv64gc_zve64d.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112694
The rootcause is we disallow poly (1,1) size vectorization in preferred_simd_mode.
with this following code:
- if (TARGET_MIN_VLEN < 128 && TARGET_MAX_LMUL < RVV_M2)
- return word_mode;
However, we allow poly (1,1) size in hook:
TARGET_VECTORIZE_RELATED_MODE
TARGET_VECTORIZE_AUTOVECTORIZE_VECTOR_MODES
And also enables it in all vectorization patterns.
I was adding this into preferred_simd_mode because poly (1,1) size mode will cause
ICE in can_duplicate_and_interleave_p.
So, the alternative approach we need to block poly (1,1) size in both TARGET_VECTORIZE_RELATED_MODE
and TARGET_VECTORIZE_AUTOVECTORIZE_VECTOR_MODES hooks and all vectorization patterns.
which is ugly approach and too much codes change.
Now, after investivation, I find it's nice that loop vectorizer can automatically block poly (1,1)
size vector in interleave vectorization with this commit:
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=730909fa858bd691095bc23655077aa13b7941a9
So, we don't need to worry about ICE in interleave vectorization and allow poly (1,1) size vector
in vectorization which fixes 200+ ICEs in zve64d march.
PR target/112694
gcc/ChangeLog:
* config/riscv/riscv-v.cc (preferred_simd_mode): Allow poly_int (1,1) vectors.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/rvv/autovec/pr112694-1.c: New test.
Diffstat (limited to 'gcc/dwarf2ctf.cc')
0 files changed, 0 insertions, 0 deletions