From nobody Tue May 28 05:28:38 2024 X-Original-To: dev-commits-src-all@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 4VpLdz1hDWz5LfPS; Tue, 28 May 2024 05:28:39 +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 4VpLdz0wy1z4jkD; Tue, 28 May 2024 05:28:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716874119; 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=sR4u9QyMrPdt/1xjt7gg1Szmgk1oUIDnge8qvolWBLk=; b=nogFvqBphqoxkkZaZeBRNjNqLkEw/vLl4m4IGSFBtu8n87IYnWPz3TYzsrTciKYInMJhmv kCKhFa7hZQ4K+zQ1srZqs0y5t79+j99ZeYDxNPQOUyQkycpsN3j1/4+9eE0KG/vtSa7Nxh UwzbI+v/NjUzJCNgx6rbfZhjBfvOGodG9dDuXl5j7xuBuARz0XJClk29YDQNh+5Y+7ZWNG Pv+ffYHpP5aWKVOc8KW+3F0ovfJ9s1Vb47XQMxskFNQIhSeNvGaINiLCCT4O5Fbg8oLx2I XbgGeWCGoG8Zm2t58WQBznjW8iaKfXT6km8TsBWT1R9uuJfUNWlQIlahYi/tdg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716874119; a=rsa-sha256; cv=none; b=dhW34OB77u7l3lDErXYt9JIB9GOKK2AqC8HrCtKH2W0c7FBWPlsE0EtDgsHZ4MOlYw7jfV 8Y2oaF3VBmXw+WljnHBMM+yWPEuDb5dth9RhJGIK0XSyhfBd2gmMwmEoLDqsR8Ave5fj9X 9mDRlLSQOLS/3Y5Vb23/uFIvBs3HqbKAV0S8MQtBt2yIINvrUW8AhNu1E2MGndGsZPL9tx 82/YKVdWFNh/gXoMdlwP4GuJTv3uIXKRNI44M+pVMemis38YIaHqmtG405Wf1QbroF1MYM bcPy7xlcyzNn2bRYUrTxy042nSpBzd3eulzmvymnjZfAHQWJw36sRdCXx0UXuA== 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=1716874119; 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=sR4u9QyMrPdt/1xjt7gg1Szmgk1oUIDnge8qvolWBLk=; b=h9eT8eLkLlKJBhMuwElFAxneBLrUB90e1o3539Z4IaM5rcIvCeroLt6Ydg946NYouzCbPS oSeJDNsSXM5A9mZ7QXTi5+ie3J3SqJuCD7oI1GPlL3SdH52QiUZMZ1ZMwZWPnV+Oq51ME/ PobImV+JjfoF21fwJsOghjkOKb1HC3uEufvt1Yy+uQRhpHmCXZTBFhWW7QX3lqQZ39+nfW YAMuieBk9/8DqhN24sp8BrQ6F8adKqYYohfzdzqIZxY2MlxUh3swtQsxbs29w4F75Xh2Ue xcVNehe7MvYP22BaYB6NZDIO8uhpl0kKy94q/PzwaiDIGZY9CPQgnbi+aMR5QQ== 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 4VpLdz0VGpz1F38; Tue, 28 May 2024 05:28:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44S5ScYm018949; Tue, 28 May 2024 05:28:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44S5Sc3G018946; Tue, 28 May 2024 05:28:38 GMT (envelope-from git) Date: Tue, 28 May 2024 05:28:38 GMT Message-Id: <202405280528.44S5Sc3G018946@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: a3e6eda79813 - stable/13 - Merge commit d0be944aa511 from llvm-project (by Simon Pilgrim): List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: a3e6eda7981319113d39caedf79b94b44773970f Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=a3e6eda7981319113d39caedf79b94b44773970f commit a3e6eda7981319113d39caedf79b94b44773970f Author: Dimitry Andric AuthorDate: 2024-05-25 17:52:15 +0000 Commit: Dimitry Andric CommitDate: 2024-05-28 05:26:46 +0000 Merge commit d0be944aa511 from llvm-project (by Simon Pilgrim): [X86] Add slow div64 tuning flag to Nehalem target (#91129) This appears to have been missed because later cpus don't inherit from Nehalem tuning much. Noticed while cleaning up for #90985 Merge commit 8b400de79eff from llvm-project (by Simon Pilgrim): [X86] Enable TuningSlowDivide64 on Barcelona/Bobcat/Bulldozer/Ryzen Families (#91277) Despite most AMD cpus having a lower latency for i64 divisions that converge early, we are still better off testing for values representable as i32 and performing a i32 division if possible. All AMD cpus appear to have been missed when we added the "idivq-to-divl" attribute - this patch now matches Intel cpu behaviour (and the x86-64/v2/3/4 levels). Unfortunately the difference in code scheduling means I've had to stop using the update_llc_test_checks script and just use old-fashioned CHECK-DAG checks for divl/divq pairs. Fixes #90985 This fixes possibly worse runtime performance on AMD Zen hardware, when using -march=znver4 (or any other znver), as opposed to -march=x86-64-v4 or the baseline -march=x86-64. A similar fix is applied for Nehalem. PR: 278908 MFC after: 3 days (cherry picked from commit cadd2ca21765ebcb95b77ec94977b4e74e1edc1b) --- contrib/llvm-project/llvm/lib/Target/X86/X86.td | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/contrib/llvm-project/llvm/lib/Target/X86/X86.td b/contrib/llvm-project/llvm/lib/Target/X86/X86.td index e89ddcc570c9..1aff5f9fad97 100644 --- a/contrib/llvm-project/llvm/lib/Target/X86/X86.td +++ b/contrib/llvm-project/llvm/lib/Target/X86/X86.td @@ -867,6 +867,7 @@ def ProcessorFeatures { // Nehalem list NHMFeatures = X86_64V2Features; list NHMTuning = [TuningMacroFusion, + TuningSlowDivide64, TuningInsertVZEROUPPER, TuningNoDomainDelayMov]; @@ -1336,6 +1337,7 @@ def ProcessorFeatures { FeatureCMOV, FeatureX86_64]; list BarcelonaTuning = [TuningFastScalarShiftMasks, + TuningSlowDivide64, TuningSlowSHLD, TuningSBBDepBreaking, TuningInsertVZEROUPPER]; @@ -1358,6 +1360,7 @@ def ProcessorFeatures { list BtVer1Tuning = [TuningFast15ByteNOP, TuningFastScalarShiftMasks, TuningFastVectorShiftMasks, + TuningSlowDivide64, TuningSlowSHLD, TuningSBBDepBreaking, TuningInsertVZEROUPPER]; @@ -1380,6 +1383,7 @@ def ProcessorFeatures { TuningFastVectorShiftMasks, TuningFastMOVBE, TuningSBBDepBreaking, + TuningSlowDivide64, TuningSlowSHLD]; list BtVer2Features = !listconcat(BtVer1Features, BtVer2AdditionalFeatures); @@ -1404,6 +1408,7 @@ def ProcessorFeatures { FeatureLWP, FeatureLAHFSAHF64]; list BdVer1Tuning = [TuningSlowSHLD, + TuningSlowDivide64, TuningFast11ByteNOP, TuningFastScalarShiftMasks, TuningBranchFusion, @@ -1483,6 +1488,7 @@ def ProcessorFeatures { TuningFastScalarShiftMasks, TuningFastVariablePerLaneShuffle, TuningFastMOVBE, + TuningSlowDivide64, TuningSlowSHLD, TuningSBBDepBreaking, TuningInsertVZEROUPPER,