mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-09 00:50:52 +08:00
tree-vect-stmts.c (vectorizable_comparison): Add NULL check for vectype.
gcc/ * tree-vect-stmts.c (vectorizable_comparison): Add NULL check for vectype. gcc/testsuite/ * gcc.dg/declare-simd.c: New test. From-SVN: r232917
This commit is contained in:
parent
14ba8d6d07
commit
30480bcd79
@ -1,3 +1,8 @@
|
||||
2016-01-28 Ilya Enkovich <enkovich.gnu@gmail.com>
|
||||
|
||||
* tree-vect-stmts.c (vectorizable_comparison): Add
|
||||
NULL check for vectype.
|
||||
|
||||
2016-01-28 Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/69466
|
||||
|
@ -1,3 +1,7 @@
|
||||
2016-01-28 Ilya Enkovich <enkovich.gnu@gmail.com>
|
||||
|
||||
* gcc.dg/declare-simd.c: New test.
|
||||
|
||||
2016-01-28 Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/69466
|
||||
|
14
gcc/testsuite/gcc.dg/declare-simd.c
Normal file
14
gcc/testsuite/gcc.dg/declare-simd.c
Normal file
@ -0,0 +1,14 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O3 -fopenmp-simd" } */
|
||||
|
||||
#pragma omp declare simd linear (p2, p3)
|
||||
extern void fn2 (float p1, float *p2, float *p3);
|
||||
|
||||
float *a, *b;
|
||||
void fn1 (float *p1)
|
||||
{
|
||||
int i;
|
||||
#pragma omp simd
|
||||
for (i = 0; i < 1000; i++)
|
||||
fn2 (p1[i], a + i, b + i);
|
||||
}
|
@ -7764,7 +7764,7 @@ vectorizable_comparison (gimple *stmt, gimple_stmt_iterator *gsi,
|
||||
if (!STMT_VINFO_RELEVANT_P (stmt_info) && !bb_vinfo)
|
||||
return false;
|
||||
|
||||
if (!VECTOR_BOOLEAN_TYPE_P (vectype))
|
||||
if (!vectype || !VECTOR_BOOLEAN_TYPE_P (vectype))
|
||||
return false;
|
||||
|
||||
mask_type = vectype;
|
||||
|
Loading…
x
Reference in New Issue
Block a user