From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1666) id 073B53858CDB; Mon, 5 Feb 2024 07:35:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 073B53858CDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1707118554; bh=hScgKVZQo3lEPPnLau6blNjzH9A87tIPaEP0mXmAJHg=; h=From:To:Subject:Date:From; b=q76tajyZecx0eGoKW7eVaANdjDgNz4FPloDL+tzgKpzdxSwEj3LBmNYfwlnKFWR3t GHxWRNuZYHKsu+hduaDwpRyYN8kbbD2740Vx8SQMSn6arDZHLJMoz1CIJtF7XO8gIL TuPTEtGq5Ws2Iltza5T5E0kzKMuETbNxwJIqCoa0= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Richard Biener To: gcc-cvs@gcc.gnu.org Subject: [gcc r14-8796] target/113255 - avoid REG_POINTER on a pointer difference X-Act-Checkin: gcc X-Git-Author: Richard Biener X-Git-Refname: refs/heads/master X-Git-Oldrev: 91e09b3a7e9c86bb29fc138744fd2e087216733c X-Git-Newrev: 5b281946c4b51132caf5e5b64c730fef92dd6123 Message-Id: <20240205073554.073B53858CDB@sourceware.org> Date: Mon, 5 Feb 2024 07:35:53 +0000 (GMT) List-Id: https://gcc.gnu.org/g:5b281946c4b51132caf5e5b64c730fef92dd6123 commit r14-8796-g5b281946c4b51132caf5e5b64c730fef92dd6123 Author: Richard Biener 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,