public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Richard Biener <rguenth@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r14-8796] target/113255 - avoid REG_POINTER on a pointer difference
Date: Mon,  5 Feb 2024 07:35:53 +0000 (GMT)	[thread overview]
Message-ID: <20240205073554.073B53858CDB@sourceware.org> (raw)

https://gcc.gnu.org/g:5b281946c4b51132caf5e5b64c730fef92dd6123

commit r14-8796-g5b281946c4b51132caf5e5b64c730fef92dd6123
Author: Richard Biener <rguenther@suse.de>
Date:   Thu Feb 1 13:54:11 2024 +0100

    target/113255 - avoid REG_POINTER on a pointer difference
    
    The following avoids re-using a register holding a pointer (and
    thus might be REG_POINTER) for the result of a pointer difference
    computation.  That might confuse heuristics in (broken) RTL alias
    analysis which relies on REG_POINTER indicating that we're
    dealing with one.
    
    This alone doesn't fix anything.
    
            PR target/113255
            * config/i386/i386-expand.cc
            (expand_set_or_cpymem_prologue_epilogue_by_misaligned_moves):
            Use a new pseudo for the skipped number of bytes.

Diff:
---
 gcc/config/i386/i386-expand.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/config/i386/i386-expand.cc b/gcc/config/i386/i386-expand.cc
index 5706220823ab..50f9fe2c0d73 100644
--- a/gcc/config/i386/i386-expand.cc
+++ b/gcc/config/i386/i386-expand.cc
@@ -8429,7 +8429,7 @@ expand_set_or_cpymem_prologue_epilogue_by_misaligned_moves (rtx destmem, rtx src
       /* See how many bytes we skipped.  */
       saveddest = expand_simple_binop (GET_MODE (*destptr), MINUS, saveddest,
 				       *destptr,
-				       saveddest, 1, OPTAB_DIRECT);
+				       NULL_RTX, 1, OPTAB_DIRECT);
       /* Adjust srcptr and count.  */
       if (!issetmem)
 	*srcptr = expand_simple_binop (GET_MODE (*srcptr), MINUS, *srcptr,

                 reply	other threads:[~2024-02-05  7:35 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=20240205073554.073B53858CDB@sourceware.org \
    --to=rguenth@gcc.gnu.org \
    --cc=gcc-cvs@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).