public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-3277] tree-optimization/97095 - fix typo in vectorizable_live_operation
@ 2020-09-18 9:37 Richard Biener
0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2020-09-18 9:37 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:3ea069da14c5f6276ae26d2109e9ae0765c09199
commit r11-3277-g3ea069da14c5f6276ae26d2109e9ae0765c09199
Author: Richard Biener <rguenther@suse.de>
Date: Fri Sep 18 11:34:31 2020 +0200
tree-optimization/97095 - fix typo in vectorizable_live_operation
This fixes a typo introduced with the last change and not noticed
because those vectorizer access macros are not type safe ...
2020-09-18 Richard Biener <rguenther@suse.de>
PR tree-optimization/97095
* tree-vect-loop.c (vectorizable_live_operation): Get
the SLP vector type from the correct object.
* gfortran.dg/pr97095.f: New testcase.
Diff:
---
gcc/testsuite/gfortran.dg/pr97095.f | 27 +++++++++++++++++++++++++++
gcc/tree-vect-loop.c | 2 +-
2 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/gcc/testsuite/gfortran.dg/pr97095.f b/gcc/testsuite/gfortran.dg/pr97095.f
new file mode 100644
index 00000000000..0b86e8b12d1
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr97095.f
@@ -0,0 +1,27 @@
+! { dg-do compile }
+! { dg-options "-O2 -ftree-vectorize" }
+ subroutine gen3delem(nel,ial,ifix,xta,xnoref,dd,jact,nelshell)
+ real*8 xnoref(3),xta(3,100),xn1(3,100)
+ if(nel.gt.0) then
+ do j=1,nel
+ enddo
+ do
+ enddo
+ endif
+ do
+ if(ifix.eq.0) then
+ do j=nelshell,nel
+ if(ial(j).eq.0) then
+ endif
+ enddo
+ endif
+ do j=nelshell,nel
+ enddo
+ do j=1,3
+ xnoref(j)=xnoref(j)/dd
+ enddo
+ xn1(2,jact)=xnoref(3)*xta(1,jact)-xnoref(1)*xta(3,jact)
+ xn1(3,jact)=xnoref(1)*xta(2,jact)-xnoref(2)*xta(1,jact)
+ call foo(xn1)
+ enddo
+ end
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index 3021be3b241..b1a6e1508c7 100644
--- a/gcc/tree-vect-loop.c
+++ b/gcc/tree-vect-loop.c
@@ -8045,7 +8045,7 @@ vectorizable_live_operation (vec_info *vinfo,
imm_use_iterator imm_iter;
tree lhs, lhs_type, bitsize, vec_bitsize;
tree vectype = (slp_node
- ? SLP_TREE_VECTYPE (SLP_TREE_REPRESENTATIVE (slp_node))
+ ? SLP_TREE_VECTYPE (slp_node)
: STMT_VINFO_VECTYPE (stmt_info));
poly_uint64 nunits = TYPE_VECTOR_SUBPARTS (vectype);
int ncopies;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-09-18 9:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-18 9:37 [gcc r11-3277] tree-optimization/97095 - fix typo in vectorizable_live_operation Richard Biener
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).