]> git.ipfire.org Git - thirdparty/gcc.git/commit
Introduce can_vcond_compare_p function
authoriii <iii@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 7 Oct 2019 15:01:15 +0000 (15:01 +0000)
committeriii <iii@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 7 Oct 2019 15:01:15 +0000 (15:01 +0000)
commit4fc22705675c5037014ca8f9247ca893215650d9
tree57e8c3ef3613a9b118825f76b0390c14d6429549
parentc8fdd6844e478fe18730d888efa9be8fafe9f28e
Introduce can_vcond_compare_p function

z13 supports only non-signaling vector comparisons.  This means we
cannot vectorize LT, LE, GT, GE and LTGT when compiling for z13.
However, we cannot express this restriction today: the code only checks
whether vcond$a$b optab exists, but this does not say anything about the
operation.

Introduce a function that checks whether back-end supports vector
comparisons with individual rtx codes by matching vcond expander's third
argument with a fake comparison with the corresponding rtx code.

gcc/ChangeLog:

2019-10-07  Ilya Leoshkevich  <iii@linux.ibm.com>

PR target/77918
* optabs-tree.c (vcond_icode_p): New function.
(vcond_eq_icode_p): Likewise.
(expand_vec_cond_expr_p): Use vcond_icode_p and
vcond_eq_icode_p.
* optabs.c (can_vcond_compare_p): New function.
* optabs.h (can_vcond_compare_p): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@276660 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/optabs-tree.c
gcc/optabs.c
gcc/optabs.h