re PR target/88152 (optimize SSE & AVX char compares with subsequent movmskb)
authorJakub Jelinek <jakub@redhat.com>
Thu, 29 Nov 2018 14:32:00 +0000 (15:32 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 29 Nov 2018 14:32:00 +0000 (15:32 +0100)
commitf06e47d7b644b4598a85f89eb76c13298e6e5d9f
tree154376b661fe1d100a310785cbfa7be99e6c267e
parentb076fecbc240380b25bb25c65aae85c4b5ea9ce5
re PR target/88152 (optimize SSE & AVX char compares with subsequent movmskb)

PR target/88152
* tree.h (build_uniform_cst, uniform_integer_cst_p): Declare.
* tree.c (build_uniform_cst, uniform_integer_cst_p): New functions.
* match.pd (define_predicates): Add uniform_integer_cst_p.
(cmp @0 INTEGER_CST@1, cmp (convert?@2 @0) INTEGER_CST@1): Adjust
so that it works also for vector comparisons with uniform constants
with INTEGER_CST element.

* g++.dg/tree-ssa/pr88152-1.C: New test.
* g++.dg/tree-ssa/pr88152-2.C: New test.

From-SVN: r266620
gcc/ChangeLog
gcc/match.pd
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/tree-ssa/pr88152-1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/tree-ssa/pr88152-2.C [new file with mode: 0644]
gcc/tree.c
gcc/tree.h