vect: Fix an ICE in vectorizable_simd_clone_call
authory00520163 <yangyang305@huawei.com>
Mon, 20 Jul 2020 18:47:05 +0000 (19:47 +0100)
committerRichard Sandiford <richard.sandiford@arm.com>
Mon, 20 Jul 2020 18:47:05 +0000 (19:47 +0100)
commit138b1d4f58af17986e856e665ffbd561c2c8740e
tree0498640b64f28e685723a382d55b9c30ab573f3b
parent3c5e83d5b32c31b11cf1684bf5d1ab3e7174685c
vect: Fix an ICE in vectorizable_simd_clone_call

In vectorizable_simd_clone_call, type compatibility is handled based on
the number of elements and the type compatibility of elements, which is
not enough. This patch add VIEW_CONVERT_EXPRs if the arguments types
and return type of simd clone function are distinct with the vectype of
stmt.

2020-07-20  Yang Yang  <yangyang305@huawei.com>

gcc/ChangeLog:

* tree-vect-stmts.c (vectorizable_simd_clone_call): Add
VIEW_CONVERT_EXPRs if the arguments types and return type
of simd clone function are distinct with the vectype of stmt.

gcc/testsuite/ChangeLog:

* gcc.target/aarch64/sve/pr96195.c: New test.
gcc/testsuite/gcc.target/aarch64/sve/pr96195.c [new file with mode: 0644]
gcc/tree-vect-stmts.c