🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.git
Article #61

Re: [PATCH 2/4] sha1dc-accel: vectorize the unavoidable-bitconditions check

#61
From: Junio C Hamano
Date: Wed, 07 Oct 2026 21:32
30 lines
11057 bytes
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:

> This Perl script reproduces the tables (although with different
> formatting, and without the inline comments, I verified it with
> `--patience --color-words="[A-Za-z0-9_]+|."`).
> ...
> With all that out of the way, I would like to ask to include this script
> in the patch (or in a follow-up patch) so that the lengthy `ubc_check.c`
> file's tables can be validated/regenerated independently.
> ...
> While this code is correct, I think it is slightly misleading: depending
> on `want`, it either subtracts `set` from `dvs`, or takes the minimum. But
> that only happens to be what is desired because each lane of `set` is all
> ones or all zero. What we actually want is to mask either those lanes or
> everything but those lanes, i.e. `dvs & ~set` or `dvs & set`,
> respectively. That would be:
>
> 		fail = g->want ? vbicq_u32(dvs, set) : vandq_u32(dvs, set);
>
> This has no speed impact nor does it produce a "more correct" result, but
> it might improve readability a bit.
>
> I haven't looked very closely whether there are similar issues elsewhere
> (it is relatively tedious for me to learn all this NEON stuff on the go,
> this is all new to me). If you're familiar with NEON, it might be
> worthwhile looking for similarly "correct but misleading" statements.

Thanks for offering a very thoughtful help and offering to work well
together.
Technical Details
Message-ID: <xmqqh5ix5h8l.fsf@gitster.g>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-71412-linux-kernel-git=dewy.ru
References: <20260929112544.86511-1-scott@gitbutler.net> <20260929112544.86511-3-scott@gitbutler.net> <3d640489-5db4-5527-0ec1-c2abac7a2de3@gmx.de>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-71412-linux-kernel-git=dewy.ru
From: gitster@pobox.com (Junio C Hamano)
Newsgroups: linux.kernel.git
Subject: Re: [PATCH 2/4] sha1dc-accel: vectorize the
 unavoidable-bitconditions check
Date: Wed, 07 Oct 2026 14:32:42 -0700
Organization: Usenet Network
Message-ID: <xmqqh5ix5h8l.fsf@gitster.g>
References: <20260929112544.86511-1-scott@gitbutler.net>
	<20260929112544.86511-3-scott@gitbutler.net>
	<3d640489-5db4-5527-0ec1-c2abac7a2de3@gmx.de>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: usenet.network;
	logging-data="743139"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:2l5nS7k3gnZa5RgkQnTREm+69tE= sha256:u4MJeN0meZ+gWnEEf2nwu7cZuRdJL1HNdtf5wKbs9DY=
	sha1:1FUC4csdBZp8b9uI5VVUgpdQJJQ= sha256:JSlYXSA15qh5hZeXXBdSexFaGlVWFNToq+8eXkw2Qz8=
List-ID: <git.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 17FF810F213; Thu,  8 Oct 2026 00:33:05 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.05
X-Spam-Status: No, score=-3.05 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=pobox.com header.b=TVY7Bz2p; dkim=pass (2048-bit key)
	header.d=messagingengine.com header.b=ORwKxpsW
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id h0i6bcCBGsWW;
	Thu,  8 Oct 2026 00:32:58 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=git+bounces-71412-linux-kernel-git=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=pobox.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 06A5410F24C; Thu,  8 Oct 2026 00:32:53 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
	by sea.lore.kernel.org (Postfix) with ESMTP id 394EF2CCD8; Wed,  7 Oct 2026 21:32:48 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id D52A7421EF8;
	Wed,  7 Oct 2026 21:32:47 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b="TVY7Bz2p";
	dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="ORwKxpsW"
X-Received: from fhigh-b7-smtp.messagingengine.com (fhigh-b7-smtp.messagingengine.com [202.12.124.158])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6D9723C8705
	for <git@vger.kernel.org>; Wed,  7 Oct 2026 21:32:45 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.158
X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1791408766; cv=none; b=GrPSK8dgOSGK4zX4ROgFDHnRYceDNI8m2JofWB8kGm6BfRDLihBV8/KfVp/Jf3A6UpfN0gf94d0IeTwu66MsbVZvowMKsFMaOmRGoIjVnstevGnjxbP1Nm6QrAWXmLQ7rvYK2cXmVoSs86oGWrL4gM95sqRzYz5PYLelb+HSa3g=
X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1791408766; c=relaxed/simple;
	bh=SWwdc4eTg2LdyFX3jHmFPZwJTrDv3j/geKbmTrZjbko=;
	h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID:
	 MIME-Version:Content-Type; b=r2u2uTEirdUIHuT07hUdD6g24gRd38t1W19P0W6iIWYMjxIP+lmNj2Z96DwuOuOMjvgQzs25AkAf6mefb9VCGy7NBXxbE1mFb/j+dvS+Dn+uS0ZNrj/djggBDlBYvKU8ekBUNjT3jo2LQMNiYUz+xVmv+h+9BQSYqBZS0aAiVFc=
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com; spf=pass smtp.mailfrom=pobox.com; dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b=TVY7Bz2p; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=ORwKxpsW; arc=none smtp.client-ip=202.12.124.158
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pobox.com
X-Received: from phl-compute-12.internal (phl-compute-12.internal [10.202.2.52])
	by mailfhigh.stl.internal (Postfix) with ESMTP id B01327A013A
	for <git@vger.kernel.org>; Wed,  7 Oct 2026 17:32:44 -0400 (EDT)
