]> git.ipfire.org Git - thirdparty/gcc.git/commit
mips: add MSA vec_cmp and vec_cmpu expand pattern [PR101132]
authorXi Ruoyao <xry111@mengyan1223.wang>
Sun, 20 Jun 2021 07:21:39 +0000 (15:21 +0800)
committerXi Ruoyao <xry111@mengyan1223.wang>
Fri, 30 Jul 2021 16:55:22 +0000 (00:55 +0800)
commit45cb789e6adf5d571c574a94b77413c845fed106
treedbda3d3f9db46e7f032e53aec9f310f2e5983664
parent6cd005a255f15c1b4b3eaae71c844ea2592c9dce
mips: add MSA vec_cmp and vec_cmpu expand pattern [PR101132]

Middle-end started to emit vec_cmp and vec_cmpu since GCC 11, causing
ICE on MIPS with MSA enabled.  Add the pattern to prevent it.

gcc/

PR target/101132
* config/mips/mips-protos.h (mips_expand_vec_cmp_expr): Declare.
* config/mips/mips.c (mips_expand_vec_cmp_expr): New function.
* config/mips/mips-msa.md (vec_cmp<MSA:mode><mode_i>): New
  expander.
  (vec_cmpu<IMSA:mode><mode_i>): New expander.

gcc/testsuite/

PR target/101132
* gcc.target/mips/pr101132.c: New test.
gcc/config/mips/mips-msa.md
gcc/config/mips/mips-protos.h
gcc/config/mips/mips.c
gcc/testsuite/gcc.target/mips/pr101132.c [new file with mode: 0644]