rs6000: Support [u]mod<mode>3 for vector modulo insns
authorKewen Lin <linkw@linux.ibm.com>
Fri, 9 Jul 2021 03:00:24 +0000 (22:00 -0500)
committerKewen Lin <linkw@linux.ibm.com>
Fri, 9 Jul 2021 03:00:24 +0000 (22:00 -0500)
commit062c762ef264dca89d01ebca2ef023ea91f31d50
tree3e67c808bd54aeba9a2b07ff711201982e979bd0
parentdf85baa5687170cbca8450a59cf17f3157b1d61d
rs6000: Support [u]mod<mode>3 for vector modulo insns

This patch is to make Power10 newly introduced vector
modulo instructions exploited in vectorized loops, it
just simply renames existing define_insns as standard
pattern names.

gcc/ChangeLog:

* config/rs6000/vsx.md (mods_<mode>): Rename to...
(mod<mode>3): ... this.
(modu_<mode>): Rename to...
(umod<mode>3): ... this.
* config/rs6000/rs6000-builtin.def (MODS_V2DI, MODS_V4SI, MODU_V2DI,
MODU_V4SI): Adjust.

gcc/testsuite/ChangeLog:

* gcc.target/powerpc/mod-vectorize.c: New test.
gcc/config/rs6000/rs6000-builtin.def
gcc/config/rs6000/vsx.md
gcc/testsuite/gcc.target/powerpc/mod-vectorize.c [new file with mode: 0644]