From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by sourceware.org (Postfix) with ESMTPS id 69E473858D3C for ; Fri, 26 May 2023 06:46:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 69E473858D3C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 76DC41FDD4; Fri, 26 May 2023 06:46:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1685083566; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=BzpfFeQOTYgjeC8H1Dq+ex+JZ/SkZ6JxGRm1Vg0CemM=; b=axkjlO8zxs5UwlSeA/sFD8RMOWIpd8FbyHRAHpBRXDhKYIgE8zyzHXXPOl+e6+f/k+ToS5 0AiUwKnJmpjx5zcAlvli7U8MLyLjgQ88Bxf7G3XaLfBplcWMfVR42KanUGWsVPrqU40BH+ GpJBWVEHIIfdSZuFAf8+7MgJiMxhub8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1685083566; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=BzpfFeQOTYgjeC8H1Dq+ex+JZ/SkZ6JxGRm1Vg0CemM=; b=lPXaAn717qxfIXk/KkR2fEa7/CpcjwmEnUqmSkUZHs7CdeFHWyPV5naLpiHqGwwCMCaaoR /GPGNjUNiERAcaBA== Received: from wotan.suse.de (wotan.suse.de [10.160.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 08FD92C141; Fri, 26 May 2023 06:46:06 +0000 (UTC) Date: Fri, 26 May 2023 06:46:05 +0000 (UTC) From: Richard Biener To: =?GB2312?B?1tO+09Xc?= cc: gcc-patches , "richard.sandiford" , linkw Subject: Re: decremnt IV patch create fails on PowerPC In-Reply-To: Message-ID: References: User-Agent: Alpine 2.22 (LSU 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_SHORT,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 Fri, 26 May 2023, ??? wrote: > Yesterday's patch has been approved (decremnt IV support): > https://gcc.gnu.org/pipermail/gcc-patches/2023-May/619663.html > > However, it creates fails on PowerPC: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109971 > > I am really sorry for causing inconvinience. > > I wonder as we disccussed: > + /* If we're vectorizing a loop that uses length "controls" and > + can iterate more than once, we apply decrementing IV approach > + in loop control. */ > + if (LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P (loop_vinfo) > + && !LOOP_VINFO_LENS (loop_vinfo).is_empty () > + && LOOP_VINFO_PARTIAL_LOAD_STORE_BIAS (loop_vinfo) == 0 > + && !(LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo) > + && known_le (LOOP_VINFO_INT_NITERS (loop_vinfo), > + LOOP_VINFO_VECT_FACTOR (loop_vinfo)))) > + LOOP_VINFO_USING_DECREMENTING_IV_P (loop_vinfo) = true; > > This conditions can not disable decrement IV on PowerPC. > Should I add a target hook for it? No. I've put some analysis in the PR. To me the question is why (without that SELECT_VL case) we need a decrementing IV _for the loop control_? We could simply retain the original incrementing IV for loop control and add the decrementing IV for computing LEN in addition to that and leave IVOPTs sorting out to eventually merge them (or not). Alternatively avoid the variable decrement as I wrote in the PR and do the exit test based on the previous IV value. But as said all this won't work for the SELECT_VL case, but then it's availability is something to key off rather than a new target hook? > The patch I can only do bootstrap and regression on X86. > I didn't have an environment to test PowerPC. I am really sorry. You can do some testing with a cross compiler, alternatively there are powerpc machines in the GCC compile farm. Richard.