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 DEB0B3858C83 for ; Fri, 21 Apr 2023 19:56:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DEB0B3858C83 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 d2e1a72fcca58-63b4bf2d74aso2157451b3a.2 for ; Fri, 21 Apr 2023 12:56:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682107007; x=1684699007; 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=jYl+7kWsJtj2Hove/uMDLqbC04unbxrZ2FmRkF7OdRs=; b=iKg3uKVirmyJFnDpRmrKNbbpPhVTAJsPQVdtyj24wLJfyBupHvLoUHxTRSU9p/fpLA azg1sXtnPDHpYtNfUmaMADDHc4gFlcy0rjzayD2NxJavnUiZXjqlcctkw/BdMzf8nPz+ 9UQTvrV1+4OM+1kZEKWRSvDeKGH/NV3kxkR+NdKLM4SAl7zT5BMPfZbSH2FuNREhNoVC 24ezXtiXA34NVH78TENbzyY/qOyzkYPpYLFyW10KHzMWAI26UrDp+rGXHyAv604pPPc7 YSNy37p9FUyDCfG42wx7iattxsWI0lvgeR9SuSpoHX+5lgyRnfbNKL7alewhCsZ+kgBm BppA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682107007; x=1684699007; 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=jYl+7kWsJtj2Hove/uMDLqbC04unbxrZ2FmRkF7OdRs=; b=G0Q+oemEdoKPgLmDST4QXg6mAykU/coCN9SghSPM86Syi+dVtyIwKhxT2zPHrzxTrB rA7kAlh/VIYqs/s3DxHI15KySfYYhdvN2eKNbOxvIv+fU3zLRDJVNjB/JIdnTRfbQMMZ N7jVSgWY2CyE4GvvJ3ONn/LIPoYum0Tl2ydw9g7XaC9ez+xPVRrrzOsrqJp/stnQyaUg xmqdz/5teuWeCHIPwMngWvakPL6RKXLMFYlfCIEkOH1tlDhBoNQmDPxzuY2bAOxmT5St Scx1DFWrMVc+Ah+cxzWCPuPDwtHTbbRrfQrVFyWh/sHRKswTp2FzbRGHAxKtAS94S7m7 xwDA== X-Gm-Message-State: AAQBX9emDAkfiTcvVbUrwktkh8aZDKCzLSYSCW9KdlXiBbxBSaEEFxHp n+GEIg+aVHiDPpfa4bGKZ4A= X-Google-Smtp-Source: AKy350a7m7KpDkBp9Bh4PHgOBhJ165FmMPQ4AJAlIQCX5nK00iZzk/a4TnjfY5rU9yvNRVRlnEW/ag== X-Received: by 2002:a05:6a00:1350:b0:627:e69c:8488 with SMTP id k16-20020a056a00135000b00627e69c8488mr8147614pfu.14.1682107006670; Fri, 21 Apr 2023 12:56:46 -0700 (PDT) Received: from ?IPV6:2601:681:8600:13d0::99f? ([2601:681:8600:13d0::99f]) by smtp.gmail.com with ESMTPSA id fb31-20020a056a002d9f00b005e5b11335b3sm3363388pfb.57.2023.04.21.12.56.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 21 Apr 2023 12:56:46 -0700 (PDT) Message-ID: <1d8fed1a-c316-28c1-1f96-5ede3ed5dd05@gmail.com> Date: Fri, 21 Apr 2023 13:56:44 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [RFC PATCH v1 07/10] RISC-V: Recognize bexti in negated if-conversion Content-Language: en-US To: Philipp Tomsich , gcc-patches@gcc.gnu.org Cc: Kito Cheng , Christoph Muellner , Palmer Dabbelt , Andrew Waterman , Vineet Gupta References: <20230210224150.2801962-1-philipp.tomsich@vrull.eu> <20230210224150.2801962-8-philipp.tomsich@vrull.eu> From: Jeff Law In-Reply-To: <20230210224150.2801962-8-philipp.tomsich@vrull.eu> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A,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 2/10/23 15:41, Philipp Tomsich wrote: > While the positive case "if ((bits >> SHAMT) & 1)" for SHAMT 0..10 can > trigger conversion into efficient branchless sequences > - with Zbs (bexti + neg + and) > - with Zicond (andi + czero.nez) > the inverted/negated case results in > andi a5,a0,1024 > seqz a5,a5 > neg a5,a5 > and a5,a5,a1 > due to how the sequence presents to the combine pass. > > This adds an additional splitter to reassociate the polarity reversed > case into bexti + addi, if Zbs is present. > > gcc/ChangeLog: > > * config/riscv/zicond.md: Add split to reassociate > "andi + seqz + neg" into "bexti + addi". OK. jeff