From nobody Wed Mar 23 19:59:09 2022 X-Original-To: dev-commits-src-branches@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 D122B1A4656F; Wed, 23 Mar 2022 19:59:09 +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 4KNzhF5YdCz4V9t; Wed, 23 Mar 2022 19:59:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648065549; 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=3OEbsO7bZuUff2rX5cf4XUCnd6ALqiKOmir1nppyLw8=; b=bNmwWMO4xrD8DMwikif7Y/cuFcbQahvQCMbNJHWrJcn1nUd8avU8vtkEr3B2o10MUp1BkG MnOtaq7R8yp7IudYg+ioSkbd2vWdkIDUUcws3FDOnzPCcu8NezQS2w5MWgzK+NcvpEaJiI A/pGll/JVxbGy+aSSR7nYOuBSXBY1ABn0qcHDEIdIei6HB32LfzEvdvOE+UGOkC96gqTMX o6a6EzaC8GyB6CwWNUjZUxthxgLIedE1sjMMX5dnov34IVqdPSs1Cvr5cjDNh8eg4T83NL xX56hBCGs/9F7lHg1LM/yxp+UZ6WqVoOIeQWyPOQm9JqmU63VbDO0uTfzjAMwQ== 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 9E6261A2F; Wed, 23 Mar 2022 19:59:09 +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 22NJx9is021139; Wed, 23 Mar 2022 19:59:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22NJx9gP021138; Wed, 23 Mar 2022 19:59:09 GMT (envelope-from git) Date: Wed, 23 Mar 2022 19:59:09 GMT Message-Id: <202203231959.22NJx9gP021138@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 420907a4387f - stable/13 - Apply llvm fix for assertion compiling certain versions of Wine List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 420907a4387f4337e481797e96093c6bdee2fd2c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648065549; 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=3OEbsO7bZuUff2rX5cf4XUCnd6ALqiKOmir1nppyLw8=; b=jjwTJ5RL0gjaiS7OqYZIpnZhzWvrSp+INyCgk6FM1boXJ4nAQ4k2fonHH9mdgL7PtMu2BM AsxhosaT/f3De0IV3k3Y3LEnUCCDBru8Qtof3ce79N2wzFuxOgAaJxDxwOckQZq3JZ4rmL yLetmN3XnH2Me7mDj87LvF8Rf1NIvdn2meFQ8DNuoGO1wf4kW57ersdJCakmdFNaYV51sB RNfQF1eq/Aem0l549Nr6FEweQCGF7jo3oRdlTk8iZA8FSreAxeUAq2peBDhehBSQiehbMm rsgdU7lPnKc6gR96UGRFvfo3BgRlT4lF+KU0bkYLzViTAdt+gOBJDt6zt4oNRw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1648065549; a=rsa-sha256; cv=none; b=PbkfJb/kds4GtO86q9jHzUdEndGz6whEOFwBcFLwscsIutEs5yckEAhGF7sJqP6hKJ7aBa X4/QiIInDc52d25IjXWPqI7vv6J5LTOtsNYsmq1DA7PfK8uuGgwJ+oEiC4BsEFehqhmIYD eO5ZE+zcIN+k1lLQe3oBkfHmLXNl3QqezfE7D+TWZf1bp66Igs1aM3k5oTUbnsx//CCX2e 8YrUvIEHlloSurqAO70Q181h27umC9+8fLNpAdNW4uFwUSmWXBqN6/+0ERxNJlNwXeSFXl RXyBITrpUbef0weWJwSIhFAjppExEQyQ8j1uhSBo7SxHjY3EFBmj+JrLRZFs9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=420907a4387f4337e481797e96093c6bdee2fd2c commit 420907a4387f4337e481797e96093c6bdee2fd2c Author: Dimitry Andric AuthorDate: 2022-03-19 19:59:04 +0000 Commit: Dimitry Andric CommitDate: 2022-03-23 19:57:46 +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 (cherry picked from commit 1b3bef43e3cb7fb0ab49b813839915514c1134cc) --- 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; }