vect: Fix ICE in vectorizable_comparison PR93292
authorJakub Jelinek <jakub@redhat.com>
Fri, 17 Jan 2020 08:39:45 +0000 (09:39 +0100)
committerJakub Jelinek <jakub@redhat.com>
Fri, 17 Jan 2020 08:39:45 +0000 (09:39 +0100)
commitdc9ba9d045d0cfc06207806fd64b06ab3304b196
tree9ec208f5745572a28fd4923bca5e820abf50994d
parent40111910b0aa897b3e4c8d60c0c263e5c1a50446
vect: Fix ICE in vectorizable_comparison PR93292

The following testcase ICEs on powerpc64le-linux.  The problem is that
get_vectype_for_scalar_type returns NULL, and while most places in
tree-vect-stmts.c handle that case, this spot doesn't and punts only
if it is non-NULL, but with different number of elts than expected.

2020-01-17  Jakub Jelinek  <jakub@redhat.com>

PR tree-optimization/93292
* tree-vect-stmts.c (vectorizable_comparison): Punt also if
get_vectype_for_scalar_type returns NULL.

* g++.dg/opt/pr93292.C: New test.
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/opt/pr93292.C [new file with mode: 0644]
gcc/tree-vect-stmts.c