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 C6E2A388A41B for ; Wed, 25 Nov 2020 15:43:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C6E2A388A41B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=segher@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 0APFgN5k002567; Wed, 25 Nov 2020 09:42:23 -0600 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 0APFgMvS002566; Wed, 25 Nov 2020 09:42:22 -0600 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Wed, 25 Nov 2020 09:42:22 -0600 From: Segher Boessenkool To: "Kewen.Lin" Cc: GCC Patches , Bill Schmidt , David Edelsohn Subject: Re: [PATCH] rs6000: Set param_vect_partial_vector_usage as 1 for P10 Message-ID: <20201125154222.GB2672@gate.crashing.org> References: <0aa7e42e-5f75-388c-fc95-b326632dcf41@linux.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0aa7e42e-5f75-388c-fc95-b326632dcf41@linux.ibm.com> User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, KAM_NUMSUBJECT, TXREP, T_SPF_HELO_PERMERROR, T_SPF_PERMERROR autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2020 15:43:26 -0000 Hi! On Wed, Nov 25, 2020 at 02:02:16PM +0800, Kewen.Lin wrote: > This patch is to set param_vect_partial_vector_usage as 1 on P10 > by default. Due to the unexpected performance on Power9 of those > vector with length instructions, we didn't enable vectorization > with partial vectors before. Some recent testings show that they > perform expectedly on Power10 now. The performance evaluation > on the whole SPEC2017 with latest trunk and option set power10/ > Ofast/unroll shows it can speed up 525.x264_r by 10.80% and > 554.roms_r by 1.94%. One remarkable degradation is 523.xalancbmk_r > -1.79% but it's identified not directly related to this enablement > by some investigation. > + if (TARGET_POWER10) > + SET_OPTION_IF_UNSET (&global_options, &global_options_set, > + param_vect_partial_vector_usage, 1); > + else > + /* Disable it on the default supported hardware Power9 since > + lxvl/stxvl have unexpected performance behaviors. */ > + SET_OPTION_IF_UNSET (&global_options, &global_options_set, > + param_vect_partial_vector_usage, 0); Maybe write this like /* The lxvl/stxvl instructions don't perform well before Power10. */ if (TARGET_POWER10) SET_OPTION_IF_UNSET (&global_options, &global_options_set, param_vect_partial_vector_usage, 1); else SET_OPTION_IF_UNSET (&global_options, &global_options_set, param_vect_partial_vector_usage, 0); Okay for trunk with such a comment (before the "if"). Thanks! Segher