From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 1E702385800B for ; Mon, 5 Jul 2021 11:32:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1E702385800B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 06A4722709 for ; Mon, 5 Jul 2021 11:32:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1625484750; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type; bh=YQOo1eRaxzjgZojXLXRdKaeJVyvRrWQPdXoE9tO+xco=; b=D+9+0DINhv1H8/Qn+0/tPrcC1e4idtUZ9JMLZT2NNB9OpAb9kJdJkGPl2RclDTnkl9ttlO LsDKDVyb1CCVIbube9t/nfL6QVHME2GwDl8DsfoLXodpaP63sQYgDi6xI0SGHiOsmZfKFb ahoPqKVEBwHnTkEHNdMLAlsXNzTiMrY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1625484750; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type; bh=YQOo1eRaxzjgZojXLXRdKaeJVyvRrWQPdXoE9tO+xco=; b=K4cHw7fNPo2ixRRFARBcQispCUgWeph92gmFudAQSgUQq7/5YKd08ahA0ClGzIRC32EZRa /HwFSOonfJSB08DQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id E0505139F6 for ; Mon, 5 Jul 2021 11:32:29 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id HFj1NM3t4mBBXAAAMHmgww (envelope-from ) for ; Mon, 05 Jul 2021 11:32:29 +0000 Date: Mon, 5 Jul 2021 13:32:29 +0200 (CEST) From: Richard Biener To: gcc-patches@gcc.gnu.org Subject: [PATCH] Do not set both LOOP_C_INFINITE and LOOP_C_FINITE on vectorized loop Message-ID: <73ooqosq-9771-453n-651s-p4983q198nrr@fhfr.qr> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Mon, 05 Jul 2021 11:32:33 -0000 The setting is likely a typo and was meant to affect the scalar version but even there LOOP_C_INFINITE is at most an optimization to the niter analysis. Clearly setting it on the vectorized loop which we just versioned to be _not_ infinite is bogus so the following change removes this. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. 2021-07-05 Richard Biener * tree-vect-loop-manip.c (vect_loop_versioning): Do not set LOOP_C_INFINITE on the vectorized loop. --- gcc/tree-vect-loop-manip.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/gcc/tree-vect-loop-manip.c b/gcc/tree-vect-loop-manip.c index 012f48bd487..2909e8a0fc3 100644 --- a/gcc/tree-vect-loop-manip.c +++ b/gcc/tree-vect-loop-manip.c @@ -3597,8 +3597,6 @@ vect_loop_versioning (loop_vec_info loop_vinfo, niter information which is copied from the original loop. */ gcc_assert (loop_constraint_set_p (loop, LOOP_C_FINITE)); vect_free_loop_info_assumptions (nloop); - /* And set constraint LOOP_C_INFINITE for niter analyzer. */ - loop_constraint_set (loop, LOOP_C_INFINITE); } if (LOCATION_LOCUS (vect_location.get_location_t ()) != UNKNOWN_LOCATION -- 2.26.2