From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oo1-xc2b.google.com (mail-oo1-xc2b.google.com [IPv6:2607:f8b0:4864:20::c2b]) by sourceware.org (Postfix) with ESMTPS id 958033858D28 for ; Fri, 22 Mar 2024 18:17:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 958033858D28 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 958033858D28 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::c2b ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711131428; cv=none; b=Vmf6scwijAzVc+A4hrJKcUeR3XjCRyI91QEmbo+w0piFZAxUvCuH1tE40yV4Uf/O2CETD1SDfvmWHbPBYt88PU0QT4cTrFwgq+Y2Ee4FuatZ+vUo61UM5y6VlHz8TYxnFJbxXyANbFxjM7n8E8F9q7J4C2IfX/gvpMTSssiLvAk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711131428; c=relaxed/simple; bh=D+t6SfkLJ7ZvoZ6US9UlEwH3hCGsCBkzP+qkycDNw1g=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=NgpJVjd5e+Rm4o7zAkPZAZgzDLCnBSMnB8wCiei+6Wh9kMaUaQboB0n5D9Gj7xv3y9I0Y/4k9RVmdz/9DlIkN5/r/QbijCsLzvkk6s7jtth7nxcRjNEWjXHya1C4MP5BqslU++xr/y4OlZSSMAhZbfXI25DXIKmoEGaN8A0uWTI= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oo1-xc2b.google.com with SMTP id 006d021491bc7-5a21859a4b8so835976eaf.0 for ; Fri, 22 Mar 2024 11:17:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711131425; x=1711736225; 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=eIML4Slr5Z1lRCma25tWf2TdOgRB5KTtLGQR0D3fg9w=; b=irYcdDmD2+75rGtu6mXC21AkzIYe72qtgakF3jn4wIgjivCJDiyQZ7qTvkAT5/S+5r Qy2cLWG+Nk2K+JgXbNM2BZ7HxdUMJOoLv5yEJ0b2WJg7cARUgEb/FHN/8+zRjCmWu28u eKhvsGV9JzpCvgSL1FbBn+wlmAL18e7j7GyoyJzlEjW7dCP7MzCFD9vUDkMQ8JUFzifs JZMbkRe6/YmxoTi4Ql0AGIRYv2BRFM7xQn26U9aCeD9SPWdexmWmWwkJm7D0k7cw+MQ2 kdgdqzBV3woTu4/biKQdd1gty9N4tr/GQZbUkGDDdooxd96htFXSeZS5Xsm5laMuZcG5 u70Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711131425; x=1711736225; 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=eIML4Slr5Z1lRCma25tWf2TdOgRB5KTtLGQR0D3fg9w=; b=CtCUEMKhU0qmO5mBYSM6GX8m9hBHZ+ciXZN5AWTWDzWPZknBnfkyWJ/DMbyFTRgasU 74wFvzy8CNbbMbBmNw3PVqRn0OIhQFQ9P1jsWM9nFN5ljInxPsTmDpCMvLC1RRJfHEM1 kb45wXSyDZF6W/ghK3AmZ3x/1yBiaTj5VOEQtxXJPpZYRQ8DaER68ihASHre9ugnYQ/9 bd7rHJx7lL11y6cBGud78fvYyEPWWnkVdRP31QWa/8slVwCkd5/d7ZW//kNqTVDpD9qh 4MASE+WxsVsJUTRZmwjFYYuCkGHA247uT0HHnrNCAcAaIJt8J4Dot2Nrn+2jlxurtKOY L57Q== X-Forwarded-Encrypted: i=1; AJvYcCXaClFPkZHw5IAgJsqTWdoZPVB7yd0/2dvOUEwx2Bb0TgXzEcyu2S/1yR2PHGA7bDis5TTPa+aKd6uaF7RjC8tJpJad+Zbwlw== X-Gm-Message-State: AOJu0YxQvHeyeGpdKgGJnijlST8B1v8yWJHjdUawcZHSZUbBicTLX2zq qbtk2ovlSp4qSU+srl3/S3o6x7sqxxPSRLefrP2Y5u60kYt3XKPJ X-Google-Smtp-Source: AGHT+IHx7wouCZOuCNPSwdq5esY79m4eiZAC60VmCJAA5044dhVmu/vqO+sj8xSmVfnmUQ5GOwtoUQ== X-Received: by 2002:a05:6870:e2ca:b0:220:ee88:6107 with SMTP id w10-20020a056870e2ca00b00220ee886107mr601515oad.23.1711131424737; Fri, 22 Mar 2024 11:17:04 -0700 (PDT) Received: from [172.31.0.109] ([136.36.72.243]) by smtp.gmail.com with ESMTPSA id l1-20020a056830334100b006e67cf79aedsm6659ott.64.2024.03.22.11.17.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 22 Mar 2024 11:17:04 -0700 (PDT) Message-ID: Date: Fri, 22 Mar 2024 12:17:03 -0600 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta Subject: Re: New effective-target 'asm_goto_with_outputs' Content-Language: en-US To: Thomas Schwinge , Mike Stump , Jakub Jelinek , gcc-patches@gcc.gnu.org Cc: Richard Biener , Rainer Orth References: <2357E81F-095F-4D98-8FE9-767107359BF8@comcast.net> <87ttkzompl.fsf@euler.schwinge.ddns.net> From: Jeff Law In-Reply-To: <87ttkzompl.fsf@euler.schwinge.ddns.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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,KAM_SHORT,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 3/21/24 5:20 AM, Thomas Schwinge wrote: > Hi! > > On 2024-02-16T10:48:53-0800, Mike Stump wrote: >> On Feb 16, 2024, at 2:16 AM, Jakub Jelinek wrote: >>> >>> There is one special case, NVPTX, which is a TARGET_NO_REGISTER_ALLOCATION >>> target. I think claiming for it that it is a lra target is strange (even >>> though it effectively returns true for targetm.lra_p ()), unsure if it >>> supports asm goto with outputs or not, if it does and we want to test it, >>> perhaps we should introduce asm_goto_outputs effective target and use >>> lra || nvptx-*-* for that? >> >> Since the port people have to maintain that code in general, I usually leave it to them to try and select a cheap, maintainable way to manage it. >> >> If people want to pave the way, I'd tend to defer to them, having thought about more than I. > > Here I am. ;-) > > After commit e16f90be2dc8af6c371fe79044c3e668fa3dda62 > "testsuite: Fix up lra effective target", we get for nvptx target: > > -PASS: gcc.c-torture/compile/asmgoto-2.c -O0 (test for excess errors) > +ERROR: gcc.c-torture/compile/asmgoto-2.c -O0 : no files matched glob pattern "lra1020113.c.[0-9][0-9][0-9]r.reload" for " dg-do 2 compile { target lra } " > > Etc. > > That is, the current effective-target 'lra' is not suitable for nvptx -- > which, I suppose, is OK, given that nvptx neither uses LRA nor doesn't > use LRA. ;-) (Therefore, effective-target 'lra' shouldn't get used in > test cases that are active for nvptx.) > > However, nvptx appears to support 'asm goto' with outputs, including the > new execution test case: > > PASS: gcc.dg/pr107385.c execution test > > I'm attaching "[WIP] New effective-target 'asm_goto_with_outputs'", which > does address the effective-target check for nvptx, and otherwise does > 's%lra%asm_goto_with_outputs'. (I have not yet actually merged > 'check_effective_target_lra' into > 'check_effective_target_asm_goto_with_outputs'.) > > I have verified that all current effective-target 'lra' test cases > actually use 'asm goto' with outputs, there is just one exception: > 'gcc.dg/pr110079.c' (see > > "bb-reorder: Fix -freorder-blocks-and-partition ICEs on aarch64 with asm goto [PR110079]", > > "ICE with -freorder-blocks-and-partition and inline-asm goto"). That > test case, 'gcc.dg/pr110079.c', currently uses 'target lra', and uses > 'asm goto' -- but not with outputs, so is 'asm_goto_with_outputs' not > really applicable? The test case does PASS for nvptx target (but I've > not verified what it's actually doing/testing). How to handle that one? I'd just make target_lra return false for nvptx rather than creating a new selector -- I'm not aware of any features other than asm goto that LRA provides that aren't supported reload. Or perhaps rename the selector entirely to target_asm_goto? jeff