From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) by sourceware.org (Postfix) with ESMTPS id B9FCC3858420 for ; Mon, 27 Nov 2023 16:14:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B9FCC3858420 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 B9FCC3858420 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::636 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701101700; cv=none; b=g3T6DMKT5sqSEzIJpvu//wmGQsBMA1PioAK0l16qR3QMzXJp1sM7KQ1rT2YPFGxirGgMDy+6VMKZnSmwdpz3rZ3rrud/kdiGhVBSG/uU5yxW2QyrNnG+0hhbiY3EhMVcyYbAoQDjnxEkyKb3LRMp/m7gyO07S6J7UII4MQBUXTk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701101700; c=relaxed/simple; bh=yYTBUitLLDXw8VjJdqAC7tPQ2zXbcUHGRLf/yLKUdCE=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=AzTg9mL2dZw4rtztTZMcQAoqoJtQscuYldEZf0jt3pfNAo1cG7oeVx6M3L8jcx11q4T2LRXUzoXmUffx0cJqN6NvRlPhwB2lSXTjJxDtob0WVWM3LF16y/j5bI1MPyxxiTeorrhO/eSVmcnEZJR1lpk2eCOky5YiXcj2/ZgOo7A= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-1cf8b35a6dbso31051265ad.0 for ; Mon, 27 Nov 2023 08:14:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701101696; x=1701706496; darn=gcc.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=g7PR+CXxKCus8De5EB0VceyZcoRUG16av/j7at5gNDc=; b=Zvk2c5NyJH6p1OSGMtDWkOpcLsqsf1FrNogC64i6A9kKeds2gE1JRME/M7lVyGPsa/ pCJq6T6G8KkAqLdA6qiriywS/qIjzvJ/COsZaDKp/PpP5UT8gKs0fpzIy15I0n9t/GSt YdEuMZl1cNyBlYJLH+NBUsX/FVx+fRNfvHs8LX8cbE23qm7rjWIkL6JpMrKfM8cNZ197 NwdGC9h9F8nB7K3IFSmVLnQKBGSGZ2AtimGIlyz9SQbe/beyFp3nEmoeREg/v8NX5Ys2 InfOGWZf6WnyeH3AFmQfgRqVMHr9dDqPP+VP74NzAginOUAzRxa9YlZlINKp7I+udwIE tQEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701101696; x=1701706496; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=g7PR+CXxKCus8De5EB0VceyZcoRUG16av/j7at5gNDc=; b=atMh834pimZxXwGMCSGselbDKXAK0ihOGNA2cdDiISgsA9oNmUtxoupqjOwSBBYn/7 GqbhRzNTUQez8y9L7FJYuY35MQEh+c8BQXDNLM7YahLsL3Ay81sK2IGMIR8ZrDbLRImZ sbe7mjTwdcw7dwqSRdhPP4pDwQn1WnbA/Fb0d7PqTzeSOA9L5wWBvLDVgqWZ/0m8JSPT PUGAwATzgT39B+UlFqJDobxR4HcC3qDFUtgncvCA2/L0vu/WvI4QBf1bSWr6d5N/FCA1 LaPe2wOlFWlK5SFwlNN4krzpWQxYzk2IYJ53rbvA6m/E7BSYQ9V30TYxFTpqtQyMr6iv dBew== X-Gm-Message-State: AOJu0YzNLS4JaTxvs2WftBK0lnS17n4RCOv9ww5/fTjWTRK1caBBQCie dvOlBCPWklPMnGuHThB0IgV1khHNts+hvg== X-Google-Smtp-Source: AGHT+IHCXK4FYC+93rymBy6DjzYRE4fhrCf+6wOLi9urJ4H+tE33Z+pXMwfoOskVmIolYbsvH472Ww== X-Received: by 2002:a17:902:7d86:b0:1cf:b4d4:1381 with SMTP id a6-20020a1709027d8600b001cfb4d41381mr5857919plm.2.1701101695952; Mon, 27 Nov 2023 08:14:55 -0800 (PST) Received: from [172.31.0.109] ([136.36.130.248]) by smtp.gmail.com with ESMTPSA id t15-20020a170902e84f00b001cfd2b088fasm1790319plg.134.2023.11.27.08.14.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 27 Nov 2023 08:14:54 -0800 (PST) Message-ID: Date: Mon, 27 Nov 2023 09:14:49 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFA] New pass for sign/zero extension elimination Content-Language: en-US To: rep.dot.nop@gmail.com, gcc-patches@gcc.gnu.org, Dimitar Dimitrov , Jeff Law Cc: Jivan Hakobyan References: <6d5f8ba7-0c60-4789-87ae-68617ce6ac2c@ventanamicro.com> From: Jeff Law In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GB_TO_NAME_FREEMAIL,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 11/26/23 09:42, rep.dot.nop@gmail.com wrote: > On 22 November 2023 23:23:41 CET, Jeff Law wrote: >> >> >> On 11/20/23 11:56, Dimitar Dimitrov wrote: >>> On Sun, Nov 19, 2023 at 05:47:56PM -0700, Jeff Law wrote: >>> ... > >>>> + enum rtx_code xcode = GET_CODE (x); >>>> + if (xcode == SET) >>>> + { >>>> + const_rtx dst = SET_DEST (x); >>>> + rtx src = SET_SRC (x); >>>> + const_rtx y; >>>> + unsigned HOST_WIDE_INT bit = 0; >>>> + >>>> + /* The code of the RHS of a SET. */ >>>> + enum rtx_code code = GET_CODE (src); >>>> + >>>> + /* ?!? How much of this should mirror SET handling, potentially >>>> + being shared? */ >>>> + if (SUBREG_BYTE (dst).is_constant () && SUBREG_P (dst)) >>> >>> Shouldn't SUBREG_P be checked first like: >>> if (SUBREG_P (dst) && SUBREG_BYTE (dst).is_constant ()) >> Yes, absolutely. It'll be fixed in the next update. >> >> This also highlighted that I never added pru-elf to the configurations in my tester. I remember thinking that it needed to be added, but obviously that mental TODO got lost. I've just fixed that. > > > And please drop the superfluous enum from rtx_code while at it? Sure. jeff