From nobody Mon Jun 19 18:33:51 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QlJLl4HlSz4g1gY; Mon, 19 Jun 2023 18:33:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QlJLl3tRZz43PV; Mon, 19 Jun 2023 18:33:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687199631; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2EULLuh3Ypapucy67dKYBWJpJhCfAmeBuB4UAKyH2yM=; b=ywlK9UfGUIqX7kM+JAtbd7npobQ4IeEuRTf6zMiB5Ez8Wy62B1qyszNq7Q82TaPx4RRjTe N+LrNbRT5ORpGSfIHQPH6WSWtVrC5SpSYgAsOYVuCf+AVj7LrK3uITPlGsHxHBalAAlB/B OToCxT4mZ1XXFVVMxkM4Zzj2EZT1BJaP4TAem8IMYfSknM3h5/ihEUb7er/2hHhghKPQK3 kDuqsmr7imGRmMEUGXQQO2z75AXBT/DngrmKeT9gXwAMS+ErQ74kXyqQ/6O6DAIlfx8R16 KjCe9TYFaXFh9PzB/J86OvV4yh/XhLTevbZ6dORI7jkF94bh3dOi1A/mLuGOuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687199631; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2EULLuh3Ypapucy67dKYBWJpJhCfAmeBuB4UAKyH2yM=; b=oeiGqw7ndqk5KIG+a4wRRlNc1a5BQRe9vL4v4uKBTZuIvfnUKFuhgr/aU9FDXhZydi/m1K HxAhmSaEuGU5tBhbQh7i7X2y9VYb3RBauPoqE6hK0W/1PgtcaIH3Cn76K2Lci2Y5rp14JQ asET58lk9At2CVk1wcwOPnFni7Ztyeq8LLodb+zbQntArVRHq/Qw79KOlaMgc8Ay74JPe8 EM0WL46GOfjz9KVi7HNHNxWjj/CsA2eLOIeE8C6gQGl8sw6OWWppcpERuK3j5Up8RlB/uN jxKvHDLAbM5kRXto33v6GVIm6Tx9BAMaUt3tJiIfHWgF3PLn2qXlPdpHn8HbVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687199631; a=rsa-sha256; cv=none; b=TZGYqjCelju7Ejf2rvoaUG0tRfxbOXPgSMn1VEnO0Tgahn+lOaUHJMctAq370h5iJXekf0 Dn/esCeulgFUIn03dyDxefDcMTS7mBvkEDnLBFjfqdCj1GLOmVpOBNl3y1UmWnQDZ08amp kz6lile9pfnL+OMAhPL+WJs18LVDx1sG5X6itwa5zsKgMRw3E/AXBRKurUqwSx5Bv66R9l R7DCt1giz08w6zrw0vmBHgStU72uB383WO6b9p8geN4vLOSQ16sMwEJI/acudqMu3oOEGI D91jCWS3cwd7VpA77U07BzvvOkJ0PcTqCoIjeTxWTDb3sj3ralxlDTuadxgwmQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QlJLl2yqHzSbp; Mon, 19 Jun 2023 18:33:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35JIXpFF079938; Mon, 19 Jun 2023 18:33:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35JIXp3h079937; Mon, 19 Jun 2023 18:33:51 GMT (envelope-from git) Date: Mon, 19 Jun 2023 18:33:51 GMT Message-Id: <202306191833.35JIXp3h079937@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: dbbaf77801a8 - main - Apply llvm fix for hanging gcc builds on 32-bit arm List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dbbaf77801a8f30e49731395e85757f339f345bf Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=dbbaf77801a8f30e49731395e85757f339f345bf commit dbbaf77801a8f30e49731395e85757f339f345bf Author: Dimitry Andric AuthorDate: 2023-06-19 18:32:40 +0000 Commit: Dimitry Andric CommitDate: 2023-06-19 18:33:33 +0000 Apply llvm fix for hanging gcc builds on 32-bit arm Merge commit 962c306a11d0 from llvm-project (by Florian Hahn): [LV] Don't consider pointer as uniform if it is also stored. Update isVectorizedMemAccessUse to also check if the pointer is stored. This prevents LV to incorrectly consider a pointer as uniform if it is used as both pointer and stored by the same StoreInst. Fixes #61396. PR: 271992 Reported by: John F. Carr MFC after: 3 days --- .../llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/contrib/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/contrib/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp index 5fd4e45d80fb..9d95cb25efa0 100644 --- a/contrib/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/contrib/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp @@ -4627,11 +4627,17 @@ void LoopVectorizationCostModel::collectLoopUniforms(ElementCount VF) { WideningDecision == CM_Interleave); }; - // Returns true if Ptr is the pointer operand of a memory access instruction - // I, and I is known to not require scalarization. + // I, I is known to not require scalarization, and the pointer is not also + // stored. auto isVectorizedMemAccessUse = [&](Instruction *I, Value *Ptr) -> bool { - return getLoadStorePointerOperand(I) == Ptr && isUniformDecision(I, VF); + auto GetStoredValue = [I]() -> Value * { + if (!isa(I)) + return nullptr; + return I->getOperand(0); + }; + return getLoadStorePointerOperand(I) == Ptr && isUniformDecision(I, VF) && + GetStoredValue() != Ptr; }; // Holds a list of values which are known to have at least one uniform use. @@ -4679,8 +4685,8 @@ void LoopVectorizationCostModel::collectLoopUniforms(ElementCount VF) { if (isa(I) && Legal->isUniformMemOp(I)) addToWorklistIfAllowed(&I); - if (isUniformDecision(&I, VF)) { - assert(isVectorizedMemAccessUse(&I, Ptr) && "consistency check"); + if (isVectorizedMemAccessUse(&I, Ptr)) { + assert(isUniformDecision(&I, VF) && "consistency check"); HasUniformUse.insert(Ptr); } }