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
<gcc-patches@gcc.gnu.org> wrote:

On Tue, Jun 27, 2023 at 5:26 AM Andrew Pinski via Gcc-patches
<gcc-patches@gcc.gnu.org> 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

Reply via email to