aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2024-02-01 13:54:11 +0100
committerRichard Biener <rguenther@suse.de>2024-02-05 08:35:32 +0100
commit5b281946c4b51132caf5e5b64c730fef92dd6123 (patch)
tree92dee87e545e944eaf565a0aae625aead1bcfec3
parent91e09b3a7e9c86bb29fc138744fd2e087216733c (diff)
downloadgcc-5b281946c4b51132caf5e5b64c730fef92dd6123.zip
gcc-5b281946c4b51132caf5e5b64c730fef92dd6123.tar.gz
gcc-5b281946c4b51132caf5e5b64c730fef92dd6123.tar.bz2
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.
-rw-r--r--gcc/config/i386/i386-expand.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/config/i386/i386-expand.cc b/gcc/config/i386/i386-expand.cc
index 5706220..50f9fe2 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,