From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yb1-xb2f.google.com (mail-yb1-xb2f.google.com [IPv6:2607:f8b0:4864:20::b2f]) by sourceware.org (Postfix) with ESMTPS id 093123858D33 for ; Sun, 8 Jan 2023 22:16:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 093123858D33 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-yb1-xb2f.google.com with SMTP id t15so7057518ybq.4 for ; Sun, 08 Jan 2023 14:16:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=kecaFoS1QXHpWsEgnmQbT2y7ttSKX3dwwdcs26+rASI=; b=eAylcp2USHrrV6r9RNXolCG77ynqa2XXQI+bx59GZWQDvwFr3N6hcX3bWsOaFSnD5i tD4ez4nn/QTc8qpGqbQIjUyiUvz+43E5jy/uXg44XnhrnaRFegt1SOjg+2VgHY9gEThy Xq13gB+yWiKtfoiqCaXoyFfAYnqWcUZ/hXunpYCnYzdrKE0RWbai0YIorC927Zq3oR8v ucplDiDrMeIlEV7dLbPlONfs5TJ3rs/BlTcZ03ETN4wCG6CE/WhfhD3Wm9Opc2U7M693 VYfWhQXc4dHmwI5VnAy6v7UjZDisJXQ5SWMG7cNGRImWganqOVDNjsC7XTlcV11jXqUb Zj4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=kecaFoS1QXHpWsEgnmQbT2y7ttSKX3dwwdcs26+rASI=; b=zWhEFGdymhxY2svUsGpchf/sTi/cyHIi+f/5nTh79PIKxHnSTg2GzC36FkHXu2HGIo ZtRC+vixDfLTyIaL264UbY59ncd31zaIsU7oZVP/zmCQiaIJOSgIK/a4y3oh6VXSA7bK zqpz+cVOzeVYBZgpd0hA7HxlIK6tGGR7slb90RFbwSBxxidFLGpGCyBMpxyso3tu7D0g 04+1V1NEvDjLyi9JA9GY2vUz/dpZIjeLk7bq+zlG5C5KHOFY8TWJA2DTyntJM8kxrtIr NyiJ2lF0hdMJ2zZpI7dO+hl7jmjAB7aHb9NYJ/vCW/q8pE2LLRDdNSuiox1x/KnOZ1L4 77ug== X-Gm-Message-State: AFqh2kpYABbpGxfZ88/eljLsXW6jU4v3BGNrgzBnd3eimcKFv8EZImSa GvqS2tNGXGQf26TFhRck9Ib79xMo9zPSLIkmQnw= X-Google-Smtp-Source: AMrXdXuEOZqblSOjhaOiKuG0tieOmZZccwykvvWpAecPLaZic9o10Qwse8TAL8ynO03trZmdJpV+toS3bVArgrk4Gwc= X-Received: by 2002:a25:1581:0:b0:6f9:91bd:c5de with SMTP id 123-20020a251581000000b006f991bdc5demr6788855ybv.497.1673216203356; Sun, 08 Jan 2023 14:16:43 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Max Filippov Date: Sun, 8 Jan 2023 14:16:32 -0800 Message-ID: Subject: Re: [PATCH v2] xtensa: Optimize bitwise splicing operation To: "Takayuki 'January June' Suwa" Cc: GCC Patches Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=0.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,FROM_LOCAL_NOVOWEL,HK_RANDOM_ENVFROM,HK_RANDOM_FROM,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: On Sat, Jan 7, 2023 at 9:04 PM Takayuki 'January June' Suwa wrote: > > This patch optimizes the operation of cutting and splicing two register > values at a specified bit position, in other words, combining (bitwise > ORing) bits 0 through (C-1) of the register with bits C through 31 > of the other, where C is the specified immediate integer 17 through 31. > > This typically applies to signed copy of floating point number and > __builtin_return_address() if the windowed register ABI, and saves one > instruction compared to four shifts and a bitwise OR by the default RTL > combination pass. > > gcc/ChangeLog: > > * config/xtensa/xtensa.md (*splice_bits): > New insn_and_split pattern. > --- > gcc/config/xtensa/xtensa.md | 47 +++++++++++++++++++++++++++++++++++++ > 1 file changed, 47 insertions(+) Regtested for target=xtensa-linux-uclibc, no new regressions. Committed to master. -- Thanks. -- Max