re PR target/59874 (Missing builtin (__builtin_clzs) when compiling with g++)
authorUros Bizjak <ubizjak@gmail.com>
Wed, 14 Dec 2016 20:27:06 +0000 (21:27 +0100)
committerUros Bizjak <uros@gcc.gnu.org>
Wed, 14 Dec 2016 20:27:06 +0000 (21:27 +0100)
commitcc99421ec4b3b94aa328175635782f6f5c36f9e9
tree9040d890f5c23059afba6984baea15264e0c7ee0
parentd3cab14ab383a8b52fec55c8fd4621865205c693
re PR target/59874 (Missing builtin (__builtin_clzs) when compiling with g++)

PR target/59874
* config/i386/i386-builtin.def: Add __builtin_clzs and __builtin_ctzs.
(ix86_fold_builtin): Handle IX86_BUILTIN_CTZS and IX86_BUILTIN_CLZS.
* config/i386/i386.md (*ctzhi2): New insn_and_split pattern.
(*clzhi2): Ditto.

testsuite/ChangeLog

PR target/59874
* gcc.target/i386/pr59874-1.c: New test.
* gcc.target/i386/pr59874-2.c: Ditto.

From-SVN: r243668
gcc/ChangeLog
gcc/config/i386/i386-builtin.def
gcc/config/i386/i386.c
gcc/config/i386/i386.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr59874-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr59874-2.c [new file with mode: 0644]