* [PATCH] Fix PR85933
@ 2018-05-28 15:54 Richard Biener
0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2018-05-28 15:54 UTC (permalink / raw)
To: gcc-patches
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied.
Richard.
From f7b8dc6184448bc7fb7f8faa27281f2ac64b75a9 Mon Sep 17 00:00:00 2001
From: Richard Guenther <rguenther@suse.de>
Date: Mon, 28 May 2018 09:48:28 +0200
Subject: [PATCH] fix-pr85933
2018-05-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/85933
* tree-vect-data-refs.c (vect_record_base_alignments): Only
look at stmts marked as vectorizable.
diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c
index 331423af821..f46eb467da6 100644
--- a/gcc/tree-vect-data-refs.c
+++ b/gcc/tree-vect-data-refs.c
@@ -829,7 +829,10 @@ vect_record_base_alignments (vec_info *vinfo)
data_reference *dr;
unsigned int i;
FOR_EACH_VEC_ELT (vinfo->datarefs, i, dr)
- if (!DR_IS_CONDITIONAL_IN_STMT (dr))
+ {
+ gimple *stmt = DR_STMT (dr);
+ if (!DR_IS_CONDITIONAL_IN_STMT (dr)
+ && STMT_VINFO_VECTORIZABLE (vinfo_for_stmt (stmt)))
{
gimple *stmt = DR_STMT (dr);
vect_record_base_alignment (vinfo, stmt, &DR_INNERMOST (dr));
@@ -843,6 +846,7 @@ vect_record_base_alignments (vec_info *vinfo)
(vinfo, stmt, &STMT_VINFO_DR_WRT_VEC_LOOP (stmt_info));
}
}
+ }
}
/* Return the target alignment for the vectorized form of DR. */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-05-28 15:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-28 15:54 [PATCH] Fix PR85933 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).