From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by sourceware.org (Postfix) with ESMTPS id 8BB903858C35 for ; Mon, 4 Dec 2023 12:13:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8BB903858C35 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 8BB903858C35 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::52b ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701692040; cv=none; b=b7yzMXhZ4Xf3NR4CEV95XguhjIEooNPIQoIcwv9jjgfvgpqc3edWX1ypbGevRmPmoaTjU6aWoWEz+TfEF2oidF2sR5+0V0+1y9bUbLXUg4IRiYlAZ8vqxq6T1b5jeusGddWc+BVZZitkKtTpHOg2gbNpOgk+9w2jnGKdCyeSQC8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701692040; c=relaxed/simple; bh=3VlCU1ZZRMLmMEJgor3bqsKEIi4viVLILaXkmvR+DQQ=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=ICei0pgr8q0Lc50oAuN3d2LEaEiLqQfeO6Ao1swcNJYHlptc3VDuyyNdlbQTp2BLxsm+keWeLgamVN6efjKs5kOPFEWqrtRVmdj/LjtuouOckdeNV6kwPc3R8jG2yYZTJZPjzQ46qRUvZnp97kLk2IC00/W2eN9NLXUJag4uAaQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-54ca43031d1so1212576a12.0 for ; Mon, 04 Dec 2023 04:13:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701692028; x=1702296828; darn=gcc.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:cc:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=DeHA2SfbLeCojUyu5JOYG6WhtGhh5F5vP3DZiOxAQNA=; b=EMlEavOb0UHYVfVwHZBuXsZf8qHwRpBGy8SRyuuTCMQhthfc7iCBa35ewVixxe/KMc CURZBn3WdpTsTTOZQoW6ClSxsjCBZIb2ONYPZJ9zbrupSGcY1WZjvjzOA37MQoBOYzz4 d8KZafYKgt6SN0uqcIJUAYnbdhU/qqGHx4wo8MCsVupAVunqVc5C5h5MBKMqkdN2DUQ5 QAs8KKqVjbGNhh7UcRIdzUxk6EarA3ulPyV6JYBp4QPGdgWDhba82OdovUnl5ad+trYG RgG1QZWgtayeHZ6qywiAjS9RYQVF7WdGhY2R1ChwsTJclnavbvi+1vMmqPhnxoScBPGk 52AQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701692028; x=1702296828; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:cc:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=DeHA2SfbLeCojUyu5JOYG6WhtGhh5F5vP3DZiOxAQNA=; b=Q6LfWmIWJ3HCX513vAmkOg+u6FjTUGlV7VyQm8SZ9Z0M1nZJ/lUZhWMYVDRJ7hnxle /c0yOvnShQ+w6L3B9HGvQhL8iNonTRbDcJI4ePTUTYv63sQErBjiVcDwtMnjSiEKLhLt ArQ31PSJ3LQdG0uxvPwiTq7nwoSeweNnnUrKtVIZuRORY2SAcT82qTaCFL+/5hcSqdWt OQvcc4Kj7bCHu/QmhCJYNc7G4InEEqHT5k968uj5aX9+R0nU622Z9r247TYF2zAYAol8 a/mL8AguvvJ+SyVXjt3Nn9pA+HwC8NrGldX1buHvLjxbg0djSb4bY6OHin6WQQmSZJNS xz0Q== X-Gm-Message-State: AOJu0YwL1FRCM9yn0hAersay8KWTxYVQXqiqbge+FnbXEwnyVYavKkR8 Pb9EjUgsy5e5CSoZKQQq4+4= X-Google-Smtp-Source: AGHT+IFAq0JA08bOCmilwMijW6uM9Fx5990pD+SemJQZLhYfh/BqqGdBEAIMr1pikfUua0ZrS2TzmA== X-Received: by 2002:a50:c2c1:0:b0:54c:4837:9058 with SMTP id u1-20020a50c2c1000000b0054c48379058mr2629258edf.80.1701692027938; Mon, 04 Dec 2023 04:13:47 -0800 (PST) Received: from [192.168.1.23] (ip-149-172-150-237.um42.pools.vodafone-ip.de. [149.172.150.237]) by smtp.gmail.com with ESMTPSA id dc15-20020a056402310f00b0054ced65bd26sm428474edb.41.2023.12.04.04.13.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 04 Dec 2023 04:13:47 -0800 (PST) Message-ID: Date: Mon, 4 Dec 2023 13:13:46 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Cc: rdapp.gcc@gmail.com, kito.cheng@gmail.com, kito.cheng@sifive.com, jeffreyalaw@gmail.com Subject: Re: [PATCH] RISC-V: Support highest-number regno overlap for widen ternary vx instructions Content-Language: en-US To: Juzhe-Zhong , gcc-patches@gcc.gnu.org References: <20231204101142.411128-1-juzhe.zhong@rivai.ai> From: Robin Dapp In-Reply-To: <20231204101142.411128-1-juzhe.zhong@rivai.ai> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.4 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,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: > +(define_mode_attr widen_ternop_dest_constraint [ > + (RVVM8QI "=vd, vr, vd, vr, vd, vr, ?&vr") > + (RVVM4QI "=vd, vr, vd, vr, vd, vr, ?&vr") > + (RVVM2QI "=vd, vr, vd, vr, vd, vr, ?&vr") > + (RVVM1QI "=vd, vr, vd, vr, vd, vr, ?&vr") > + (RVVMF2QI "=vd, vr, vd, vr, vd, vr, ?&vr") > + (RVVMF4QI "=vd, vr, vd, vr, vd, vr, ?&vr") > + (RVVMF8QI "=vd, vr, vd, vr, vd, vr, ?&vr") > + (RVVM8HI "=vd, vr, vd, vr, vd, vr, ?&vr") [...] I'm fine with avoiding the overlap but I'm not sure this is easily maintainable because the constraints don't actually depend on the mode? I suppose this is for easy re-use across different insns but there are only six(?) widening patterns so we don't even save lines of code by this? I guess I would prefer the normal approach of writing it out explicitly in the pattern. Maybe add a different replacement method like define_subst in the future to simplify such situations? + "vwmacc.vx\t%0,%z3,%4%p1" Why the z here? For canonicalization? Regards Robin