From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) by sourceware.org (Postfix) with ESMTPS id A150138582B4 for ; Tue, 27 Sep 2022 15:13:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A150138582B4 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-x42e.google.com with SMTP id w2so10005993pfb.0 for ; Tue, 27 Sep 2022 08:13:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date; bh=HmZ1NZQ0u5QUU1hjiiSgQ6hDaOfpZ6qpuOyMFG6uF68=; b=i4ptOuL+a7alcNrbBIDAt6IvoYR6x7KEI5Qo5HgyuCvXoBCLHIBRmuGR76V0KqXq6+ AFXMAyARBXZ9kMaoIoSxx2rqDO72gNUq0KZHkx2OQpMr9GTO9PbXzGskbJyFnXiSK9n+ AhCb9+pk3zLlc6FHGewiUeoGFMaNdPEe/4j1eL/5yYzBG+g6kpAComMWUG4jfUioAlMa 9FjL7Llq3yQRWLls4SO1qsa2gHHsRgrjSR4MEUqN3m/RvnL7hJ731V4ooT3/++8moWhr korscxUcB8wbwuqrYAnZ8YQiwg4maq3nQeMstui2b+n46lwt58q/mojyZNDOF1J04LeT mOeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date; bh=HmZ1NZQ0u5QUU1hjiiSgQ6hDaOfpZ6qpuOyMFG6uF68=; b=mK61vxYSoTpOdygsSzG9FS5EOwxQv3WnRcM0Vk9xgLUizfL2HH6iCfI00ScoPRy/T2 ZZJon52aWzjhJNW7638J7HTxzD2FoXHLTjapJj4vt5fY7bfUnPIRnIR+3SMnMa3Z1+Ad JG92VWC+/kKj7th5LomUSsNxpVU6nS+P1m16Z+HOMO/xdSBp2YfT4rb9IjItimEnAIn8 E4PtNjxxgcysBcULXTGBgqaQuJoXb8URLAYLhlff3glcYg/r/sYNT7gOg3hQzGz90R1B 4ofG33yAqOy2BK8EIAs+KE5UKMxPy+ndX1HE1zF0DG14bO8lsWaldOO0OT4HZ/2XV6K6 7IxA== X-Gm-Message-State: ACrzQf2COqPgYK7zUYL8K51k/DqiEIKDGoEKxFSl0TFBefEotm+1gYh4 9EEkRsra5po51+BNOgetCzguAaUcgp3IQw== X-Google-Smtp-Source: AMsMyM5b2YXNLUlcVJNqLUguG2Qzh55nvXZN96zfGzxIRHlnGHG+nvSK/CNdWK/hVs1AIkJWFDSIXQ== X-Received: by 2002:a63:1b21:0:b0:434:7610:11ba with SMTP id b33-20020a631b21000000b00434761011bamr25326128pgb.396.1664291598993; Tue, 27 Sep 2022 08:13:18 -0700 (PDT) Received: from ?IPV6:2601:681:8600:13d0::f0a? ([2601:681:8600:13d0::f0a]) by smtp.gmail.com with ESMTPSA id y10-20020aa79e0a000000b0054097cb2da6sm1886470pfq.38.2022.09.27.08.13.18 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 27 Sep 2022 08:13:18 -0700 (PDT) Message-ID: <0b5d2b5d-fccb-ff3d-d1cc-5276e914f6da@gmail.com> Date: Tue, 27 Sep 2022 09:13:17 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.1 Subject: Re: [Documentation] Correct RTL documentation: (use (mem ...)) is allowed. Content-Language: en-US To: gcc-patches@gcc.gnu.org References: <06f201d89e76$4ddb3210$e9919630$@nextmovesoftware.com> From: Jeff Law In-Reply-To: <06f201d89e76$4ddb3210$e9919630$@nextmovesoftware.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.9 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 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 7/23/22 03:26, Roger Sayle wrote: > This patch is a one line correction/clarification to GCC's current > RTL documentation that explains a USE of a MEM is permissible. > > PR rtl-optimization/99930 is an interesting example on x86_64 where > the backend generates better code when a USE is a (const) MEM than > when it is a REG. In fact the backend relies on CSE to propagate the > MEM (a constant pool reference) into the USE, to enable combine to > merge/simplify instructions. > > This change has been tested with a make bootstrap, but as it might > provoke a discussion, I've decided to not consider it "obvious". > Ok for mainline (to document the actual current behavior)? > > > 2022-07-23 Roger Sayle > > gcc/ChangeLog > * doc/rtl.texi (use): Document that the operand may be a MEM. Given this is documenting existing behavior and it's not hard to envision the MEM being useful in this context.  OK. jeff