]> gcc.gnu.org Git - gcc.git/commit
rs6000: Fix condition of define_expand vec_shr_<mode> [PR100645]
authorKewen Lin <linkw@linux.ibm.com>
Mon, 26 Sep 2022 03:01:50 +0000 (22:01 -0500)
committerKewen Lin <linkw@linux.ibm.com>
Mon, 26 Sep 2022 03:23:44 +0000 (22:23 -0500)
commitbfad7069b74c97000b698191c1945f07a6192db5
tree2e084e4b94b727b05798e0ccc5c698e48ed2eb14
parent3db8e9c2422d924a958336fd0871b24cce3e65d1
rs6000: Fix condition of define_expand vec_shr_<mode> [PR100645]

PR100645 exposes one latent bug in define_expand vec_shr_<mode>
that the current condition TARGET_ALTIVEC is too loose.  The
mode iterator VEC_L contains a few modes, they are not always
supported as vector mode, VECTOR_UNIT_ALTIVEC_OR_VSX_P should
be used like some other VEC_L usages.

PR target/100645

gcc/ChangeLog:

* config/rs6000/vector.md (vec_shr_<mode>): Replace condition
TARGET_ALTIVEC with VECTOR_UNIT_ALTIVEC_OR_VSX_P.

gcc/testsuite/ChangeLog:

* gcc.target/powerpc/pr100645.c: New test.
gcc/config/rs6000/vector.md
gcc/testsuite/gcc.target/powerpc/pr100645.c [new file with mode: 0644]
This page took 0.065936 seconds and 5 git commands to generate.