i386.c (ix86_fold_builtin): Handle IX86_BUILTIN_BEXTR{,I}{32,64}...
authorJakub Jelinek <jakub@redhat.com>
Mon, 24 Oct 2016 08:29:42 +0000 (10:29 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 24 Oct 2016 08:29:42 +0000 (10:29 +0200)
commitfb027a42357ad0a65b6d0fcc39d075e041ada8dd
treeaf2a2bddd7cbdf6b35123529fb27a889c23feb99
parent8e10302e3f67cad4f4dbf294d260fac49d97cf36
i386.c (ix86_fold_builtin): Handle IX86_BUILTIN_BEXTR{,I}{32,64}...

* config/i386/i386.c (ix86_fold_builtin): Handle
IX86_BUILTIN_BEXTR{,I}{32,64}, IX86_BUILTIN_BZHI{32,64},
IX86_BUILTIN_PDEP{32,64} and IX86_BUILTIN_PEXT{32,64}.
(ix86_gimple_fold_builtin): Handle IX86_BUILTIN_BZHI{32,64},
IX86_BUILTIN_PDEP{32,64} and IX86_BUILTIN_PEXT{32,64}.

* gcc.target/i386/bmi2-pext-1.c: New test.
* gcc.target/i386/bmi2-pdep-1.c: New test.
* gcc.target/i386/bmi2-bzhi-3.c: New test.
* gcc.target/i386/tbm-bextri-1.c: New test.
* gcc.target/i386/bmi-bextr-6.c: New test.

From-SVN: r241465
gcc/ChangeLog
gcc/config/i386/i386.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/bmi-bextr-6.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/bmi2-bzhi-3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/bmi2-pdep-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/bmi2-pext-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/tbm-bextri-1.c [new file with mode: 0644]