From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by sourceware.org (Postfix) with ESMTPS id 49C0D3858D28 for ; Tue, 5 Sep 2023 21:59:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 49C0D3858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=vrull.eu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=vrull.eu Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-522bd411679so4299742a12.0 for ; Tue, 05 Sep 2023 14:59:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vrull.eu; s=google; t=1693951165; x=1694555965; darn=gcc.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=CNI3r0+kThbaC+/WqTuKRqgzEDKaZVvlwfZ7Ylqdgj0=; b=SuwyH1q0GyM8WBhducPvTAgmNEleIGBHPMtL93mHRNkOiUmxVFqbqRX9qIpR+z361d WB5BhJ1LRTgUX3j81BBGq21rg66YrCq/pQmBA2LRqhY8GiA0QiT0p60kz6vttlVaYvP8 axDIJdfEuwdutwXc+zuJGXVqAbjTfHmhKKpDCPGRLL7bsT5AR5+af1l1szb12Xqhgwu0 6dWVI+DqAPJ7c2gpn70dAbf2Oe+lIXsnrI4g4FFxxSswlDchUlryPe75rF4dc2BYI+AF Q5TkateM5RXSg2e7OslBwe0pq2nWmioMGi6Gq9qlcJO/o2XvoYjnCeEdVOTo7GzqOd2q mTkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693951165; x=1694555965; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=CNI3r0+kThbaC+/WqTuKRqgzEDKaZVvlwfZ7Ylqdgj0=; b=KQTTKLT9/Pm28gf5YSvwPWYRrNbCoie07NNVqy+tnsEELvrnpzx30vX0C++/kO+5b3 17kZNuqOaRNCvyXP7nS9cnC6KxvnD+423j6phkdx3z517DWIoQmmq5SoO2SJfiosldoo tWeYZteByQEQjV82VeaiRKLuq2hxBXwQtM2G65hueNyJ+sfoWdoNT13uV6b0qqFvM69E lmQq2iRTq6WUdIAMITWhxu+nxPA9o8yj5gnxydSw8xg9u40t8O6L3zMcoaPVLUo6LI99 gOpIQ5R7PJzahvoIeFQTUIyu5TWZfMVlknSayBiooFIn0eEdgJhA+J25TnrPM1JiZPUJ zwsQ== X-Gm-Message-State: AOJu0YyVa9gvmHtl+XQuSYdLUnXaN7eOSkuS9xEbk4Jc5CSg+HgisZeN XGjFoPC7EplzOz4/FWS8CVMs/cfIjdUy2ldHIpoLgQ== X-Google-Smtp-Source: AGHT+IGqYIEM/UuWdSCB47g5S2Z0rQ3X71tLBfDgPnBlKXDotmdFJvNPuVgu839n9egwes1dO/hJlKn/qpUeMjAG+BI= X-Received: by 2002:a50:fc17:0:b0:52e:585a:e96 with SMTP id i23-20020a50fc17000000b0052e585a0e96mr839501edr.7.1693951164929; Tue, 05 Sep 2023 14:59:24 -0700 (PDT) MIME-Version: 1.0 References: <20230905211559.2871358-1-christoph.muellner@vrull.eu> <116ee849-d822-4467-af87-9f74b5a1a211@gmail.com> In-Reply-To: <116ee849-d822-4467-af87-9f74b5a1a211@gmail.com> From: Philipp Tomsich Date: Tue, 5 Sep 2023 23:59:14 +0200 Message-ID: Subject: Re: [PATCH] riscv: Synthesize all 11-bit-rotate constants with rori To: Jeff Law Cc: Christoph Muellner , gcc-patches@gcc.gnu.org, Kito Cheng , Jim Wilson , Palmer Dabbelt , Andrew Waterman Content-Type: multipart/alternative; boundary="00000000000073eb090604a3bd75" X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,JMQ_SPF_NEUTRAL,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --00000000000073eb090604a3bd75 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Applied to master. Thanks! Philipp. On Tue, 5 Sept 2023 at 23:57, Jeff Law wrote: > > > On 9/5/23 15:15, Christoph Muellner wrote: > > From: Christoph M=C3=BCllner > > > > Some constants can be built up using LI+RORI instructions. > > The current implementation requires one of the upper 32-bits > > to be a zero bit, which is not neccesary. > > Let's drop this requirement in order to be able to synthesize > > a constant like 0xffffffff00ffffffL. > > > > The tests for LI+RORI are made more strict to detect regression > > in the calculation of the LI constant and the rotation amount. > > > > Signed-off-by: Christoph M=C3=BCllner > > > > gcc/ChangeLog: > > > > * config/riscv/riscv.cc (riscv_build_integer_1): Don't > > require one zero bit in the upper 32 bits for LI+RORI synthesis. > > > > gcc/testsuite/ChangeLog: > > > > * gcc.target/riscv/xtheadbb-li-rotr.c: New tests. > > * gcc.target/riscv/zbb-li-rotr.c: Likewise. > OK > jeff > --00000000000073eb090604a3bd75--