From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by sourceware.org (Postfix) with ESMTPS id 3C4AF3860763 for ; Fri, 15 Dec 2023 00:14:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3C4AF3860763 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=vrull.eu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=vrull.eu ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 3C4AF3860763 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::52d ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702599267; cv=none; b=oQs/Me8m2rvm3yHndJSfIkzok6YTtU3Z6K502CFIdpOZRYtmPiUAOq0lQdZJB5BUQ7q6WZfmNaC0zC8cQ8F3I68O5cQMK191JL4H+uv30VSdNgYoZXJJReGSF+3L5K/BvB0Im8wxn3nrmJOjEPAMD36X2ErwWcLuEZb+y9CmYC4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702599267; c=relaxed/simple; bh=rLvSk0ifdTUMeXlBuujR8ceIQK/rqY/7q1Op44ZbaiM=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=VK2DXgDzXO9xyh6nnZY9PzhfaC1s+vUO6u6wtEUiNdITsbgwGXlmLXHAaaxg21K3KpBd6SbQHC65pki/ptHPtQXLvEubWgn6E3RBvlQ+h/gShmucgFaRnwRzOaNAiJExhlkbU3QSebqNSpn099/q7XieMNJFBFQTJe1AC7zIjzo= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pg1-x52d.google.com with SMTP id 41be03b00d2f7-5c66988c2eeso49919a12.1 for ; Thu, 14 Dec 2023 16:14:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vrull.eu; s=google; t=1702599264; x=1703204064; 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=ZOuEu4ZgkmQwFWLNsPwXOYj99z9IyIPcrMwZ3hlv7dI=; b=bmXsW64xadsXkjO1W1hjd/mPCuhyUh9ZskoF6/HOwWT/hRyfH7PFwt7tYVMvPvgIvm /Qk6q7EMrjdnOpaUqgtirH4qS3/Cbf3c1O82uXok6aEnyDoStSgpwCbHhOE7MuFk4eR5 rfFlqaC9E0LPuZL2tBVX0l7yPtd6sPBsvqdIfJgmYcKF+8YxfrCwdQ887LJ6RZ/TcobA EQQt3TXd6iXlj8TVBBzN1MiBInb0Y48q0MeCkfzfRQbb19532OjLV3mgExGHvLHlfgDt 7gTe8OErmBQ97KDmm1rmPPZrkdIE7oSfgFta5YytuZi6VdxJ4oL51udJNQtBwdephtzu 5MlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702599264; x=1703204064; 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=ZOuEu4ZgkmQwFWLNsPwXOYj99z9IyIPcrMwZ3hlv7dI=; b=OcRXcVsI5VcGjnwzncLCte7ZT1Ue+3oe7hSHCqc1W72IToh01MYLX7EGTi8atwUldO eOxn/tgM2olKiGahmMDzuFvxIj8UfxMme384/kEG24tSAQ5EdV0E6+22cluLmxGTQd68 +zWX+GQDTZbkfTHA8s1kECr2hY02FvAD/7+f/j5JFcG0KOnaK948TaWR8WO03P2AgojM BUw8Wkh+cLwhpKSyYhm7KA9LcKa7u0LmCJ6S8n3dnu3xYwZ0o11sW1bWKEWCMeac+6sz mbpNcVRKzjiRGEjrMDRZU0VG9dkbDD9QuwDr5+qHsV31zy0F1eQQXkFKOJf3YbkX+EMd jQ4Q== X-Gm-Message-State: AOJu0YwWx/v6+nX5rZLxZd/DyBazKDiHo1bhe4o8vbQhXiPSUSWtMxWZ 5YR1hlg4w1A6noq+d1q3PIQFU66VObUVm9M67FtiDQ== X-Google-Smtp-Source: AGHT+IGDwTluQriGTim2OcArxSG6jdNQpB7EHMtyGwmh0Bsclcm3POEKKbF1GFEtew2peyze4ppieRGSx9zWzqUS7MA= X-Received: by 2002:a17:90a:5d12:b0:28a:c6a6:6d69 with SMTP id s18-20020a17090a5d1200b0028ac6a66d69mr5927363pji.4.1702599264063; Thu, 14 Dec 2023 16:14:24 -0800 (PST) MIME-Version: 1.0 References: <40fd253e-806e-463a-93b6-f8294e0e4c98@gmail.com> In-Reply-To: <40fd253e-806e-463a-93b6-f8294e0e4c98@gmail.com> From: =?UTF-8?Q?Christoph_M=C3=BCllner?= Date: Fri, 15 Dec 2023 01:14:12 +0100 Message-ID: Subject: Re: [PR target/110201] Fix operand types for various scalar crypto insns To: Jeff Law Cc: "gcc-patches@gcc.gnu.org" , Liao Shihua , Kito Cheng , =?UTF-8?B?6ZmI5ZiJ54Kc?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE,URIBL_BLACK autolearn=no 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 Fri, Dec 15, 2023 at 12:36=E2=80=AFAM Jeff Law w= rote: > > > > On 12/14/23 02:46, Christoph M=C3=BCllner wrote: > > On Tue, Jun 20, 2023 at 12:34=E2=80=AFAM Jeff Law via Gcc-patches > > wrote: > >> > >> > >> A handful of the scalar crypto instructions are supposed to take a > >> constant integer argument 0..3 inclusive. A suitable constraint was > >> created and used for this purpose (D03), but the operand's predicate i= s > >> "register_operand". That's just wrong. > >> > >> This patch adds a new predicate "const_0_3_operand" and fixes the > >> relevant insns to use it. One could argue the constraint is redundant > >> now (and you'd be correct). I wouldn't lose sleep if someone wanted > >> that removed, in which case I'll spin up a V2. > >> > >> The testsuite was broken in a way that made it consistent with the > >> compiler, so the tests passed, when they really should have been issui= ng > >> errors all along. > >> > >> This patch adjusts the existing tests so that they all expect a > >> diagnostic on the invalid operand usage (including out of range > >> constants). It adds new tests with proper constants, testing the > >> extremes of valid values. > >> > >> OK for the trunk, or should we remove the D03 constraint? > > > > Reviewed-by: Christoph Muellner > > > > The patch does not apply cleanly anymore, because there were some > > small changes in crypto.md. > Here's an update to that old patch that also takes care of the pattern > where we allow 0..10 inclusive, but not registers. > > Regression tested on rv64gc without new failures. It'll need a > ChangeLog when approved, but that's easy to adjust. Looks good and tests pass for rv64gc and rv32gc. Reviewed-by: Christoph Muellner Tested-by: Christoph Muellner