From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd2e.google.com (mail-io1-xd2e.google.com [IPv6:2607:f8b0:4864:20::d2e]) by sourceware.org (Postfix) with ESMTPS id DDCBC3858D37 for ; Thu, 21 Dec 2023 19:10:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DDCBC3858D37 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 DDCBC3858D37 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::d2e ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703185847; cv=none; b=VHLMc8MlzPEagbRtIz2g+qa6cnxuQ+uaYrOGOGH+mF4s63QDuJa0fn5PBncbJE8KZse4X7ZzbIJnT1NhvWnmZrWRr7ODLPE2BT96DTCLdu0PtyHq8gAZo7niGH/1YPFpesVYG0OqHToJfgNua9apJzL/TDd4FbaVA43W5KknC7Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703185847; c=relaxed/simple; bh=CphcSXZKXDxMdEztpxQUchejJT5f6G+BuNUKqFq2s40=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=Bn/KKoITDHLUk1OGWmIiiimPz4FztKW91RjgAThsMU71Mh1dgo0qZcpoiMFgXC10CA5KnrtBiBwQorIKxq+LEQYPcLqsBcwihIgWv+tVpLAaVJB9HQVR3e5X2L0QI5Nfuv/V4LQK1VLGtRryV8e/fQzfsw7PRcYL8C+Or29vEjQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-io1-xd2e.google.com with SMTP id ca18e2360f4ac-7b798e6f702so42545439f.2 for ; Thu, 21 Dec 2023 11:10:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703185845; x=1703790645; 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=AECsDnm2orsPbcLw1VAeaoFBXURZg3jbstEIF/5yD3A=; b=j0JTxmEW+qx+aRnTskt1Mxo3sYyYxRZenJWFsCMiW0xCo5iqpwYdYcyZvYrvqbYDeo PG0vKIUhxTh8mloz4yzh6ptSxj7romK6HRmDojIm22u7onMPjm1CUl4aOLJLU7sEyjG2 I5fnD+VUqYFownG7DLHHG369UJzgYx4l05qykYYBfVaEedmA3YEScps8EJ8tGZrnjYol 62d2/fX3af3sIVV+6ys0pLWq7FTcod2CAMcPcNZAP6Wl+dcMM9txtxsiwmbLePNRWpvh fktxz85LJ/lc5cLv74oCw762Bqene+fPfRgVzWaoEcBelT8ZLNy1bgaENMWBaNFIfJnY IDTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703185845; x=1703790645; 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=AECsDnm2orsPbcLw1VAeaoFBXURZg3jbstEIF/5yD3A=; b=I2kx6ghgPzUfXOK0gwrQHvZV1bvQFWnOLxxxZRfrSjs7TcY3LszeorvtizDSU4D1gH kIlq2qStTGv5SlC4tKJj+k/AhWcHRoP+5Cwxk0EmC+oqbCSw0Sm2hP/ZbQ1yQoRc+UR9 oveNqJjq7mVaGlkNsr9d690S/VSF8hBWP8nMG0KBK1lB63SMKufDRHX9y620tKyHklMg U/QYUC+zD1wcItwYVK/n2RuyAs2flpf1YIZ7l8fpyvli9O4zvqtcEZYLADIsxQHUL2vO X1zJCe8KDKeBcylG6tZUaJCGMV0jXDOAvl3ZeCnkzJkc/Db31JknSMAcPgnZHyK0LTOR o4tQ== X-Gm-Message-State: AOJu0Yw8BnipxQrIMsUafDpSWa/qR+1iSvXDtbCKvgjuJ637p9hJpo7E vLmRIBi8Q5FbCKiNF/Vz7+I= X-Google-Smtp-Source: AGHT+IFbsyKnjdidcXDy+5H7oLUgwEcz+obftSKwDkizyNZBuHP45rnXxnQ62YhYsbf5+C0O0QbWBQ== X-Received: by 2002:a5e:880d:0:b0:7b7:4d1f:a2ed with SMTP id l13-20020a5e880d000000b007b74d1fa2edmr278883ioj.7.1703185844898; Thu, 21 Dec 2023 11:10:44 -0800 (PST) Received: from [172.31.0.109] ([136.36.72.243]) by smtp.gmail.com with ESMTPSA id fq8-20020a056638650800b00468ed10d45esm611197jab.154.2023.12.21.11.10.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 21 Dec 2023 11:10:44 -0800 (PST) Message-ID: <4f635630-350d-41a6-9017-77b8e50eccd1@gmail.com> Date: Thu, 21 Dec 2023 12:10:42 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 2/3] RISC-V: Add crypto machine descriptions Content-Language: en-US To: "juzhe.zhong@rivai.ai" , wangfeng , gcc-patches Cc: "kito.cheng" References: <20231221024805.7671-1-wangfeng@eswincomputing.com> <8F26F2A041E40678+2023122111501272800736@rivai.ai> From: Jeff Law In-Reply-To: <8F26F2A041E40678+2023122111501272800736@rivai.ai> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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,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: On 12/20/23 20:50, juzhe.zhong@rivai.ai wrote: > + (and:VI > + (match_operand:VI 3 "register_operand" "vr, vr, vr, vr") > + (not:VI (match_operand:VI 4 "register_operand" "vr, vr, vr, vr"))) > > This order should be swapped like ARM SVE: > > (define_expand "@cond_bic" >   [(set (match_operand:SVE_FULL_I 0 "register_operand") >   (unspec:SVE_FULL_I >     [(match_operand: 1 "register_operand") >      (and:SVE_FULL_I >        (not:SVE_FULL_I (match_operand:SVE_FULL_I 3 "register_operand")) >        (match_operand:SVE_FULL_I 2 "register_operand")) >      (match_operand:SVE_FULL_I 4 "aarch64_simd_reg_or_zero")] >     UNSPEC_SEL))] > "TARGET_SVE" > ) Correct. This case is even noted in the internals manual ;-) > A machine that has an instruction that performs a bitwise logical-and of one > operand with the bitwise negation of the other should specify the pattern > for that instruction as > > @smallexample > (define_insn "" > [(set (match_operand:@var{m} 0 @dots{}) > (and:@var{m} (not:@var{m} (match_operand:@var{m} 1 @dots{})) > (match_operand:@var{m} 2 @dots{})))] > "@dots{}" > "@dots{}") > @end smallexample Jeff