From nobody Wed Jul 31 07:30:14 2024 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 4WYkJk686Gz5RNbD; Wed, 31 Jul 2024 07:30:14 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYkJk5bR6z4mjb; Wed, 31 Jul 2024 07:30:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722411014; 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=DgqxkJIocmA9SkPi/zsi7TSe+Qsy5NvxKEmGbW/gwdo=; b=jOB0dBNJRHPdDoJR5dZ/PDUP/02AJca+uF9jYo98CqQIQLSQunu6sZCtgS/Kbk7kaI0q42 su7i3n3ugkKJLcYEwtFY4hB+CxA0NDJ7W71smZ1x28NQe5DAGFpPYoVgds+3qVr18JNG4K 2cBQV1a88MoZht5TG/KNpbT5o3qeI9m7CR/jwRZ3X8p1kzrsYnIXlemnw0dPEZexcjhtYX rUfnI9UKJEM22fE5OWbL7gO4d/AnYm/9f48Pj4A87Nz/ouLyvYHToqOmLto1iMqxmbzxWm 07A37LtRI+30HzgYIsAxbdn8fhxKIae65HypDphAboNpa1tgg3TvQvvZr5XPpQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722411014; a=rsa-sha256; cv=none; b=mYWss32vIqMWjKaULMPwJjhjf7Iz9J26+7qidiOMyRg8gOtlc66krDYfx1vJuX4K7sTlp6 U/Qh0BeIcYbjMq/VyD0WER3rDLc4sbI6rdQUftLUKHPfSi4LMmcZ1ij5B5cYTOPJDsOeuj BwNbCZG+DuOrLczcxgNJnp8bGdb41YvMs8N93mjy4Kys5Y8AJvpK6ZfYNdLrxzFIPyBNVr AhuJBCFUggyvfbj5NyxE1G4+oblhLfO5lPp0mcU6meIMCl3JXSrkl1nwhMJGCqzG/asH5q xkbTAwZA1Re10jMFHiFVGVhDKE8Z/Z9ASRT1JsioKPu5NSNOPF4G9CxqHaJ03g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722411014; 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=DgqxkJIocmA9SkPi/zsi7TSe+Qsy5NvxKEmGbW/gwdo=; b=Wa4QDv0Z3Fy6cgjXPpiZtCKMd3eIcId6ezVaYx0pJOtBTxWQduOiYFSrlcdecwH52Bmuac VwBq9dfdPlzAC1a/SK17t3I16CHH1Ouz+gt1bbzAN6Sz1hMUHRj/oFVr7eSUtSvXOjjvor nvc4ehVWzTCvNuOwcs840vnvgQoN6kU5Y8hw8sSzdPT3/qHSTQO8Mgu07Vu44qwFVDJNNO bylx5BtjA177kxbOOaJBFooZo69bymk7lLG/cuFLpmWFh6Zq7Zr94VWlWZEDod6DM3dnaY yk3emFgiNUXj2r38+s6NWHWjgDtQ6Drl8h6CwZ3YO/wlnk1sMXjd/szkzmQzVQ== 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 4WYkJk54MVzr4d; Wed, 31 Jul 2024 07:30:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46V7UEFU063758; Wed, 31 Jul 2024 07:30:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46V7UETS063749; Wed, 31 Jul 2024 07:30:14 GMT (envelope-from git) Date: Wed, 31 Jul 2024 07:30:14 GMT Message-Id: <202407310730.46V7UETS063749@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: 511583866352 - stable/14 - Revert "Fix llvm register allocator for native/cross build differences" 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: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-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/14 X-Git-Reftype: branch X-Git-Commit: 51158386635294dc6cff48090a1a8faa2c97553e Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=51158386635294dc6cff48090a1a8faa2c97553e commit 51158386635294dc6cff48090a1a8faa2c97553e Author: Dimitry Andric AuthorDate: 2024-07-28 11:08:50 +0000 Commit: Dimitry Andric CommitDate: 2024-07-31 07:29:41 +0000 Revert "Fix llvm register allocator for native/cross build differences" In preparation for applying the fix that landed upstream, this reverts commit 397c2693fa66508cb5e6b173650a1f3bc6c4dd4f: Fix llvm register allocator for native/cross build differences Work around an issue in LLVM's register allocator, which can cause slightly different i386 object files, when produced by a native or cross build of clang. This adds another volatile qualifier to a float variable declaration in the weightCalcHelper() function, which otherwise produces slightly different float results on amd64 and i386 hosts. In turn, this can lead to different (but equivalent) register choices, and thus non-identical assembly code. See https://github.com/llvm/llvm-project/issues/99396 for more details. Note this is a temporary fix, meant to merge in time for 13.4. As soon as upstream has a permanent solution we will import that. PR: 276961 Reported by: cperciva MFC after: 3 days (cherry picked from commit 52552d7572a6d3d7d3ce0d6862de9a9d203c5d01) --- contrib/llvm-project/llvm/lib/CodeGen/CalcSpillWeights.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/contrib/llvm-project/llvm/lib/CodeGen/CalcSpillWeights.cpp b/contrib/llvm-project/llvm/lib/CodeGen/CalcSpillWeights.cpp index afde8d001f88..f3cb7fa5af61 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/CalcSpillWeights.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/CalcSpillWeights.cpp @@ -256,12 +256,7 @@ float VirtRegAuxInfo::weightCalcHelper(LiveInterval &LI, SlotIndex *Start, return -1.0f; } - // FreeBSD customization: similar to the HWeight declaration below, add a - // volatile qualifier to avoid slightly different weight results on amd64 - // and i386 hosts, and possibly choosing different registers in the register - // allocator. See for - // more details. - volatile float Weight = 1.0f; + float Weight = 1.0f; if (IsSpillable) { // Get loop info for mi. if (MI->getParent() != MBB) {