From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by sourceware.org (Postfix) with ESMTPS id D7FEB3858D33; Wed, 15 May 2024 11:20:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D7FEB3858D33 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 D7FEB3858D33 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::12f ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715772025; cv=none; b=EzUVWHumTIzuzwlSEs9zGyYnLtw8RGFuwQX3ngVETtSDEDf7KlvJyCRnx4/bFKA63mx+F7JBMJovMwuh6kdIR9RiWyW36/5hKFXyR58zBhiDsFOgzemF1aU15L13JeZ1guZS0PhPDynnoktVfAvXdszPNPpHwn5YYvpFB9HCx10= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715772025; c=relaxed/simple; bh=KElq8wpbWR4R2UBVkehdAUwwilgApwDdi1+XFmtA/To=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=G8ibo4EkMRIbpwkTu2HLziII0ItmSekV4RyPOy1D7CCV8C8y4b1NGyZdf7i0o2VI3D8RCwhfwZpDzAY4bU0qrHR0m9JEbhmbv3hQ48NrHYlqHgD5DSMRIrNW2ePovFeuL2St220EunhvIhFRv6v4NQLD7PGEc5DsYeVtPNXcp0E= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-51ffff16400so11057361e87.2; Wed, 15 May 2024 04:20:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715772021; x=1716376821; darn=gcc.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=ay+FRE3jVRYq9k9VF5VmEBkTMfKC6Kva6gVMOlrjkrw=; b=mS5xfhHJoSeKxA37ZIIo8Izd836H3Vb6H40UUILzRjXm6vVPM6RUCGdeJ6YCmTfvwm EjknMBmA7CnOV5CrPyHr8Wi+2s7pO9ve0oNS+dXE8kUk0Fr3x9KdhLY1P23UEhA0LhvG g2qia1+7+0yom8vVcK1JvyEcR3VMtmPhOGMkdJTNux3kEh9e1a3oAsiqnWZzBVY0DAd+ RYK/S9deVKFxsmSL2TLY0sdWvMxLFCIgnbQC3eDxYjnunzy6V6XP+Mmb8qCo+J6T6JQK nC3zo7vLLRCFqyr1c2ggC+vIpn42cQSYbledtjmxQIcVrBNKmO/ubRPcC7SKYAKH/71l xl9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715772021; x=1716376821; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ay+FRE3jVRYq9k9VF5VmEBkTMfKC6Kva6gVMOlrjkrw=; b=hf0bRU5VTxDvWBVUYDRaQDx5660dYp4wV/kvSxad9CHpZTZ+rEI9D/DsLjnAgeHlXw dR83XBFuy1OFZ2I2Dl7KFCYmvY8QEO2GTorfP29ubZ9FbUxQ74O+so2x4JumfFN6Gc2I t4O3SLB06W1WPdgE7HFtQpYyOKeFqHnuZlH+DK3qT8mbbjsEtD29MTgDi+kc2kzVmzvd ihwUAt+AsNA9Rs5KMc/GRFiZk8pHQClY4dmKlnusZ30UwxWTJTFn+Heet5oIp+9eK7T1 M5b2v2cSOxz65P+JtbC4j7rQBVHnkldemqAE/BFpBc4eq781ypmQqbJCvZToaWWa6/ET q+Jg== X-Forwarded-Encrypted: i=1; AJvYcCUnsLJmxIib3E1wHNoO3/vNnfbGaCK+6r9aOtG11L1Ejqt1hWG5NgFPog46kIMR/GogFyCMX1Bzlt7f0uOU2YKcBXD9Bw== X-Gm-Message-State: AOJu0YyOb96VOgIZ+ntZX1vfv3k2r4K+07Uc9jMy+gZdVl12lw8JlFDI 2Oq02YBFlZ1LZ5bYrhs9kkw12PHnxmHvWIWirf2mJOt6dA2/j3YfjysTLMpYZIHnWdxMUEq8rEs DD2YC1rOztCFy64rQRJM2fgJQQTtE2A== X-Google-Smtp-Source: AGHT+IHFNNPw1lGkXfhzQrjz0nyUuMwib4G/RwTmLs5wwhJJ2Y/gspEUNH2mydF9FKt4Bk51evVJM7+5jyQrOcY6L7E= X-Received: by 2002:a05:6512:2250:b0:523:97bc:ea88 with SMTP id 2adb3069b0e04-52397bcef31mr1642980e87.51.1715772021046; Wed, 15 May 2024 04:20:21 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Richard Biener Date: Wed, 15 May 2024 13:20:09 +0200 Message-ID: Subject: Re: [PATCH 0/4]AArch64: support conditional early clobbers on certain operations. To: Tamar Christina Cc: gcc-patches@gcc.gnu.org, nd@arm.com, Richard.Earnshaw@arm.com, Marcus.Shawcroft@arm.com, ktkachov@gcc.gnu.org, richard.sandiford@arm.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,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 Wed, May 15, 2024 at 12:29=E2=80=AFPM Tamar Christina wrote: > > Hi All, > > Some Neoverse Software Optimization Guides (SWoG) have a clause that stat= e > that for predicated operations that also produce a predicate it is prefer= red > that the codegen should use a different register for the destination than= that > of the input predicate in order to avoid a performance overhead. > > This of course has the problem that it increases register pressure and so= should > be done with care. Additionally not all micro-architectures have this > consideration and so it shouldn't be done as a default thing. > > The patch series adds support for doing conditional early clobbers throug= h a > combination of new alternatives and attributes to control their availabil= ity. You could have two alternatives, one with early clobber and one with a matching constraint where you'd disparage the matching constraint one? > On high register pressure we also use LRA's costing to prefer not to use = the > alternative and instead just use the tie as this is preferable to a reloa= d. > > Concretely this patch series does: > > > aarch64-none-elf-gcc -O3 -g0 -S -o - pred-clobber.c -mcpu=3Dneoverse-n2 > > foo: > mov z31.h, w0 > ptrue p3.b, all > cmplo p0.h, p3/z, z0.h, z31.h > b use > > > aarch64-none-elf-gcc -O3 -g0 -S -o - pred-clobber.c -mcpu=3Dneoverse-n1= +sve > > foo: > mov z31.h, w0 > ptrue p0.b, all > cmplo p0.h, p0/z, z0.h, z31.h > b use > > > aarch64-none-elf-gcc -O3 -g0 -S -o - pred-clobber.c -mcpu=3Dneoverse-n2= -ffixed-p[1-15] > > foo: > mov z31.h, w0 > ptrue p0.b, all > cmplo p0.h, p0/z, z0.h, z31.h > b use > > Testcases for the changes are in the last patch of the series. > > Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. > > Thanks, > Tamar > > --- > > --