* Re: [PATCH 1/2] target/113255 - avoid REG_POINTER on a pointer difference
[not found] <65bba833.050a0220.c81b6.4347SMTPIN_ADDED_MISSING@mx.google.com>
@ 2024-02-01 14:57 ` Uros Bizjak
0 siblings, 0 replies; 2+ messages in thread
From: Uros Bizjak @ 2024-02-01 14:57 UTC (permalink / raw)
To: Richard Biener; +Cc: gcc-patches
On Thu, Feb 1, 2024 at 3:18 PM Richard Biener <rguenther@suse.de> wrote:
>
> 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.
>
> Bootstrapped and tested on x86_64-unknown-linux-gnu, OK for trunk
> and branches (as necessary)?
LGTM, also for branches.
Thanks,
Uros.
>
> Thanks,
> Richard.
>
> 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.
> ---
> 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 0d817fc3f3b..26c48e8b0c8 100644
> --- a/gcc/config/i386/i386-expand.cc
> +++ b/gcc/config/i386/i386-expand.cc
> @@ -8090,7 +8090,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,
> --
> 2.35.3
>
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 1/2] target/113255 - avoid REG_POINTER on a pointer difference
@ 2024-02-01 14:18 Richard Biener
0 siblings, 0 replies; 2+ messages in thread
From: Richard Biener @ 2024-02-01 14:18 UTC (permalink / raw)
To: gcc-patches; +Cc: ubizjak
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.
Bootstrapped and tested on x86_64-unknown-linux-gnu, OK for trunk
and branches (as necessary)?
Thanks,
Richard.
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.
---
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 0d817fc3f3b..26c48e8b0c8 100644
--- a/gcc/config/i386/i386-expand.cc
+++ b/gcc/config/i386/i386-expand.cc
@@ -8090,7 +8090,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,
--
2.35.3
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-02-01 14:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <65bba833.050a0220.c81b6.4347SMTPIN_ADDED_MISSING@mx.google.com>
2024-02-01 14:57 ` [PATCH 1/2] target/113255 - avoid REG_POINTER on a pointer difference Uros Bizjak
2024-02-01 14:18 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).