tree-optimization/93094 pass down VECTORIZED_CALL to versioning
authorRichard Biener <rguenther@suse.de>
Wed, 15 Jan 2020 13:25:38 +0000 (14:25 +0100)
committerRichard Biener <rguenther@suse.de>
Mon, 20 Jan 2020 08:48:42 +0000 (09:48 +0100)
commit9c4f0d311810eba3f4faab1295c47eb57e695fcc
treee3106f187f8e8c8c359cf9ae58aa14038749a0be
parentf4d83eba60b5b1292a7cae660f03a2377e92a845
tree-optimization/93094 pass down VECTORIZED_CALL to versioning

When versioning is run the IL is already mangled and finding
a VECTORIZED_CALL IFN can fail.

2020-01-20  Richard Biener  <rguenther@suse.de>

PR tree-optimization/93094
* tree-vectorizer.h (vect_loop_versioning): Adjust.
(vect_transform_loop): Likewise.
* tree-vectorizer.c (try_vectorize_loop_1): Pass down
loop_vectorized_call to vect_transform_loop.
* tree-vect-loop.c (vect_transform_loop): Pass down
loop_vectorized_call to vect_loop_versioning.
* tree-vect-loop-manip.c (vect_loop_versioning): Use
the earlier discovered loop_vectorized_call.

* gcc.dg/vect/pr93094.c: New testcase.
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vect/pr93094.c [new file with mode: 0644]
gcc/tree-vect-loop-manip.c
gcc/tree-vect-loop.c
gcc/tree-vectorizer.c
gcc/tree-vectorizer.h