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 1DC2B3858C41 for ; Thu, 15 Jun 2023 09:15:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1DC2B3858C41 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 1A69521A2D; Thu, 15 Jun 2023 09:15:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1686820539; 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=Vioc9I01/lTD4iMDFtJL5Ygm+ghHnwXlXMwPhoulyjc=; b=dW0YyTeWWgrS2RX5vaKK1Q3wWsgI5YgEcgHFPOkup8wVGB8kOB0uXI5Y2dujnrmFlDDbca TgewwYgmlQDpYQY3n4z+KoKLl4715fgzc4mqTf9bGYYtB6+hcehGabb4zkLBJE8XWkT7n2 /+w+448YyG3Lv42e1YiA5Z4V6CBJCRU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1686820539; 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=Vioc9I01/lTD4iMDFtJL5Ygm+ghHnwXlXMwPhoulyjc=; b=VNDdU4M8yu//tplpe5x+A9QCKnj0OGyUZZ0ZxhE6JGWIli5kuqtfknqVDV0j3VrL+0Zurk e7VdI8L142RNpQCw== 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 D50252C141; Thu, 15 Jun 2023 09:15:38 +0000 (UTC) Date: Thu, 15 Jun 2023 09:15:38 +0000 (UTC) From: Richard Biener To: Robin Dapp cc: "juzhe.zhong@rivai.ai" , gcc-patches , "richard.sandiford" , krebbel , uweigand , linkw@linux.ibm.com Subject: Re: [PATCH V2] VECT: Support LEN_MASK_ LOAD/STORE to support flow control for length loop control In-Reply-To: <7e31f226-476a-75d1-6a0f-13fa9134e311@gmail.com> Message-ID: References: <20230612041438.272885-1-juzhe.zhong@rivai.ai> <1A27F1FE56A91998+2023061516473052116877@rivai.ai> <7e31f226-476a-75d1-6a0f-13fa9134e311@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=-4.9 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, 15 Jun 2023, Robin Dapp wrote: > >>> Can you try using the same wording for length and mask operands > >>> as for len_load and maskload? Also len_load has the "bias" > >>> operand which you omit here - IIRC that was added for s390 which > >>> for unknown reason behaves a little different than power. If > >>> len support for s390 ever extends to other ops or power or s390 > >>> gain mask support for conditional code we'd likely have to adjust > >>> each optab you add. Maybe it's better to add the bias operand > >>> now. > > > > I don't know BIAS well and It seems to be a Power target dependent feature. > > I think len_mask_* in general should only need lenght and mask operand. > > Actually, the function argument is totally same as vp_load/vp_store in LLVM. > > > > Could I just keep current format (without BIAS argument)? And extend it with BIAS if > > PowerPC want to use LEN_MASK_ * ? > > FYI: The only proper user of bias is s390 because the insns cannot handle a > zero length. Power doesn't actually need it. What we do is just subtract the > bias (== 1) from the length in case of n_rgroups == 1 and nothing for > bias == 0 so the actually bias support code needed is small. Meh, PoP is now behind a paywall, trying to get through ... I wonder if there's a nice online html documenting the s390 len_load/store instructions to better understand the need for the bias. Richard.