diff options
author | Bin Cheng <bin.cheng@arm.com> | 2018-05-17 11:25:43 +0000 |
---|---|---|
committer | Bin Cheng <amker@gcc.gnu.org> | 2018-05-17 11:25:43 +0000 |
commit | bb4e47476537f6431fbbf29cc804252b1504bbc2 (patch) | |
tree | 4d3f3944704c4e6faaabffcf76ffea567e406553 /gcc | |
parent | e4f81565ce768256ff3f7acc368c38fa450098cc (diff) | |
download | gcc-bb4e47476537f6431fbbf29cc804252b1504bbc2.zip gcc-bb4e47476537f6431fbbf29cc804252b1504bbc2.tar.gz gcc-bb4e47476537f6431fbbf29cc804252b1504bbc2.tar.bz2 |
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 <rguenther@suse.de>
From-SVN: r260317
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/vect/pr85793.c | 12 | ||||
-rw-r--r-- | gcc/tree-vect-stmts.c | 4 |
4 files changed, 28 insertions, 0 deletions
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 <bin.cheng@arm.com> + Richard Biener <rguenther@suse.de> + + PR tree-optimization/85793 + * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load + for VMAT_ELEMENTWISE. + 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org> * 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 <bin.cheng@arm.com> + + PR tree-optimization/85793 + * gcc.dg/vect/pr85793.c: New test. + 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org> * 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, |