rs6000.c (rs6000_gimple_fold_builtin): Add support for folding of vector compares.
authorWill Schmidt <will_schmidt@vnet.ibm.com>
Wed, 15 Nov 2017 19:26:21 +0000 (19:26 +0000)
committerWill Schmidt <willschm@gcc.gnu.org>
Wed, 15 Nov 2017 19:26:21 +0000 (19:26 +0000)
commit41e181973e27274f2d188b9eff0c5935b76d559c
tree4f4e564f0e1698d7b5af440260aef1da0aba83a0
parent4e6c42983787bcec345526ab04a4e541e0b0afb2
rs6000.c (rs6000_gimple_fold_builtin): Add support for folding of vector compares.

2017-11-15  Will Schmidt  <will_schmidt@vnet.ibm.com>

[gcc]

* config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
folding of vector compares.
(fold_build_vec_cmp): New helper function.
(fold_compare_helper): New helper function.
(builtin_function_type): Add compare builtins to the list of functions
having unsigned arguments.  Cosmetic updates to comment indentation.
* config/rs6000/vsx.md (vcmpneb, vcmpneh, vcmpnew): Update to specify
the not+eq combination.

[testsuite]

* gcc.target/powerpc/builtins-3-p9.c: Add -O1, update
expected codegen checks.
* gcc.target/powerpc/vec-cmp-sel.c: Mark vars as volatile.
* gcc.target/powerpc/vsu/vec-cmpne-0.c: Add -O1.
* gcc.target/powerpc/vsu/vec-cmpne-1.c: Add -O1.
* gcc.target/powerpc/vsu/vec-cmpne-2.c: Add -O1.
* gcc.target/powerpc/vsu/vec-cmpne-3.c: Add -O1.
* gcc.target/powerpc/vsu/vec-cmpne-4.c: Add -O1.
* gcc.target/powerpc/vsu/vec-cmpne-5.c: Add -O1.
* gcc.target/powerpc/vsu/vec-cmpne-6.c: Add -O1.

From-SVN: r254782
13 files changed:
gcc/ChangeLog
gcc/config/rs6000/rs6000.c
gcc/config/rs6000/vsx.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/powerpc/builtins-3-p9.c
gcc/testsuite/gcc.target/powerpc/vec-cmp-sel.c
gcc/testsuite/gcc.target/powerpc/vsu/vec-cmpne-0.c
gcc/testsuite/gcc.target/powerpc/vsu/vec-cmpne-1.c
gcc/testsuite/gcc.target/powerpc/vsu/vec-cmpne-2.c
gcc/testsuite/gcc.target/powerpc/vsu/vec-cmpne-3.c
gcc/testsuite/gcc.target/powerpc/vsu/vec-cmpne-4.c
gcc/testsuite/gcc.target/powerpc/vsu/vec-cmpne-5.c
gcc/testsuite/gcc.target/powerpc/vsu/vec-cmpne-6.c