forwprop: Fix ICE when building an identity constructor [PR94700]
authorRichard Sandiford <richard.sandiford@arm.com>
Wed, 22 Apr 2020 10:05:59 +0000 (11:05 +0100)
committerRichard Sandiford <richard.sandiford@arm.com>
Wed, 22 Apr 2020 10:05:59 +0000 (11:05 +0100)
commit413232a55b960c9b207abf14eea4a8dd247c3e90
treee1a363d936f81df4d2655ffc24f93287f3aa39c5
parent56b15072aa41633235be57851ab342114e0bacba
forwprop: Fix ICE when building an identity constructor [PR94700]

This is really PR94683 part 2, handling the case in which the vector is
an identity and so doesn't need a VEC_PERM_EXPR.  I should have realised
at the time that the other arm of the "if" would need the same fix.

2020-04-22  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
PR tree-optimization/94700
* tree-ssa-forwprop.c (simplify_vector_constructor): When processing
an identity constructor, use a VIEW_CONVERT_EXPR to handle mixtures
of similarly-structured but distinct vector types.

gcc/testsuite/
PR tree-optimization/94700
* gcc.target/aarch64/sve/acle/general/pr94700.c: New test.
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr94700.c [new file with mode: 0644]
gcc/tree-ssa-forwprop.c