From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by sourceware.org (Postfix) with ESMTPS id BA7CE3852C51 for ; Thu, 17 Nov 2022 22:49:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BA7CE3852C51 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-x42b.google.com with SMTP id y13so3182083pfp.7 for ; Thu, 17 Nov 2022 14:49:55 -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=ICtFv3fqxlcQdmn6o/lM9VbWyl3wApTjFay6vQo8h80=; b=AjP+y73LnuJwazLk6YQ2UNo6ez3b8EF1d/vP2O1n4QWX2a8VKUxssUu8cqgJq6pDM/ U+75wtp4heZfYNPsIUpmy+8DNzFL+sycvZ1+H0MnRyxquwznJux6kLWgjRYSpfGlusog ybE+dABcqufW2Rr9k8XafcfknOF58XrIMyqr7Qnc3ChK8hYeBcGGcmRYY5hih3FRxgj9 1UUkkrLV2gs4xWV7slCJ/+AHFEc0pdeuna2f5u6jZkNOep3P/Aqkmez666kD3ug6PBPy +IAHPOC5auHAZXQ6SlpUFf9S9pWQb6n/zgs/txFauOaq4etVSGK8HBqFp9pE0Knqrwt0 nqCA== 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=ICtFv3fqxlcQdmn6o/lM9VbWyl3wApTjFay6vQo8h80=; b=xXX1O6jZn83Sk+Ww9yocrI6rgLddq92/qDAPzE7Kc4uziE4KdBG4iz8mqh9HS1N3tx +Vdt/VTGRTKNFEJYZsRX9wYNbC+8lXXlOlkuj9vP3gyAxVWn9mPgVsToXwm+pkNwF+9v yFPxl1Uv0XyZJ/09xjDB55Kg/vlhqWOfKCsM6ON+kCpNOfoC9FH5600bR4mS6Jp0vKdm +ViLv1uM9+4NUFchNHFYkK3vscGTK8qosUS8gfkJ9G2+g4ylvM+SOxWdlTKo357FVWDe UJSDSlOkxfB6r3iIr0CbmvlNvoq4htkSahA2XVVzkq5zXlwpbqin+VGneewbZTv7neN2 R6hw== X-Gm-Message-State: ANoB5pmhmE/TIHRecfYyo7mrlrrT706VpuxTHZyzDzg/dY7UnHVT7w+m rhFO50zcIwgGpSJX5g3vPlU= X-Google-Smtp-Source: AA0mqf67vgsnd5w6ylBi0eDZiGwpvNSNmKuIKF+CwFHDimZkHjuqML15NZWdqoTGCrJ0ouzSvbKAVg== X-Received: by 2002:a63:2d45:0:b0:470:4f30:f743 with SMTP id t66-20020a632d45000000b004704f30f743mr4117060pgt.434.1668725394729; Thu, 17 Nov 2022 14:49:54 -0800 (PST) Received: from ?IPV6:2601:681:8600:13d0::f0a? ([2601:681:8600:13d0::f0a]) by smtp.gmail.com with ESMTPSA id i9-20020a17090332c900b00186b69157ecsm1939190plr.202.2022.11.17.14.49.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 17 Nov 2022 14:49:53 -0800 (PST) Message-ID: <50f3a0f1-7b6b-84b0-a9b4-6f44f5ec8bac@gmail.com> Date: Thu, 17 Nov 2022 15:49:52 -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 2/7] RISC-V: Generate vt.maskc on noce_try_store_flag_mask if-conversion Content-Language: en-US To: Philipp Tomsich , gcc-patches@gcc.gnu.org Cc: Vineet Gupta , Palmer Dabbelt , Christoph Muellner , Kito Cheng , Jeff Law References: <20221112212943.3068249-1-philipp.tomsich@vrull.eu> <20221112212943.3068249-3-philipp.tomsich@vrull.eu> From: Jeff Law In-Reply-To: <20221112212943.3068249-3-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/12/22 14:29, Philipp Tomsich wrote: > Adds a pattern to map the output of noce_try_store_flag_mask > if-conversion in the combiner onto vt.maskc; the input patterns > supported are similar to the following: > (set (reg/v/f:DI 75 [ ]) > (and:DI (neg:DI (ne:DI (reg:DI 82) > (const_int 0 [0]))) > (reg/v/f:DI 75 [ ]))) > > This reduces dynamic instruction counts for the perlbench-workload in > SPEC CPU2017 by 0.8230%, 0.4689%, and 0.2332% (respectively, for the > each of the 3 workloads in the 'ref'-workload). > > To ensure that the combine-pass doesn't get confused about > profitability, we recognize the idiom as requiring a single > instruction when the XVentanaCondOps extension is present. > > gcc/ChangeLog: > > * config/riscv/riscv.cc (riscv_rtx_costs): Recognize idiom for > vt.maskc as a single insn with TARGET_XVENTANACONDOPS. > * config/riscv/riscv.md: Include xventanacondops.md. > * config/riscv/xventanacondops.md: New file. > > gcc/testsuite/ChangeLog: > > * gcc.target/riscv/xventanacondops-ne-03.c: New test. > * gcc.target/riscv/xventanacondops-ne-04.c: New test. OK once we've cleared the non-technical hurdles to committing vendor specific extensions. Jeff