X-Received: from phl-frontend-02 ([10.202.2.161])
  by phl-compute-12.internal (MEProxy); Wed, 07 Oct 2026 17:32:44 -0400
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pobox.com; h=cc
	:cc:content-type:content-type:date:date:from:from:in-reply-to
	:in-reply-to:message-id:mime-version:references:reply-to:subject
	:subject:to:to; s=fm1; t=1791408764; x=1791495164; bh=j19AkidUZ9
	HO1qoV5+JvUQQ5Zpwrat8+wRcCAofGCnI=; b=TVY7Bz2pj3kCivCytEpGDIej4Q
	ROXAnArRoLzlfwqTJdH/NYIceOdWZlJyPHGglZkQREN0BQDujXpu76/YOk4mXu5u
	L8G0bJvXwGLkmjmj97PV7Ujc42q+vCRrYteI9AA6LFlSG5XZYl4asIIbGf16Yj5N
	pORgL8pVE6ZKuoWrx73S/DlbCFpakHrKIZzh81u1gjJgjdMGYUYo9ydB1kvL5F9z
	sR40O+SKI7Q3KbPGtYIanB8gASZbV/w/bZ6B9BWfHLo4qyDOSdt+yAYf4eK/VuLY
	3pPvhTLUBar7WDftyjIuKEd9oDIx368xA/EKeuP8Lpbpwa7dnfnBulWpHTeA==
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
	messagingengine.com; h=cc:cc:content-type:content-type:date:date
	:feedback-id:feedback-id:from:from:in-reply-to:in-reply-to
	:message-id:mime-version:references:reply-to:subject:subject:to
	:to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=
	1791408764; x=1791495164; bh=j19AkidUZ9HO1qoV5+JvUQQ5Zpwrat8+wRc
	CAofGCnI=; b=ORwKxpsW9/pC1NAQqKfBUfVHweCi11NVFeMEi67hGr87QUGzIUx
	vesijDlSGStbHA1qLzbUgC5VvBGR8cBgiUH2mM7KAxfftYgGT/VmGZzE1esX51SI
	Mzzb0GsE9VK/eFfcJjDE4FHX5kGyX1ZWzh3Idv/QafYig3yBbzkK5jkeKAFlgDOj
	FQtqsIHeZQ7Ymucld4d1IFCikARNlqYPb+bEqOFfXjLx3G0BOKgCPcyPIBJzkdBz
	q9NjU98vBBb0BHY8j8exQykPP4ka799WWVAfKRGWMXG6qcV+BaqjyHVAh8wKczxb
	r6c4zHLY4Esl5rZ7jiLB6vZX/Hp8TFW7ilA==
X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-06;
	repo=github.com/dkim2wg/interop; date=2026-10-04; sw=lmtpprox;
	action=sign d=pobox.com a=rsa-sha256;
X-DKIM2-Signature: i=1; m=1; t=1791408764; d=pobox.com;
	mf=PGdpdHN0ZXJAcG9ib3guY29tPg==;
	rt=PGdpdEB2Z2VyLmtlcm5lbC5vcmc+;
	s=fm1:rsa-sha256:NQ9RzHS0cv3TIGKZDbHJX900TfGeqg+lmZLiB2ivmPc2Au+
	ab1FYkflY9UERoNlHin/RaOo636IxE+PTqg22c1E1cHP8wUc4T+EUAH3IyEAPoNA
	lYcsEqJPdSQ0CmTf75fnfg/DVl85aMiNwxcCZ458DCb4s//hnqP4IrpgPyePSW4x
	EF42oF1PkYod3RjKQ2fCK5InwcO40pROp2TuJfM4zwqCk6RQGggTH/M3bkQ87JH9
	bZeSfYUPXTpintzKCLt/t7st5xHE1TwD3x1+GXjVSplYd4T901cmW6y3ff3STY89
	yu1RfjawlunLb/WtgHuMAuhYnThY3a8TSg+CZIw==;
X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-06;
	repo=github.com/dkim2wg/interop; date=2026-10-04; sw=lmtpprox;
	action=mi-m=1; hc=12;
	hn=cc,content-type,date,feedback-id,from,in-reply-to,message-id,
	mime-version,references,subject,to,user-agent;
X-Message-Instance: m=1; h=sha256:2ZiARkKGZav/D6UuokeaUKueROV6uOqNIHxOCaXuHsI=:SWwdc4eTg2LdyFX3jHmFPZwJTrDv3j/geKbmTrZjbko=;
X-ME-Sender: <xms:fLrGaqei3YMzIYHLPkZ8BUjrPT-__csMcD0vW6Xl2ipHoK5aaWx_xA>
    <xme:fLrGarMLo2wVs0QK_ncQ1nnrGTLgjXT7LIUl0B8WonsZj5xFaiSEQjCiOK-noGEfX
    W6ZatJyLbkS4cZZ9zpERT7JcTuurwyVfBSa44uTqDejkVo1A4CyO3U>
X-ME-Received: <xmr:fLrGagjb3C61StY7jmZQ2k4XA6wYb4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<xmx:fLrGau1hDZb5mE0zfBkjCGY_y6NG9y3QQauHD4aVxsMDsd3Y4wql8rxK>
X-Feedback-ID: if26b431b:Fastmail
X-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed,
 7 Oct 2026 17:32:43 -0400 (EDT)
X-Cc: Scott Chacon <scott@gitbutler.net>,  git@vger.kernel.org
X-In-Reply-To: <3d640489-5db4-5527-0ec1-c2abac7a2de3@gmx.de> (Johannes
	Schindelin's message of "Wed, 7 Oct 2026 14:17:41 +0200 (CEST)")
X-User-Agent: Gnus/5.13 (Gnus v5.13)
X-Precedence: bulk
X-Mailing-List: git@vger.kernel.org
X-List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>