From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd36.google.com (mail-io1-xd36.google.com [IPv6:2607:f8b0:4864:20::d36]) by sourceware.org (Postfix) with ESMTPS id 0F9793858C78 for ; Fri, 19 Jan 2024 17:56:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0F9793858C78 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 0F9793858C78 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::d36 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705686968; cv=none; b=vwRx7+1wqVtCOqPjqSr676UgK6UEywUkbIAVPBTDE40al/l0XvqbOGEsu9mwEjRhQi19N1DCwcsQB15D7EDK5uFkEpFV5da5QWlGlulsdx8PltDgI339Hu1Wjr2Lhhq7RsjQ1n7bAuFCrxojD1t4Hxo9Q8mfFxJXgo11GDzYgsU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705686968; c=relaxed/simple; bh=MKvi7OIMkMLGGNkE7QVGkhF2Z0PhqxM8+rIDSVf+tk4=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=IqSvoJ2kVu3Y7tUMWMdK6flr2xNTZXvMAkuqgiQg1w3mRwawsT3w1bDZRY14PLEyspVRa+66n7yRy9/Kaf2abPkbdWH7rZlfPvkcNbVKKkIDvsnMvI76UdGMWPTt6ousByRvb2weTJ9v25H7i7xNrjF2ttfp9LX99q5MgOLsxl8= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-io1-xd36.google.com with SMTP id ca18e2360f4ac-7bc332d49f6so35532539f.1 for ; Fri, 19 Jan 2024 09:56:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705686966; x=1706291766; 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=kcNKeKD6S+rE+JuISd+8l0/LCJUtarvFpRIl/gY9Kzw=; b=j47hzj/J3s+T4n/1e3F+Hi1sKYgzCcHaKL9B2ie1S9DR9Zrsnof090lqealdyJjZ0n wEGdRKZyQQyIgFk21DzjZEtrveYYHXsyGV1Fb86nPfrQL8XIM+2c5LqG6Z24ztLMeVOd +tHtCgZiMolA+Wwz9Y8JAjgoUNhnGaWFMiOUHH/jaWIc3DcFrjTLW+NM/WFlUkzhqlxK ZqeHma161V/bEAXI82EZmld0ZeLm+U+B6xIGEtLcx+9sxy5R+rSe/dqrDAOXN2hcz9Vb +CMGna+VzwUaDkwJvJ25pk1RAiLf8PxCiDuanfHtKnucM97qThZ9oKh2o9LLkmsc8ybt zU9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705686966; x=1706291766; 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=kcNKeKD6S+rE+JuISd+8l0/LCJUtarvFpRIl/gY9Kzw=; b=IwCPCzKgJ2S7H3fzFNkOtnI7ntjsYIu3WS60XadrXnSOpurub3qDv2zQk/qmj7t8gU zBEv3yRMccjY6iuJixc+wiCwLhYe+qrzNz6wL8DhBnuyniOFmFptuXaOCRzJvKH9aZhb 1Tfbcxl1O5woH2uFO0J4un+oWlkTRPhXaX1h+prMfG+0T+09dkCAAX7zSYfeRNtFaEQS 8qOtdexvrqU7DxOAebBK0RHJxWyAB5dY0wuEMBvjISGGLWYkgDj+RRhYohZOhVRtTd55 SyfNWVcaX1YJMeptrp9ljkgBHy4YeNzESFwisX8+dc9B/NzS379MqvZ+qbsPoteRtmwT xifQ== X-Gm-Message-State: AOJu0YwapXHPUPrzZvWXUswhcZrx9vTMiGhMOhU/YKVKHD41qzoNaThS kjdyjrY/T8S65Pth+yh38pseFggPP4rnnsj1GqyT1Ge/pCS6PMqLDckOlL6A X-Google-Smtp-Source: AGHT+IFk+rKqfK9vwRiNuIgzOqVmu6NvwdzWIJ+L6/L4pB5fwtnGaQKMjpQ4XLJ54xSQJUKC13nOlA== X-Received: by 2002:a05:6602:428b:b0:7be:e370:94a6 with SMTP id cd11-20020a056602428b00b007bee37094a6mr69938iob.15.1705686966079; Fri, 19 Jan 2024 09:56:06 -0800 (PST) Received: from [172.31.0.109] ([136.36.72.243]) by smtp.gmail.com with ESMTPSA id z7-20020a05660217c700b007bc3f75039dsm4565917iox.29.2024.01.19.09.56.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 19 Jan 2024 09:56:05 -0800 (PST) Message-ID: <34dd996f-c79e-4acb-a7be-be1fcc1916ab@gmail.com> Date: Fri, 19 Jan 2024 10:56:04 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] RISC-V: Add split pattern to generate SFB instructions. [PR113095] Content-Language: en-US To: Kito Cheng , Monk Chiang Cc: gcc-patches@gcc.gnu.org, rguenther@suse.de, apinski@marvell.com References: <20240119070540.95115-1-monk.chiang@sifive.com> From: Jeff Law In-Reply-To: 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,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 1/19/24 00:09, Kito Cheng wrote: > Thanks! generally LGTM, but I would wait one more week to see any > other comments :)Just a note. 113095 isn't marked as a regression, but it most definitely is a regression. So this meets the stage4 criteria. > > On Fri, Jan 19, 2024 at 3:05 PM Monk Chiang wrote: >> >> Since the match.pd transforms (zero_one == 0) ? y : z y, >> into ((typeof(y))zero_one * z) y. Add splitters to recongize >> this expression to generate SFB instructions. >> >> gcc/ChangeLog: >> PR target/113095 >> * config/riscv/sfb.md: New splitters to rewrite single bit >> sign extension as the condition to SFB instructions. >> >> gcc/testsuite/ChangeLog: >> * gcc.target/riscv/sfb.c: New test. I would probably suggest seeing if these still work when the NE nodes do not have a mode (ie, replace "ne:X" with just "ne". Our docs are a bit unclear on that topic IIRC and it looks like the RISC-V backend is inconsistent. More importantly, this message doesn't indicate if/how this patch was tested. Given it's conditional on SFB a bug here would be narrow, but we should still be doing a regression test. Jeff