From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oo1-xc36.google.com (mail-oo1-xc36.google.com [IPv6:2607:f8b0:4864:20::c36]) by sourceware.org (Postfix) with ESMTPS id D3C923858C42 for ; Thu, 18 Jan 2024 03:53:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D3C923858C42 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D3C923858C42 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::c36 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705550029; cv=none; b=jHyzEacbfEYMfr7wDoUxCl0wn2rpiP0vmUdtsMf4hesHVoihbLKf+WO6OIzHBdz3YhEzA1DVunhYanRSQn96hfqMhP+9yCJryOb/Dl0RDI1+lDcNAOT4fwG52+22GjoVIWgy0vI5fHPbme8/ccisuM1aJ467/8TI95puF3QTL1Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705550029; c=relaxed/simple; bh=DB2w5qoEGaTunVABKaea78ZXdtSICzCMN+9NnZtUgc8=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=cWYI/bXyTEnYlhSbYgtyOI+VovRdD1ZWJhB5UfVjME74FaaqvK1FJDSC6cdcpB+ZC+rmOsnxsq0d16Q+1OrGqw+VAzWkIlH9mQifYoFQizNyKaupPmx1GY79Fpr4wqmJllu05udlZ2f78nCN1ZN4pCvW6qQE+6ZK4szt4nEaEwQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oo1-xc36.google.com with SMTP id 006d021491bc7-5986d902ae6so4854742eaf.3 for ; Wed, 17 Jan 2024 19:53:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1705550027; x=1706154827; darn=gcc.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=DB2w5qoEGaTunVABKaea78ZXdtSICzCMN+9NnZtUgc8=; b=uf+1zxO04XMCcxhUUNVXNOt06fsjPm5MsjI7iUZmD7gepM94BDHm49ll/s9JOz84XO 2SW4p+hPaA4dKvu8tdzkLQ2ooCZ4bC4g+93DYg+3Jn5iRtRcee6bevXMVikNgq7q9iZI icBMeMH4axETwQa1Z2NGV2nccFXuTc7yDkh59LFe6iuxkGlmQowd4tNw5BWITm1iKE7B qXOd0CB6vEThq8cYV3WzflHJEqNwJMTQpVb/XMb8bO5/c1lqNBrq0LdqWu6TD207MCAs +Q0GrHx7oPDgtv5BerUyi5CPxwqoJqwRUXhwlVpkTBUUmHzKtTsLzypFEu3GcJ3NTQbK WMgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705550027; x=1706154827; h=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=DB2w5qoEGaTunVABKaea78ZXdtSICzCMN+9NnZtUgc8=; b=TPZGbmi/3qVbfYB6ImkiSR0dOvz7ikFJxt5qVk7sTsJkiZJPu1AgnbjqPbsKdieI5M sA9NPQxKG1Hwtjbu0BsMbuY+X2WH3PcW/3cI/PN7AwyYPWNPto4c3dhQrZya6s73ivi2 MO37/MUklG3SCsbuSKxjIZL0+bkVJp8IV3RFlDBWbtwxbaeu01NvWSK7Cgli5U0ApwRN xVPWE/OeOaDG1wQ7tZmlPdTyY0kVWG31PxJJe4YKZuGGiLSmuLKdZ6VxVB5vdR3Yk1kz uI+OehQY9xOffhxwUMorXqUwBBkK6eu2JKOUp7qOtDumW7y4VLMbpSfT2d4wGTd/Bv3r WR8w== X-Gm-Message-State: AOJu0YxaxJTkK5xX2guhblGvScnfkwEUgWbhvdBCC5a+3DWN4KIsoXCt xGj9KPD682hXM9qNtPrAK5udZQw/0Eg1QCdA/UgRUmpWg/cdrZFBoWNII3WKkKDOO0F44K+dSoR ll7vG2kpOZoJNUWz1bf71kbRUaiBfvyvKBFYoOQ== X-Google-Smtp-Source: AGHT+IHv6CQVfYeBPd11umgXUx8sAoW5lDQP2v2GMo/EGskZkbdrNnLdfXNrL7FZey4785xcn3bJE2sWZCCRvyqI7d8= X-Received: by 2002:a4a:e4c7:0:b0:599:261d:946e with SMTP id w7-20020a4ae4c7000000b00599261d946emr237279oov.19.1705550027184; Wed, 17 Jan 2024 19:53:47 -0800 (PST) MIME-Version: 1.0 References: <20240116221914.267015-1-gkm@rivosinc.com> In-Reply-To: From: Greg McGary Date: Wed, 17 Jan 2024 20:53:36 -0700 Message-ID: Subject: Re: [PATCH] combine: Don't optimize SIGN_EXTEND of MEM on WORD_REGISTER_OPERATIONS targets [PR113010] To: Richard Biener Cc: gcc-patches@gcc.gnu.org Content-Type: multipart/alternative; boundary="000000000000846eab060f304fb2" X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,HTML_MESSAGE,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: --000000000000846eab060f304fb2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Jan 16, 2024 at 11:44=E2=80=AFPM Richard Biener wrote: > > On Tue, Jan 16, 2024 at 11:20=E2=80=AFPM Greg McGary = wrote: > > > > > > The sign bit of a sign-extending load cannot be known until runtime, > > > so don't attempt to simplify it in the combiner. > > > It feels like this papers over an issue downstream? While the code comment is true, perhaps it obscures the primary intent, which is recognition that the pattern (SIGN_EXTEND (mem ...) ) is destined to expand into a single memory-load instruction and no simplification is possible, so why waste time with further analysis or transformation? There are plenty of other conditions that also short circuit to "do nothing" and this seems just as straightforward as those others. Efforts to catch this further downstream add gratuitous complexity. G --000000000000846eab060f304fb2--