From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by sourceware.org (Postfix) with ESMTPS id 726A13858C3A for ; Thu, 1 Feb 2024 14:57:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 726A13858C3A Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 726A13858C3A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::535 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706799437; cv=none; b=ZAudDTYhp5pPEKXsVab1PRGk/UHrPUR8Fha1PMciMKyLMIb3H/RriIfwKg/Uv+vncZovLV4n1uHMatxlGIAG9JKUJQDeTI1IWWuHXY5EDunyxHprst6AgP5GNNl8JBV62nQO19mHollQFs9cUyaAmZ6aaaoL2m8FACo4xlMYJ9g= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706799437; c=relaxed/simple; bh=q5Q1XoOgAuhXmDMd4JYtsVtQbR/yxSyo5YS3LPL3si8=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=Dj4n0OeYuII5tej3RsUztAuCKcSmOgI4A+fHyyzKD7VoBYy8ovGxo1j2GcdKIVjZcDiCZ5ArMduExR6KvEK5WagPe4px58t6UKq2yv73DIQ41zxoWnsPnxMbAfZ61GX0ptuHs2IqeTTIGTHBzTpzO4luL3tepVlm042LGsCujfE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-55f03ede12cso1327607a12.0 for ; Thu, 01 Feb 2024 06:57:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706799432; x=1707404232; darn=gcc.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Jb4s5+poKuBY6bOBmdQsdva+yBPSUcrOHqrJ4nXZrFg=; b=MSOBaytG0bYRbS/jRTyw4e9nI1TJ2+H21SxkQwjuKcrUlf0iAfLpPZUekaL3fAEj/h JU2HXOox8sy7XYOMykJ9YJ61fIkavQo5pRRBW0NxhszdlQEXF73OTuoGHKkX+fBla+bw +l3BFtouy6q81gP6cxIKU+GthDT3JeFPw8N7pfdtSgk+Peo1lcEoKNfTi9A2b3EKHR8v ogmp7Sqz/IteM1gXRDEdhAw4NK3m/Isso2Z26nkRWTEzvjvTr2LKtK8uyn4AoFrserCL fQuMZF+Qh+wGo/rPUPOuIw0+J08/hQXk0p3hLVCEP/BcpAoz3ye4nDX5bvP5rkNTxAY2 TClg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706799432; x=1707404232; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Jb4s5+poKuBY6bOBmdQsdva+yBPSUcrOHqrJ4nXZrFg=; b=kUg3Xz0bYZqAb8r8DGrxX4NlyDIINwQ5XdRY/cXQsQPoXynNh3rRZXhF+YIhX72Sja bGfDgk7iWtBZ4kMtQOJNx0iaaF2/OqIRhLRFg6aTrtQM8elsxx44QffDwf8XzNYrJBp3 ab3ecuyoMEnXZJgK8uZb1RuzH1ymUxCfSBdlZV/lGf99XnoiBwClmjLsErMLouqCdM9I nu1W+ZrKFtwLHJHPdufmga/XB2ptq6PatuT67vOOGqlUHdiqzp7rhxQ3SzI3pi4M7fAK jVJyWsrx0yuWu3debl2GYxQ5fYsRm4oMOzvcW0wG8KCQ1G4r31gyH69UU8p8/PvsZHyB a9fQ== X-Gm-Message-State: AOJu0YyETRJvDGufiWkTfxYJyL6Zb+7RVDqbXbWSEqq4gwt2CtYNlmsB aSGYlCas/krZfkLjBeoXQS2n2VQ4ICMaayQ8SHOkJwXzloUEIYW9O3I6ceCCRm/0qcYnxsB2lS4 B/Z9Ui/eeGUDaBBGcHS0PF3xPueU= X-Google-Smtp-Source: AGHT+IFgBqPrdUZ5IqE3iISfl5oUJdjla58CVCwBasmhAdGCZJ5a6jCg2XkH1TnMWnaoXsvhyugRIn57MTvyfmWuqjQ= X-Received: by 2002:aa7:cf18:0:b0:55f:3f35:32c0 with SMTP id a24-20020aa7cf18000000b0055f3f3532c0mr1786504edy.4.1706799431813; Thu, 01 Feb 2024 06:57:11 -0800 (PST) MIME-Version: 1.0 References: <65bba833.050a0220.c81b6.4347SMTPIN_ADDED_MISSING@mx.google.com> In-Reply-To: <65bba833.050a0220.c81b6.4347SMTPIN_ADDED_MISSING@mx.google.com> From: Uros Bizjak Date: Thu, 1 Feb 2024 15:57:00 +0100 Message-ID: Subject: Re: [PATCH 1/2] target/113255 - avoid REG_POINTER on a pointer difference To: Richard Biener Cc: gcc-patches@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-8.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Thu, Feb 1, 2024 at 3:18=E2=80=AFPM Richard Biener w= rote: > > 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_misaligne= d_moves (rtx destmem, rtx src > /* See how many bytes we skipped. */ > saveddest =3D expand_simple_binop (GET_MODE (*destptr), MINUS, sav= eddest, > *destptr, > - saveddest, 1, OPTAB_DIRECT); > + NULL_RTX, 1, OPTAB_DIRECT); > /* Adjust srcptr and count. */ > if (!issetmem) > *srcptr =3D expand_simple_binop (GET_MODE (*srcptr), MINUS, *srcp= tr, > -- > 2.35.3 >