[PR87563][AARCH64-SVE]: Don't keep ifcvt loop when COND_<OP> ifn could not be vectorized.
authorRenlin Li <renlin.li@arm.com>
Mon, 15 Oct 2018 16:49:05 +0000 (16:49 +0000)
committerRenlin Li <renlin@gcc.gnu.org>
Mon, 15 Oct 2018 16:49:05 +0000 (16:49 +0000)
commit4124119974fd87380de607a6bc9bfdcffe1702d8
tree47feff0e7142f9546cb0f5127556626781cb82d4
parente60f68ec460bc5b33a6f75caac9667bf978f37d8
[PR87563][AARCH64-SVE]: Don't keep ifcvt loop when COND_<OP> ifn could not be vectorized.

ifcvt will created versioned loop and it will permissively generate
scalar COND_<OP> ifn.

If in the loop vectorize pass, COND_<OP> could not get vectoized,
the if-converted loop should be abandoned when the target doesn't support
such ifn.

gcc/

2018-10-12  Renlin Li  <renlin.li@arm.com>

PR target/87563
* tree-vectorizer.c (try_vectorize_loop_1): Don't use
if-conversioned loop when it contains ifn with types not
supported by backend.
* internal-fn.c (expand_direct_optab_fn): Add an assert.
(direct_internal_fn_supported_p): New helper function.
* internal-fn.h (direct_internal_fn_supported_p): Declare.

gcc/testsuite/

2018-10-12  Renlin Li  <renlin.li@arm.com>

PR target/87563
* gcc.target/aarch64/sve/pr87563.c: New.

From-SVN: r265172
gcc/ChangeLog
gcc/internal-fn.c
gcc/internal-fn.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/aarch64/sve/pr87563.c [new file with mode: 0644]
gcc/tree-vectorizer.c