From: Bin Cheng Date: Thu, 17 May 2018 11:25:43 +0000 (+0000) Subject: re PR tree-optimization/85793 ([AARCH64] ICE in verify_gimple during GIMPLE pass... X-Git-Tag: upstream/12.2.0~31811 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bb4e47476537f6431fbbf29cc804252b1504bbc2;p=platform%2Fupstream%2Fgcc.git re PR tree-optimization/85793 ([AARCH64] ICE in verify_gimple during GIMPLE pass vect.) PR tree-optimization/85793 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load for VMAT_ELEMENTWISE. gcc/testsuite * gcc.dg/vect/pr85793.c: New test. Co-Authored-By: Richard Biener From-SVN: r260317 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9e22926..b80d6be 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2018-05-17 Bin Cheng + Richard Biener + + PR tree-optimization/85793 + * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load + for VMAT_ELEMENTWISE. + 2018-05-17 Richard Sandiford * internal-fn.h (lookup_internal_fn): Declare diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c20e717..69a8998 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2018-05-17 Bin Cheng + + PR tree-optimization/85793 + * gcc.dg/vect/pr85793.c: New test. + 2018-05-17 Richard Sandiford * gcc.dg/gimplefe-28.c: New test. diff --git a/gcc/testsuite/gcc.dg/vect/pr85793.c b/gcc/testsuite/gcc.dg/vect/pr85793.c new file mode 100644 index 0000000..9b5d518 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/pr85793.c @@ -0,0 +1,12 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target vect_perm } */ + +int a, c, d; +long b[6]; +void fn1() { + for (; a < 2; a++) { + c = 0; + for (; c <= 5; c++) + d &= b[a * 3]; + } +} diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index a90c934..4539f6a 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -7801,6 +7801,10 @@ vectorizable_load (gimple *stmt, gimple_stmt_iterator *gsi, gimple **vec_stmt, } ltype = build_aligned_type (ltype, TYPE_ALIGN (TREE_TYPE (vectype))); } + /* Load vector(1) scalar_type if it's 1 element-wise vectype. */ + else if (nloads == 1) + ltype = vectype; + if (slp) { /* For SLP permutation support we need to load the whole group,