From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by sourceware.org (Postfix) with ESMTP id 7FB2C3858D20 for ; Mon, 12 Jun 2023 12:52:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7FB2C3858D20 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.crashing.org Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 35CCpI1E023232; Mon, 12 Jun 2023 07:51:19 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 35CCpIHn023227; Mon, 12 Jun 2023 07:51:18 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Mon, 12 Jun 2023 07:51:18 -0500 From: Segher Boessenkool To: Ajit Agarwal Cc: gcc-patches , bergner@linux.ibm.com Subject: Re: [PATCH v2] rs6000: fmr gets used instead of faster xxlor [PR93571] Message-ID: <20230612125118.GS19790@gate.crashing.org> References: <174972e2-3792-935b-ed4e-4e9d3d4ec26a@linux.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <174972e2-3792-935b-ed4e-4e9d3d4ec26a@linux.ibm.com> User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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: Hi! On Sat, Feb 25, 2023 at 03:20:33PM +0530, Ajit Agarwal wrote: > Here is the patch that uses xxlor instead of fmr where possible. > Performance results shows that fmr is better in power9 and > power10 architectures whereas xxlor is better in power7 and > power 8 architectures. fmr is the only option before p7. > ;; The ISA we implement. > -(define_attr "isa" "any,p5,p6,p7,p7v,p8v,p9,p9v,p9kf,p9tf,p10" > +(define_attr "isa" "any,p5,p6,p7,p7v,p8v,p7p8v,p9,p9v,p9kf,p9tf,p10" > (const_string "any")) This isn't really about what insn we *can* use here. > + (and (eq_attr "isa" "p7p8v") > + (match_test "TARGET_VSX && !TARGET_P9_VECTOR")) > + (const_int 1) What is needed here is test the *tune* setting. For example if someone uses -mcpu=power8 -mtune=power9 (this is a setting that is really used, or was a few years ago anyway) you *do* want fmr insns generated. So don't do this via the isa attribute at all, just add some insn condition (testing the tune setting)? Segher