public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-2849] tree-optimization/101861 - fix gather use for non-gather refs
@ 2021-08-11 10:55 Richard Biener
  0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2021-08-11 10:55 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:f19c70afa4aa2416c581484a6eb51c0ac46acd08

commit r12-2849-gf19c70afa4aa2416c581484a6eb51c0ac46acd08
Author: Richard Biener <rguenther@suse.de>
Date:   Wed Aug 11 11:49:10 2021 +0200

    tree-optimization/101861 - fix gather use for non-gather refs
    
    My previous change broke the usage of gather for strided loads.
    The following fixes it.
    
    2021-08-11  Richard Biener  <rguenther@suse.de>
    
            PR tree-optimization/101861
            * tree-vect-stmts.c (vectorizable_load): Fix error in
            previous change with regard to gather vectorization.

Diff:
---
 gcc/tree-vect-stmts.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index ab402b57fb4..cc6c091e41e 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -9492,7 +9492,8 @@ vectorizable_load (vec_info *vinfo,
 		    if (memory_access_type == VMAT_GATHER_SCATTER
 			&& gs_info.ifn != IFN_LAST)
 		      {
-			vec_offset = vec_offsets[j];
+			if (STMT_VINFO_GATHER_SCATTER_P (stmt_info))
+			  vec_offset = vec_offsets[j];
 			tree zero = build_zero_cst (vectype);
 			tree scale = size_int (gs_info.scale);
 			gcall *call;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-11 10:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-11 10:55 [gcc r12-2849] tree-optimization/101861 - fix gather use for non-gather refs 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).