From patchwork Fri Mar 1 06:27:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "demin.han" X-Patchwork-Id: 208664 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2097:b0:108:e6aa:91d0 with SMTP id gs23csp892704dyb; Thu, 29 Feb 2024 22:29:13 -0800 (PST) X-Forwarded-Encrypted: i=4; AJvYcCVeVUW+WzOAK7cmsvpzVSWRw77d1Utaa6iZ7Dmy9viLteQ/CBnreiv1GXvDRydpFUX56gBFbV6rBCpPB5ij4zEWAj0N8g== X-Google-Smtp-Source: AGHT+IFHU3LcG46t9lVlG9q7ucDi5VXsoNjvh2UcWuaiBon3yOujb7XOR/T2I6LxGayg3VkmwkmC X-Received: by 2002:ad4:58a9:0:b0:690:71e:d18a with SMTP id ea9-20020ad458a9000000b00690071ed18amr811591qvb.13.1709274552940; Thu, 29 Feb 2024 22:29:12 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1709274552; cv=pass; d=google.com; s=arc-20160816; b=Lg+yhIb83GvjA46CRRm7vvIhFF5g9qlrdxQmTwRA1OaSDR+XcHjfm/70C76767l9cs Jnx9QY9hkSigd9Z6kMHF/YXz9TAxIjir5iboJKei5rk7h590gYD7p520BYQk/r0Z3sFS USP3/dnhpG5FvypxuwyAlMKPlJ5qbSgbIpRoWvnsul5/DFwi23Z7z5tuyGk6QqHqSZhy 5yVCUV8JUc/Qij3k5C+tTsLfDssXucX8DJaUjmWjJJ13kKLHipXHjtPylueuhs4pcdGM o8pGafGb3n3DmRDhWKTJmrY0iqKYfN9yHum6RFY+LLq3U72r5PbOAjvHhg/PYmbScbPp eMww== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version :content-transfer-encoding:references:in-reply-to:message-id:date :subject:cc:to:from:arc-filter:dmarc-filter:delivered-to; bh=010M9Q8rYQFasQOALYGfjFnNlL6qAybv2H3rBvWfA8k=; fh=AkWPpvwPhOnqU3cJUjz+pCLfr011jkgzwHdP+JYf2bQ=; b=Ke9I2qe/2WnSQiWtBSXTgI3xtXH4mMe1nHqFT9PhQxwFkNZEAZ/OrHxZS/Q3irS05H SZJ73sCflVpF4POmftBc4tKbwPfGMEP1Myqj/uZanhOcr3iKMwaV0ouQojptTpdVLvDZ UI5YPpkTblqTNwYjzg2YoaU/NRMvbFRTwJL18hltRlXG77J/nqlffbmnBUm2++rpdZFD 1wf4S0oG2gAc+L2kS9M6gj9oFr9nC9jS9fKtr05/xeymLIlBGSfuEjiWXNTsVqqPOSaz 3QVsmCNHIPgKzaAVRS8W4BkkhTmeh262XnALBl6WH0Qfw3VH3J/o1EyDUz3k75jzGNfG WoXg==; dara=google.com ARC-Authentication-Results: i=3; mx.google.com; arc=pass (i=2); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id nz1-20020a0562143a8100b0068f1387c655si2919437qvb.187.2024.02.29.22.29.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 22:29:12 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; arc=pass (i=2); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A3CC13858C31 for ; Fri, 1 Mar 2024 06:29:12 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from CHN02-BJS-obe.outbound.protection.partner.outlook.cn (mail-bjschn02on2132.outbound.protection.partner.outlook.cn [139.219.17.132]) by sourceware.org (Postfix) with ESMTPS id 06E3F3858C31 for ; Fri, 1 Mar 2024 06:27:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 06E3F3858C31 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=starfivetech.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=starfivetech.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 06E3F3858C31 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=139.219.17.132 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1709274481; cv=pass; b=wJ7/V96Uju+VEm3Jr2vZ/wny4b8Qdotm1CSEWaJ5l6yhUYfzdfJFzrwTCqPl7cWmS5QEy5Im20l93jO4Jc/zgtWnsNkcaDslXR9mgVykdQ572/ITM+Nq97KetfvCkY5tgvV+/kFirpBjwUJypz9jW0c2VXEAEtRbOTJEgXGkfN4= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1709274481; c=relaxed/simple; bh=OUtwS3dflL//IZiZ6YsHOSZCDKKoJgI3ziDZnouAhi0=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=ApcvE5TUrvLV54YBn/HWPkx64u6IFAiK1ZEPmBqNolycRo88H6dM0WHzf9esyhk33xgoLX+c2ahMGrW778Ukt+i41ji+PV1/EMckVqSgZ3rFre3VJMI4q71L2StHRntTw88C4kkjr8Vb7eNuQj68yYxjsiy+IcladYbPFBfLd84= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KDWU+uS2W1JKmf7qKi39VuWCiEQnpzUKn8fqnFynNCzL9u+LJG3xK75Ymm57gmOb2EAdt6t+uEFn/cAdC/5mYoll+qaYffctLgFKdO+n82nJwxtsmSGnqFh4SWnF7sMUnHNbXBsSoetX2OFASuWFjoYvoCcrIrFnixbkQI3EL27e9OTxLRehH3CHG4zbHflF9amIWmI14id1IyUoW8+JiMxtNBctSYB9ly08gyev7rAfaMKgRnLvaPPgm/ZlHfKTIIOXOj0r32LNGjVfNBo6Ko1l7tbfvpAcJ1kxQuQk/p3rwNU7GEUvOoU978FsEs2sFRdS+nl5m32LHnjATZr/2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=010M9Q8rYQFasQOALYGfjFnNlL6qAybv2H3rBvWfA8k=; b=GOAspOjvdkMY2Qq0WiFSi8XTEh7BnwtzeWVcnHhlrSusLuwJ6/CIggZpGmm3QMZwFZyY4Vn0Y6R6ReeCWpS4GV20aZAc2iB2zABlK/Lhs00smrS5Esur0Q30E4Pr4MSF/FwNqfwJP7hcInWUiKrB2Rp/bxdqkwqm29LbNPdytdLvWQCUC4OGhpWrQMN/87tt6DnFqE/ZiyMoCXj+9pAoZfu9za1VpVJF6973A/30CcIKV0LU+ROh57edv+WJG4JwugICCWhQtCcJuXgP1xI7egvnQNCrQZzFksCKqM3Lmo9MefyFJCMoghtJeGwgZ2GZa2sJW9tT616XSRpP4YynNw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=starfivetech.com; dmarc=pass action=none header.from=starfivetech.com; dkim=pass header.d=starfivetech.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=starfivetech.com; Received: from ZQ0PR01MB1063.CHNPR01.prod.partner.outlook.cn (2406:e500:c550:d::13) by ZQ0PR01MB1000.CHNPR01.prod.partner.outlook.cn (2406:e500:c550:c::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7270.39; Fri, 1 Mar 2024 06:27:52 +0000 Received: from ZQ0PR01MB1063.CHNPR01.prod.partner.outlook.cn ([fe80::21d1:48e1:7ca0:1d76]) by ZQ0PR01MB1063.CHNPR01.prod.partner.outlook.cn ([fe80::21d1:48e1:7ca0:1d76%4]) with mapi id 15.20.7270.047; Fri, 1 Mar 2024 06:27:52 +0000 From: "demin.han" To: gcc-patches@gcc.gnu.org Cc: juzhe.zhong@rivai.ai, kito.cheng@gmail.com, pan2.li@intel.com, jeffreyalaw@gmail.com Subject: [PATCH 5/5] RISC-V: Support vmsxx.vx for autovec comparison of vec and imm Date: Fri, 1 Mar 2024 14:27:11 +0800 Message-ID: <20240301062711.207137-6-demin.han@starfivetech.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240301062711.207137-1-demin.han@starfivetech.com> References: <20240301062711.207137-1-demin.han@starfivetech.com> X-ClientProxiedBy: BJSPR01CA0023.CHNPR01.prod.partner.outlook.cn (2406:e500:c211:c::35) To ZQ0PR01MB1063.CHNPR01.prod.partner.outlook.cn (2406:e500:c550:d::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: ZQ0PR01MB1063:EE_|ZQ0PR01MB1000:EE_ X-MS-Office365-Filtering-Correlation-Id: fa16049a-53ed-4700-82a1-08dc39b8b8f5 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wgw9O8bmXH57vLjdO+qd4UuJSVOGMfH3ujAgrJvF2lOodIbyhIwh3uh58nolN7EvOUQmhQi5/hmF7zUi3GE5vViVdhAwnlhhBU2gUy7eM+A/qC3OoAIclqh3nikXIEinDWt//sC3iTG0cbkKkxjn8kKPIPIJn2H/4/BjxrScmZ1BEBW5uOJhwSEKifsjeD6+tj+qgO4Fv+3gbzstQ6MuBr3byiU1ECmp6bWNSZAE6pfsnoazW97p0AAn5dMF4byhF+TdzZKfs7HXz/+6fPmkx5TsO1qnnZF8vsH0JALtWKphxWCZMfHgMC5A0YNKLLBRjNo5vD5LdAIvW8cI1sEZjolGNHBtI+q272GrRJHj9xjTU7pheMIg85otU3wJUiRixLs2EmqPFu7RnyNjB+Ftxe3RptafyugAf+iXWTYB8eF1+f4mDti0RUUuic0rBJDoDIMhxUgzbu3KmhWNRU7uAMcAWMYMAT/UERyFDsNtM9xp/5KoxPmUBGD9ZpsMp+go4Y/udcypqs9/k6J2pN5mqvjh4EstrBqsms/ilMYF1Jns+IVQ2NUzhroWPzQBTCS73xqixHuTlzvOxqto0ItqL/YbLYLmmibmppG2GKHYseZNFso0fNA12FeKjHxheFZL X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:ZQ0PR01MB1063.CHNPR01.prod.partner.outlook.cn; PTR:; CAT:NONE; SFS:(13230031)(41320700004)(38350700005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: kSvjLhgqrCbZDvJEn5c3/7c4TNsa7Z+Vb87d2Ny0Av9D3//oOzP2jSiyVxkDAJvfV/vPcT2SWOrntZ2Btaetyytg2ysOV0bcFIRmA0jSv4YR06p4zKn9fH/o6V+NyR27q8LmUWAOb2x7YN566jrF2kpHDyksyTKA8TUf0ILScObW/V/xH+ugrfJRH/93KC4D5KgE+hKDpjYlakx+bwTVCpnv/YjY3Y2mao2HwXeFovrykBWthMEvD2+JFE72wx+mUhNLNWvQe0+EGFogB6prlN1GGmbbVs+9QhsOgxl+lIRFkvop6pmSsSFDKuoqo1qCR4y1tJ/afi8veH7EQLrL4zOmKmHYh35cnV0jT0XjF5X+WI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6MfUQR8GvKAwXvmmC8SUlpfcCo55uR/i9NBYIssbathb8tULs+ov9NLTR/KF83n5zdKxAKVpds3l3G0EzUFNEFP1VacPFTczcOKgARnFfAUO7x1g/kfeO4RbW5wdfA9xK1Hkl3c0eYf8y9N6+2vYwOMZlsFoeeUtsB4u5CFjslVsfi8HA== X-OriginatorOrg: starfivetech.com X-MS-Exchange-CrossTenant-Network-Message-Id: fa16049a-53ed-4700-82a1-08dc39b8b8f5 X-MS-Exchange-CrossTenant-AuthSource: ZQ0PR01MB1063.CHNPR01.prod.partner.outlook.cn X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Mar 2024 06:27:52.0434 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 06fe3fa3-1221-43d3-861b-5a4ee687a85c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 1e/HIYQpR5tKR+dfXdgixr/hHxZ9ot9QZgxRYqpHv8XBUOiyrE61pCIFYUMn1zG3BwoDThXtwbag9a1I0/QftIAx4V3jCp88qXgFSW7kZgs= X-MS-Exchange-Transport-CrossTenantHeadersStamped: ZQ0PR01MB1000 X-Spam-Status: No, score=-13.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, KAM_SHORT, SPF_HELO_PASS, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792304273804315198 X-GMAIL-MSGID: 1792304273804315198 Similar to previous float change, vmsxx.vx is needed. 1. Only those which can't match vi should use vx. 2. DImode is processed by sew64_scalar_helper. Tested on RV32 and RV64. gcc/ChangeLog: * config/riscv/riscv-v.cc (get_cmp_insn_code): Select scalar pattern (expand_vec_cmp): Ditto gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/cmp/vcond-1.c: Update expect Signed-off-by: demin.han Signed-off-by: demin.han