public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <rguenther@suse.de>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH] tree-optimization/102905 - restore re-align load for alignment peeling
Date: Mon, 25 Oct 2021 12:49:16 +0200 (CEST)	[thread overview]
Message-ID: <sq32qos-2rs4-495r-75s6-35875718n2o@fhfr.qr> (raw)

Previous refactoring made the possibility of considering re-aligned
loads for unlimited cost model alignment peeling difficult so I
ditched that.  Later refactoring made it easily possible again so
the following patch re-instantiates this which should fix the
observed regression on powerpc with altivec.

Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed.

2021-10-25  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/102905
	* tree-vect-data-refs.c (vect_enhance_data_refs_alignment):
	Use vect_supportable_dr_alignment again to determine whether
	an access is supported when not aligned.
---
 gcc/tree-vect-data-refs.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c
index 556ae9725f1..cbcd4b80246 100644
--- a/gcc/tree-vect-data-refs.c
+++ b/gcc/tree-vect-data-refs.c
@@ -1994,9 +1994,8 @@ vect_enhance_data_refs_alignment (loop_vec_info loop_vinfo)
 		 prune all entries from the peeling hashtable which cause
 		 DRs to be not supported.  */
 	      bool supportable_if_not_aligned
-		= targetm.vectorize.support_vector_misalignment
-		    (TYPE_MODE (vectype), TREE_TYPE (DR_REF (dr_info->dr)),
-		     DR_MISALIGNMENT_UNKNOWN, false);
+		= vect_supportable_dr_alignment
+		    (loop_vinfo, dr_info, vectype, DR_MISALIGNMENT_UNKNOWN);
 	      while (known_le (npeel_tmp, nscalars))
                 {
                   vect_peeling_hash_insert (&peeling_htab, loop_vinfo,
-- 
2.31.1

                 reply	other threads:[~2021-10-25 10:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sq32qos-2rs4-495r-75s6-35875718n2o@fhfr.qr \
    --to=rguenther@suse.de \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).