From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by sourceware.org (Postfix) with ESMTPS id 3D84C39540BB for ; Wed, 16 Nov 2022 03:45:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3D84C39540BB 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-pj1-x1034.google.com with SMTP id e7-20020a17090a77c700b00216928a3917so1061378pjs.4 for ; Tue, 15 Nov 2022 19:45:47 -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:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=SgCB59Jc486v2XyJo9foC3/4wRhfT6IsK0mYevYn3v0=; b=quUrrZ1gA4QdbR7cWefepedc11PHDHtH5fQnyO3c5sPjyYTgczLNc03WAFftHVS7xH P9t/MD9jx7a6BbGUU8NKhkK8jtwMDGi48J81Qkfb9tGKDT7WbPmUMw4Jot3jO5clJ9wd ybBa7CzwfvnMaLJAxOIU3zs0T0BEBitHYxRLD4GVGaKRnyH/7sly5elb2cupBupO8r3Q Ctohi1iaw2UrUjPy3Pe93pA0fFY99Ea2/3SeSczxmgUkn6hK+yu1ZhEyjQdO2Dix5IBB mdZ1Z6VWkBkOY0YLPt0+FNn2P0XFIcYESvz3j6Xf87lOE9ETHi8Z4t9xhiVI2iT1I+xe 5oEA== 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: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=SgCB59Jc486v2XyJo9foC3/4wRhfT6IsK0mYevYn3v0=; b=jfrL7Qi60WTMBZWuaTnYxljjxFC3r0k4u9YOSPZkMO5NMaknUy0reFXp2M8lV911gQ BjlDd4Ed60SHEIFczu0TqxZKPQWu+hS7mQ4a71Yaefp5auky1Qkipnakk2N4sCpGJUH8 mkUrw5+oTS2ot3hkV7MCaYntQGJLzui3IkUQInp36/gcrVsgy+rWz8Sta7q9WAn03Jar L4RQwM65lBuWgK8Aye5RoML97JspdWvWkwRIi1Hj8q4OsTuV48dI5RUMKAZFjCYqw2sT EymedghP3vujvUs339P4fggvZ45wKyg+zH7QSSnnd4IrW13mvwx5q38J0Vt3TmVw31VE BEuQ== X-Gm-Message-State: ANoB5pkCKNrjwqHXBGNIbnIMZdzy8vEU0i8YRCHWDqfFCCg2tLxksBvb +7E0hzqmsCEyv+E3QaaVTBNQlqgvIYE= X-Google-Smtp-Source: AA0mqf5GxBSpxqgHt4V3H+OzdCD29kQNLLj0qFbnitjcLAcmOUOaqP/ftrSS6UkmdqVhh0cwJp6ouQ== X-Received: by 2002:a17:902:d64a:b0:186:df61:4693 with SMTP id y10-20020a170902d64a00b00186df614693mr6727745plh.173.1668570346192; Tue, 15 Nov 2022 19:45:46 -0800 (PST) Received: from ?IPV6:2601:681:8600:13d0::f0a? ([2601:681:8600:13d0::f0a]) by smtp.gmail.com with ESMTPSA id o15-20020a170902d4cf00b00174c0dd29f0sm10913062plg.144.2022.11.15.19.45.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 15 Nov 2022 19:45:45 -0800 (PST) Message-ID: <1c091d0d-e355-8fd8-8c6b-1bfe77f20291@gmail.com> Date: Tue, 15 Nov 2022 20:45:43 -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] RISC-V: Use binvi to cover more immediates than with xori alone Content-Language: en-US To: Philipp Tomsich , gcc-patches@gcc.gnu.org Cc: Kito Cheng , Christoph Muellner , Vineet Gupta , Jeff Law , Palmer Dabbelt References: <20221110213501.3592470-1-philipp.tomsich@vrull.eu> From: Jeff Law In-Reply-To: <20221110213501.3592470-1-philipp.tomsich@vrull.eu> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_SHORT,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/10/22 14:35, Philipp Tomsich wrote: > Sequences of the form "a ^ C" with C being the positive half of a > signed immediate's range with one extra bit set in addtion are mapped > to xori and one binvi to avoid using a temporary (and a multi-insn > sequence to load C into that temporary). > > gcc/ChangeLog: > > * config/riscv/bitmanip.md (*binvi_extrabit): New pattern. > > gcc/testsuite/ChangeLog: > > * gcc.target/riscv/zbs-binvi.c: New test. Could this have been potentially done by extending the ior pattern with a code iterator that covered IOR/XOR? Not a big deal, but if it'd work, consider to avoid the pattern duplication. OK. jeff