From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by sourceware.org (Postfix) with ESMTPS id 200913858D32 for ; Thu, 25 May 2023 13:06:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 200913858D32 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-out1.suse.de (Postfix) with ESMTP id 3618A21CC8; Thu, 25 May 2023 13:06:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1685019983; 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=kypEDjDCrnClqt9mQ0nM9mMqG1KaJDrQkBirloN0qyM=; b=NMHf+DMAxoAvvTPG+8orY083blb9zwrL8++JhD+XF47bp4Ah0uJlzaYsvPKwFG1zV9Bpjx nAP/Fct4+oSvU/dHrLiKiumUdi9teFvVSsZxBXAnyAxMQBUY8vqW69Crbp7Zh61/RkYAts 0YHvxKqGwjNB/MFPmxe3IrbjLO6KMGs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1685019983; 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=kypEDjDCrnClqt9mQ0nM9mMqG1KaJDrQkBirloN0qyM=; b=wjhHbbnB+Z/MW3n7/WX+ZDNEjcayp9qox2eL4G6Qsy46Eki9ikuQXP6G2LupFiQMLanrDp /q64B+j1as3mErBA== 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 1DDBE2C141; Thu, 25 May 2023 13:06:23 +0000 (UTC) Date: Thu, 25 May 2023 13:06:23 +0000 (UTC) From: Richard Biener To: Richard Sandiford cc: juzhe.zhong@rivai.ai, gcc-patches@gcc.gnu.org Subject: Re: [PATCH V16] VECT: Add decrement IV iteration loop control by variable amount support In-Reply-To: Message-ID: References: <20230525120550.6275-1-juzhe.zhong@rivai.ai> 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 Thu, 25 May 2023, Richard Sandiford wrote: > This looks good to me. Just a couple of very minor cosmetic things: > > juzhe.zhong@rivai.ai writes: > > @@ -753,17 +846,35 @@ vect_set_loop_condition_partial_vectors (class loop *loop, > > continue; > > } > > > > - /* See whether zero-based IV would ever generate all-false masks > > - or zero length before wrapping around. */ > > - bool might_wrap_p = vect_rgroup_iv_might_wrap_p (loop_vinfo, rgc); > > - > > - /* Set up all controls for this group. */ > > - test_ctrl = vect_set_loop_controls_directly (loop, loop_vinfo, > > - &preheader_seq, > > - &header_seq, > > - loop_cond_gsi, rgc, > > - niters, niters_skip, > > - might_wrap_p); > > + if (!LOOP_VINFO_USING_DECREMENTING_IV_P (loop_vinfo) || !iv_rgc > > + || (iv_rgc->max_nscalars_per_iter * iv_rgc->factor > > + != rgc->max_nscalars_per_iter * rgc->factor)) > > Coding style is to put each subcondition on a separate line when the > whole condition doesn't fit on a single line. So: > > if (!LOOP_VINFO_USING_DECREMENTING_IV_P (loop_vinfo) > || !iv_rgc > || (iv_rgc->max_nscalars_per_iter * iv_rgc->factor > != rgc->max_nscalars_per_iter * rgc->factor)) > > > @@ -2725,6 +2726,17 @@ start_over: > > && !vect_verify_loop_lens (loop_vinfo)) > > LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P (loop_vinfo) = false; > > > > + /* If we're vectorizing an loop that uses length "controls" and > > s/an loop/a loop/ (Sorry for not noticing earlier.) > > OK for trunk from my POV with those changes; no need to repost unless > your policies require it. Please give Richi a chance to comment too > though. LGTM as well. Thanks, Richard.