From nobody Sat Mar 19 19:59:41 2022 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 D35801A2C445; Sat, 19 Mar 2022 19:59:41 +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 4KLWtj5bTGz3LTf; Sat, 19 Mar 2022 19:59:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1647719981; 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=mTU9+iBP3OnhNkoNeEw+NcOjHiYhpV6iCV+JU74+SUo=; b=WlZHplK8DuLbmvDQHb1ho8QPQ9+44sP3Zc3ygQ67PDP3ZKsav2naT/fCB8EXInaN27L0HA 6cbXIyx74oJIgZqgutRXb8ea8QIUqzYgpozcVUV/eQLUip9m6w9uDA69avlhhNNQh2l2Jb ITZF46CswqA1nqTKyhMTnyJjwU/P7FLEC2jxfRwJwgu04T/ANHeHQVltKnhbXXoUm3BNng D8JYNeNl2UDEzvGWxFepcADdZh4r/mew1dzHzBX9UoXZPPU2VigY+EqOKAWS2HHDiIF7CG dXxoXGqTppqocCuai3gAsAKqTUVMINAR0sjizIRH/fQnO2r5DZD0Bv9AxBy+9A== 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 9BF971965F; Sat, 19 Mar 2022 19:59:41 +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 22JJxfkF067481; Sat, 19 Mar 2022 19:59:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22JJxf0R067480; Sat, 19 Mar 2022 19:59:41 GMT (envelope-from git) Date: Sat, 19 Mar 2022 19:59:41 GMT Message-Id: <202203191959.22JJxf0R067480@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: 1b3bef43e3cb - main - Apply llvm fix for assertion compiling certain versions of Wine 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: 1b3bef43e3cb7fb0ab49b813839915514c1134cc Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1647719981; 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=mTU9+iBP3OnhNkoNeEw+NcOjHiYhpV6iCV+JU74+SUo=; b=MTYJdySieNVd30o/6qvm4rHvN9WTrogvmQ/+/fRvmxP4rhj6YJiW27Qdw6S33sJjzkvn+V F14140G3iveMLYlz7pmoziu0FEMb+MI0cDJaVeap3YhF4Z44V71nv8y7zl6CTEoZwIne8k 0/5TW7D5iGxMlc7iLGnyrPAwIUpAoH19ipzCz0BD1Mz1Brh+fLDEKEw2bcstwGuNsBL93T kOcCk0cXQAN+qV0OpTazRilEKVbamgnj6EJH798HBZj56PG55HtBpS1QM7H92oCquFCUeR AyBlPXbV9D2UW3DvVCbbxcZYuzRXQ2vDpMMaMkWVa51k+ttXF0zKsdpiC1rl4Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1647719981; a=rsa-sha256; cv=none; b=mZfcnw4ABzcH0rB27ed6mbsIaqsb9YjMS1+/KioMJKdpZdzOYRrs768zQ0Y7MqMw5aT1gR gyBaODJ5gF+SCp3Lo/WmMoHsPAaT/nMVr2VrrnWBeaehsMOTjn8EVwTNAWZsRGu6Asjh05 mtq7cBm4diFKYafZrnHSvXiSUJWhmPqA77zm04NWfBtLvOWvP+MBIxpVYsODVFTAVXmgZe ey0I8wIT+d/JvIZf3FvXoEStf4oozmSvNMt2VIUcHCBwRy7s1OHAFyCC6/yioj+PCx0PUn VaXAGr0q0pGkbbTcB5KIiov8DEkFKogIFVwfa4iWBaPuO/RESrN0u+lRKaBSsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=1b3bef43e3cb7fb0ab49b813839915514c1134cc commit 1b3bef43e3cb7fb0ab49b813839915514c1134cc Author: Dimitry Andric AuthorDate: 2022-03-19 19:59:04 +0000 Commit: Dimitry Andric CommitDate: 2022-03-19 19:59:04 +0000 Apply llvm fix for assertion compiling certain versions of Wine Merge commit b9ca73e1a8fd from llvm git (by Stephen Tozer): [DebugInfo] Correctly handle arrays with 0-width elements in GEP salvaging Fixes an issue where GEP salvaging did not properly account for GEP instructions which stepped over array elements of width 0 (effectively a no-op). This unnecessarily produced long expressions by appending `... + (x * 0)` and potentially extended the number of SSA values used in the dbg.value. This also erroneously triggered an assert in the salvage function that the element width would be strictly positive. These issues are resolved by simply ignoring these useless operands. Reviewed By: aprantl Differential Revision: https://reviews.llvm.org/D111809 PR: 262608 Reported by: Damjan Jovanovic MFC after: 3 days --- contrib/llvm-project/llvm/lib/IR/Operator.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/contrib/llvm-project/llvm/lib/IR/Operator.cpp b/contrib/llvm-project/llvm/lib/IR/Operator.cpp index 18a1c84933e0..f9dbed31c44c 100644 --- a/contrib/llvm-project/llvm/lib/IR/Operator.cpp +++ b/contrib/llvm-project/llvm/lib/IR/Operator.cpp @@ -190,12 +190,14 @@ bool GEPOperator::collectOffset( if (STy || ScalableType) return false; - // Insert an initial offset of 0 for V iff none exists already, then - // increment the offset by IndexedSize. - VariableOffsets.insert({V, APInt(BitWidth, 0)}); APInt IndexedSize = APInt(BitWidth, DL.getTypeAllocSize(GTI.getIndexedType())); - VariableOffsets[V] += IndexedSize; + // Insert an initial offset of 0 for V iff none exists already, then + // increment the offset by IndexedSize. + if (!IndexedSize.isZero()) { + VariableOffsets.insert({V, APInt(BitWidth, 0)}); + VariableOffsets[V] += IndexedSize; + } } return true; }