From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id A206F3858280 for ; Wed, 2 Aug 2023 08:46:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A206F3858280 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 D3B6B1F894; Wed, 2 Aug 2023 08:46:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1690965998; 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=kGKvkcch7QbJQBHpk+gOes0yumYoq/Mcjjutrf7X6wc=; b=sSzOVMypTwvbFxa7qDsuMggyn3IIMDfuui2A25v87zCxygQnkxfYBaDaC7kXSb8gS23ccw /wieLHaMhwdcSvbWDFY5AV3rJe4wxNhTayQtFDhzBHGeeambdKhzoLIpDs3Mej51Gkb/+f 1P5bI4cW9FcJ+BMPTuO1akEPlIz1nbQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1690965998; 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=kGKvkcch7QbJQBHpk+gOes0yumYoq/Mcjjutrf7X6wc=; b=z4c8wiDHqvqn8/gthzj4PzEHQBoVorNQBDHEioY1PD2D4xRSzCPM1Y/Z+j6XBLKFoxTUbk vpNCH9FOoArROaDg== 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 C94062C142; Wed, 2 Aug 2023 08:46:38 +0000 (UTC) Date: Wed, 2 Aug 2023 08:46:38 +0000 (UTC) From: Richard Biener To: Jeff Law cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH][RFC] tree-optimization/92335 - Improve sinking heuristics for vectorization In-Reply-To: <320f94c3-8805-ec64-dd4b-0454c8ecce14@gmail.com> Message-ID: References: <20230728070552.50C1413276@imap2.suse-dmz.suse.de> <320f94c3-8805-ec64-dd4b-0454c8ecce14@gmail.com> 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,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 Mon, 31 Jul 2023, Jeff Law wrote: > > > On 7/28/23 01:05, Richard Biener via Gcc-patches wrote: > > The following delays sinking of loads within the same innermost > > loop when it was unconditional before. That's a not uncommon > > issue preventing vectorization when masked loads are not available. > > > > Bootstrapped and tested on x86_64-unknown-linux-gnu. > > > > I have a followup patch improving sinking that without this would > > cause more of the problematic sinking - now that we have a second > > sink pass after loop opts this looks like a reasonable approach? > > > > OK? > > > > Thanks, > > Richard. > > > > PR tree-optimization/92335 > > * tree-ssa-sink.cc (select_best_block): Before loop > > optimizations avoid sinking unconditional loads/stores > > in innermost loops to conditional executed places. > > > > * gcc.dg/tree-ssa/ssa-sink-10.c: Disable vectorizing. > > * gcc.dg/tree-ssa/predcom-9.c: Clone from ssa-sink-10.c, > > expect predictive commoning to happen instead of sinking. > > * gcc.dg/vect/pr65947-3.c: Adjust. > I think it's reasonable -- there's probably going to be cases where it's not > great, but more often than not I think it's going to be a reasonable > heuristic. > > If there is undesirable fallout, better to find it over the coming months than > next spring. So I'd suggest we go forward now to give more time to find any > pathological cases (if they exist). Agreed, I've pushed this now. Richard.