From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by sourceware.org (Postfix) with ESMTPS id C5C41385770D for ; Thu, 25 May 2023 14:13:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C5C41385770D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-64f47448aeaso1693097b3a.0 for ; Thu, 25 May 2023 07:13:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685023985; x=1687615985; 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=+d9rZGAef2Wgx95hCwiL2zxhQw2lBOB57MQ9Vb+2Deg=; b=kmldj9hthDQdEaWZkXwm2CKdgFzAMXqon6DSfFCUqJx3MEzI5WuViszlfHZhJvnf+V CSYUipYM2B+jJmNtkplDVmoZZAtPN+EYNY7WejOPFPJwfUTEFFJqH6GcI8h5H88OAvR6 coQuPRYAOsVZs/ZXxgqKdcbLIXNZ4sMY1T/wVn9sQhe9hNgcS4i8saR0jb+9GKk7WWw1 sVRDda33d4otiJ/oU4zXx422GN8pUVUPht9YNMAuQx+14foKVkxfDIu4NQ47zCosOaCN hfftYYyvrzr6nKxdgZezUVH3DBju29RKNFGhpfPLBqdY2NsTPw8oyErmL0iUyMIHDtLR UWZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685023985; x=1687615985; 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=+d9rZGAef2Wgx95hCwiL2zxhQw2lBOB57MQ9Vb+2Deg=; b=EeKpH0eXx1EUm3ARcjNliDJt3bZGpDRpPRKMLOb8YUx26WTjG5tbNIz+7+t4WwaOnj hiCVjI/dicpi3DcVmW5vhuBIKio7FffqxtPeklTZF6CCh3GGKdFC81EBkVhL8tG6Rh5F BYWMjPA7Mtgf13qFV9eMnSzS6xHdiAxbo/As/ZuCI6IiyiIdDjSeRgZRnDdxOvbDbhOV /Ik6m8Y0qJwaGVvR7AKLN+4Pkqc+C5VMk/Dlc6Eoz3BR9nWlI/nNa1yMNjD+lYGhH5I/ 51Njk+r5qO+fM4JR4pkZESjdYwL1rZRq7rrguObUGyPpUVf4ORWwo8jjrhHKBRXHLRY+ k5Ww== X-Gm-Message-State: AC+VfDy/qjyuPVeqjAA/tYKkGEx54OsnlyHYJE/Of4z8BJAz12dtXXaT OxlGFJD/eGr6jH4HH0uQM0FmUzLEFuo= X-Google-Smtp-Source: ACHHUZ6Z0fX2e2O2PO+gB/evroCwYjb87JZeoQ+L0AJkJxlZvz1iqL+2Cv94Fmggflg6Ao5mMnD0kg== X-Received: by 2002:a05:6a20:7352:b0:104:f9d4:141c with SMTP id v18-20020a056a20735200b00104f9d4141cmr20677412pzc.19.1685023985458; Thu, 25 May 2023 07:13:05 -0700 (PDT) Received: from ?IPV6:2601:681:8d00:265::f0a? ([2601:681:8d00:265::f0a]) by smtp.gmail.com with ESMTPSA id l64-20020a633e43000000b0053ef188c90bsm1222603pga.89.2023.05.25.07.13.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 May 2023 07:13:04 -0700 (PDT) Message-ID: Date: Thu, 25 May 2023 08:13:03 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH 1/2] Implementation of new RISCV optimizations pass: fold-mem-offsets. Content-Language: en-US To: Richard Biener Cc: gcc-patches@gcc.gnu.org References: <20230525123550.1072506-1-manolis.tsamis@vrull.eu> <20230525123550.1072506-2-manolis.tsamis@vrull.eu> From: Jeff Law In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A,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 5/25/23 07:50, Richard Biener wrote: > On Thu, May 25, 2023 at 3:32 PM Jeff Law via Gcc-patches > wrote: >> >> >> >> On 5/25/23 07:01, Richard Biener via Gcc-patches wrote: >>> On Thu, May 25, 2023 at 2:36 PM Manolis Tsamis wrote: >>>> >>>> Implementation of the new RISC-V optimization pass for memory offset >>>> calculations, documentation and testcases. >>> >>> Why do fwprop or combine not what you want to do? >> I think a lot of them end up coming from register elimination. > > Why isn't this a problem for other targets then? Or maybe it is and this > shouldn't be a machine specific pass? Maybe postreload-gcse should > perform strength reduction (I can't think of any other post reload pass > that would do something even remotely related). It is to some degree. I ran into similar problems at my prior employer. We ended up working around it in the target files in a different way -- which didn't work when I quickly tried it on RISC-V. Seems like it would be worth another investigative step as part of the evaluation of this patch. I wasn't at 100% when I did that poking around many months ago. Jeff