From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by sourceware.org (Postfix) with ESMTPS id 7D8213858D1E for ; Mon, 14 Nov 2022 16:51:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7D8213858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pf1-x42d.google.com with SMTP id k22so11551939pfd.3 for ; Mon, 14 Nov 2022 08:51:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=aELJR6VppwPe/MOmVpA87qxUjCoXjze7Awtoj2VBLns=; b=aeWZacS27hz1Yfl3veeS+383wG5Df6q7hdEMZ6Vt37+TNtXQ4xN8T2lPxdBD8Pr5qd OcY4NRV7chf8USaVxPtSY+3tfWAhSxT0QsZtUannp/s5RJ8KMxV2nue0x/V7NwdtqYGA PKi56k2jM8jYaEQ0w7NpV3ov207185MWZjpoLAgIHpMetnVsQ9QbsVnJ4n6RrCJuloGj GMtga195jbm1ytPbRctZ4NUCbFwXycxbarXjP2EcULVP9/OKVG5Zg3pjYXNeAYr1jAqN 2HwrBJzAVltSyAhVV8d/I6gM/TkFouaJDWON/VK9NtYV0lPAbBu7V1RSWh1naLOY14Qf cQ4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=aELJR6VppwPe/MOmVpA87qxUjCoXjze7Awtoj2VBLns=; b=UXbBPa4H3Hq/AEvrV5EWTAFYdMjbTdyHYyN8tslOU/1T4xdpsYmGKnsXywMzkbEhkL zw9lk+dIHcfdbeNHNHoZj3cxJbAP7UF4rd07bpvA64rsrs/FZWs01mB17PKlIZ+cgUhu Sz3eeMqINzbxhoclB2SYzKRqd6HKcqy2YS1tAXQqZxNLEOx3VvTAQgO8Y8CpfUhKOKYs lcaWVf9qxlx0/luOFd3pBMDMyTZuwgdX5eVSEtPxHWUyDz9xxaOsa9fjRFMAFQagStdr 8gMm8gAsAtINEV/RyMdbrovEJc4THb+GxTWDGZqtmTBIqDJklOAtq9C6BDXoM/iXO+nb 8qQQ== X-Gm-Message-State: ANoB5pmDzBVC+fuGfwM/rOB2BVpA2UnIhCWa9p8R6QBbxWkNUaXnKk/k tk8g1A9MoNkaGNH3HgHntWw= X-Google-Smtp-Source: AA0mqf5SQyOwszgftuAXNtgOpZBMMhQFWlAtmlMMflENqduvYQMmKEM/zD0xExzTfNIQmpX605fmUg== X-Received: by 2002:a63:b23:0:b0:46f:cec6:8805 with SMTP id 35-20020a630b23000000b0046fcec68805mr12519870pgl.612.1668444670347; Mon, 14 Nov 2022 08:51:10 -0800 (PST) Received: from ?IPV6:2601:681:8600:13d0::f0a? ([2601:681:8600:13d0::f0a]) by smtp.gmail.com with ESMTPSA id y15-20020a17090322cf00b0018658badef3sm7849264plg.232.2022.11.14.08.51.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 14 Nov 2022 08:51:09 -0800 (PST) Message-ID: <15ccec02-5467-81aa-89b7-d75a7aa778c2@gmail.com> Date: Mon, 14 Nov 2022 09:51:06 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: [PATCH 1/7] riscv: bitmanip: add orc.b as an unspec Content-Language: en-US To: Christoph Muellner , gcc-patches@gcc.gnu.org, Kito Cheng , Jim Wilson , Palmer Dabbelt , Andrew Waterman , Philipp Tomsich , Vineet Gupta References: <20221113230521.712693-1-christoph.muellner@vrull.eu> <20221113230521.712693-2-christoph.muellner@vrull.eu> From: Jeff Law In-Reply-To: <20221113230521.712693-2-christoph.muellner@vrull.eu> 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_MANYTO,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP 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 11/13/22 16:05, Christoph Muellner wrote: > From: Philipp Tomsich > > As a basis for optimized string functions (e.g., the by-pieces > implementations), we need orc.b available. This adds orc.b as an > unspec, so we can expand to it. > > gcc/ChangeLog: > > * config/riscv/bitmanip.md (orcb2): Add orc.b as an > unspec. > * config/riscv/riscv.md: Add UNSPEC_ORC_B. In general, we should prefer to express things as "real" RTL rather than UNSPECS.  In this particular case expressing the orc could be done with a handful of IOR expressions, though they'd probably need to reference byte SUBREGs of the input and I dislike explicit SUBREGs in the md file even more than UNSPECs.  So.... OK. Jeff ps.  We could consider this a reduc_ior_scal insn, but that may be actively harmful.  Having vector ops on the general and vector registers is a wart I hope we can avoid.