From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by sourceware.org (Postfix) with ESMTPS id D0C413858D35 for ; Wed, 28 Jun 2023 16:20:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D0C413858D35 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-pl1-x630.google.com with SMTP id d9443c01a7336-1b84c7a2716so507695ad.3 for ; Wed, 28 Jun 2023 09:20:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687969203; x=1690561203; 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=+3rXKTq2M1bn4tyaCQzwxW3FsJZrC9cLboqd2Z8xfNY=; b=Rg6BL74U0nerVysQyQTnYJyI2APABFqK76X2b5BhU14RWemO2fb0FppguZoDzgKjPD ZWiBqNM8SDBzD3BLbnRLTRo5sCoHsJTD8Vb1shK54iAPh6gQpxF7qjm5fTnp5jLwYsbd F0woiPsKWOWJ4klN5aXlRYCUaY756DFoxOVbYy3NT6FcoJZ8T19vTF+EdxdYzD8QWKGZ AUMpNl0QyK7cnOqD8i1jkok9kfddKAlrelLLKcDYZAlWCMZQuqdYfKTcNIXCiDCyQZV7 H4eBJqINpWgu8UydfuOGgqTJ3hdTW2nWQo0YVxcbKOLVR5WQ0rZPQl/IUr3CMErWGpLl CV0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687969203; x=1690561203; 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=+3rXKTq2M1bn4tyaCQzwxW3FsJZrC9cLboqd2Z8xfNY=; b=TBSlxLYwnwaz9/x5kxUsZzwKrNtpAxUCJodd+St55MjS0NtIG1J8DpK8rw8BsLVZoz p+alrvRVuZ3m/dCT4Tu3daOMz8xH1OJoMMnDej+v6myZUfDQR0ccQ79APF+2TAzZZHB8 6EvymOfEf3SbHYloIfX3+SsOMZgJQWJD4S1TqYsAd6nlFdWLsoLeIKNpOyyUeqVlS4v2 2UBgjzsCbpGGdNuYe3di3B3e0RSD4nMgA1RwWBFDpmqnORYvqHTp1Csfr+flVYxnxeEi u2BZopmCgWbTN5IO1h1nknjx7yiRsY0AQVWqLr3VhvBLpeJ7F3RZa1arlcR0AkUd8/PJ m4LA== X-Gm-Message-State: AC+VfDzQTRBqmxC+EQiwuuBwgcV8xEELQI5KHlADHM2qpK8fvVk/dFWQ Cr4O1dUPADFX/dU+F/rX4Rg= X-Google-Smtp-Source: ACHHUZ7iHzJtdo+RIEucIJd4HecAlmG21UAtq5cko0p69TN1w1+bcbyPXYT4NtFmJbwyepizGrK/vg== X-Received: by 2002:a17:902:ed42:b0:1b8:3cb8:7926 with SMTP id y2-20020a170902ed4200b001b83cb87926mr2016843plb.23.1687969202677; Wed, 28 Jun 2023 09:20:02 -0700 (PDT) Received: from [172.31.0.109] ([136.36.130.248]) by smtp.gmail.com with ESMTPSA id t1-20020a170902bc4100b001b7e63cfa08sm7507431plz.293.2023.06.28.09.20.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 28 Jun 2023 09:20:02 -0700 (PDT) Message-ID: <11194a0f-42d6-48f8-184a-b0ba9b9586da@gmail.com> Date: Wed, 28 Jun 2023 10:20:00 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH] Mark asm goto with outputs as volatile Content-Language: en-US To: Andrew Pinski , Richard Biener Cc: Andrew Pinski , gcc-patches@gcc.gnu.org References: <20230627032449.37404-1-apinski@marvell.com> 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.4 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 6/27/23 11:23, Andrew Pinski via Gcc-patches wrote: > On Tue, Jun 27, 2023 at 12:14 AM Richard Biener via Gcc-patches > wrote: >> >> On Tue, Jun 27, 2023 at 5:26 AM Andrew Pinski via Gcc-patches >> wrote: >>> >>> The manual references asm goto as being implicitly volatile already >>> and that was done when asm goto could not have outputs. When outputs >>> were added to `asm goto`, only asm goto without outputs were still being >>> marked as volatile. Now some parts of GCC decide, removing the `asm goto` >>> is ok if the output is not used, though not updating the CFG (this happens >>> on both the RTL level and the gimple level). Since the biggest user of `asm goto` >>> is the Linux kernel and they expect them to be volatile (they use them to >>> copy to/from userspace), we should just mark the inline-asm as volatile. >>> >>> OK? Bootstrapped and tested on x86_64-linux-gnu. >> >> OK. > > Committed to GCC 12 and GCC 13 branches also. The test should be conditional on target lra since we don't support asm goto on the reload targets. It looks like gcc.dg/pr108095.c needs similar adjustment. Consider a patch to make those adjustments pre-approved. jeff