From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-il1-x12f.google.com (mail-il1-x12f.google.com [IPv6:2607:f8b0:4864:20::12f]) by sourceware.org (Postfix) with ESMTPS id 22A573858439 for ; Wed, 20 Dec 2023 05:28:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 22A573858439 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 22A573858439 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::12f ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703050134; cv=none; b=VpaWOU3VyKAXRIO3a4YWK3f/FLAEWRwamiPuZI90UDtu7KhaWbRPxl67RELlhObgRt+uaAymEQ0YWkiySG7IxJXdW3fDc8uqiD7MHXrtZmxKdPZM7EUtlxBjKQRGDgTtEdH2h7xSTH7q6tURrcTpJ+p3GrY7HMn9bhFJf1xtEqI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703050134; c=relaxed/simple; bh=swP5gRq9yraTOSMTkiKvbvQIJY16INo5Aiz0Siadd2Q=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=xgAczZH/EfJHyI0ystgpKB/v/BFTAVGdKDB6HijFkG3p5Wal/W2ALimfm17aXfjqrYDrMBLe25Sb5NfdWabnfPRnvzdjkMp7+n1BNxhwatlqs29F+nKqoVTj1YxF8BQFh4hBJmWPIDFFhk1zpU5WbL/TutM1RqHsGW0V64j54oc= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-il1-x12f.google.com with SMTP id e9e14a558f8ab-35f56f06142so40297585ab.1 for ; Tue, 19 Dec 2023 21:28:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703050132; x=1703654932; darn=gcc.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=D8V5GNXIledfKpXRFYA3XAZi19TXM/o3MANiw4Ok4RI=; b=YHml1BygZLZ0yRJ1IG6KlvXeaYCpLt+n71BWCKwbS4alMc8nXbORi3McCH359c/Q4q 1Elt40FKaehB/p4c2Qhxo1TLhHN7hcVT3VPOO63an6v9rZmMcDQPXuR7RmYavCWYrau3 p6zyby+vaOwL9RNDSLi00WOQQc512ly5UfXUlXb0OfzBO7rnl54eu5rp23KZ0tPEK7va JoycXm3anz18b8XCRriu3K1rA+0KZCqBjs9LlJ7ewD3VqqnpLUK2qDVVNM8GGNqwUwpM /D9Pj0FjlWPld4XDFP2QEGNEl6tQlt+66FqwK6vEauJ/ZGBFWPzOYXpyNvE1KizBpeJv FVtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703050132; x=1703654932; h=content-transfer-encoding:in-reply-to:from:references: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=D8V5GNXIledfKpXRFYA3XAZi19TXM/o3MANiw4Ok4RI=; b=EmIaKla7142scWQ2zPotggErjZd2olvRuxpMTEYiLqyciFzRuVhOQOi8vcUmuHhNoe Vq4RAzTo+2yfwse+RswBke1n4ZS0r5rQZcw0P3kwUGZ0kleTCscHvXamAME8r8J070jv LUs+FgldQpsXPLw5RFz57kH2daTSAj0snZ5vgeSYnlEVsCmU1LzSYK/Faj2O5va/yVu4 K9h/rTCyieE2rgGtr3xqoeR5krzZfAHsHLrU/pL0nHCvE+R/F4l2cD+73cXtZmNxH3or +HuDBbwElWxFnoZb1fh9t2DHKZ35nLRhkODvBIsE198tfGpVNWNZZr8uZ03csmlJhPIL Mavg== X-Gm-Message-State: AOJu0YxLIOEBKCZuxuVwMzNffRAdokyTNwi25EjNPqNPD5ppajqFXfZP 2n8aDbgfBmrcv0vJizWOTLCLBmIPdzA= X-Google-Smtp-Source: AGHT+IGpV/j2oPbcTwT21UiToBBBAntE02CmcquF/I3ruPTaUdnS6e4m4aAdUwFmGOQ2DtswotGXBA== X-Received: by 2002:a05:6e02:1b07:b0:35d:5995:798a with SMTP id i7-20020a056e021b0700b0035d5995798amr27105602ilv.36.1703050132339; Tue, 19 Dec 2023 21:28:52 -0800 (PST) Received: from [172.31.0.109] ([136.36.72.243]) by smtp.gmail.com with ESMTPSA id 6-20020a056e0216c600b0035d55159172sm7827047ilx.9.2023.12.19.21.28.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 19 Dec 2023 21:28:51 -0800 (PST) Message-ID: <5098d3c3-845f-4b71-ba8f-751b03b73240@gmail.com> Date: Tue, 19 Dec 2023 22:28:50 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 1/3] RISC-V: movmem for RISCV with V extension Content-Language: en-US To: Sergei Lewis , gcc-patches@gcc.gnu.org References: <20231219095348.356551-1-slewis@rivosinc.com> <20231219095348.356551-2-slewis@rivosinc.com> From: Jeff Law In-Reply-To: <20231219095348.356551-2-slewis@rivosinc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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,KAM_SHORT,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/19/23 02:53, Sergei Lewis wrote: > gcc/ChangeLog > > * config/riscv/riscv.md (movmem): Use riscv_vector::expand_block_move, > if and only if we know the entire operation can be performed using one vector > load followed by one vector store > > gcc/testsuite/ChangeLog > > PR target/112109 > * gcc.target/riscv/rvv/base/movmem-1.c: New test So this needs to be regression tested. Given that it only affects RVV, I would suggest testing rv64gcv or rv32gcv. > +(define_expand "movmem" > + [(parallel [(set (match_operand:BLK 0 "general_operand") > + (match_operand:BLK 1 "general_operand")) > + (use (match_operand:P 2 "const_int_operand")) > + (use (match_operand:SI 3 "const_int_operand"))])] > + "TARGET_VECTOR" > +{ > + if ((INTVAL (operands[2]) >= TARGET_MIN_VLEN/8) > + && (INTVAL (operands[2]) <= TARGET_MIN_VLEN) > + && riscv_vector::expand_block_move (operands[0], operands[1], > + operands[2])) > + DONE; > + else > + FAIL; > +}) Just a formatting nit. A space on each side of the '/' operator above. Jeff