From nobody Sat May 25 20:18:03 2024 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 4VmtWb6kn8z5LY8X; Sat, 25 May 2024 20:18:03 +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 4VmtWb3vsgz4qY1; Sat, 25 May 2024 20:18:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716668283; 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=+bWukvAPs5fAdlwwI83k5GBk0VRbBYJAF2q+qhdHmk8=; b=aZ2JcLSK5Z4acJNsETbU3TZ3O+EoeNZM4/n77K3XTzizZMHZwExyKJWGUrH0l3zJnHt8Eh UGs7o3eFKmyzLcmtQbq16iERyKsR9b80UZ4x+zZiyJiSer9EPs8fZNbystHMCGre3bQpgM woTB4+kv/rXboQPj8T6dTMF5YNp2sXbQUhfLZjBJQTeRSoBWZXsTpZgYz+eFtbiyVPbx7y jVU/IYSoqrDui/mZt/Y+8EDh68SJuGpuYbbZqMPb4Oyn7V901djZv9ZPzkHN7Kh4x4Hqw4 QtiQXnfZYphIEjNUGfjhwvDTEk9FlNxlAEa+0k1pj0KOIF2cXAqNddP9pRSYUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716668283; a=rsa-sha256; cv=none; b=mmtRvUwRtADV05ouKOmDPd+RBcYZ4/T0MLp2c/5d1dF+xaT3T8psptItUTrp0wcGjtuINE 2GSju9ijOnKA/XIrklKSGvJ4rdT3iandS2yLQg4szwkwpqxF7CGXtdDJbZst7cjypxxiUc JHrMuWBPG/KMZOTDsbt3Rm6wfjXvdr+DBf9dTu2GveK2R2oxkN3nVM2mcq8g+SbpT7nP2L nUvoCpGW0rZih8P2yNAy9cIpbG6/09Wic3nad9aoJageA3w7S0Y9k6OjjJT1aOhoPASs7g MthUHviBGQxc3QkU0RQhE7Cd6dXHg2I81rOjawmV1jgmQIJMOzk/oIEHzrMnqA== 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=1716668283; 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=+bWukvAPs5fAdlwwI83k5GBk0VRbBYJAF2q+qhdHmk8=; b=wKmtLus0AYRXgYAar7SrGJn8geITvwIe1jrXbwW0RVIvAEc7Vd1HAwt6J0AYqyWi48QgG9 FhfU43ogLroLfDDDuLWywm3CHjLbN/TdmFx2hrUAFqCe+QI1RJZFCiE6x1RrhUcl58mGbX BlctrdjqY2EZ5Gh8MD39se+yi3hq9h6RxDf7zwApqwlcsba9HRql69IoR+wNedibemrM3+ yKP5W1IQfZEAFoSV/QqHOv60HWHZGmYh8C7XvoicBIIbNqvQl0tMf6T5nwy9L7dIQwJ0lp ZIY6puL6ppEV/A9eCcVTRUqGCI23lz5KA9DuN0x1iFc5NfOLq8o+qKP1aE7fzA== 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 4VmtWb3D5ZzWBD; Sat, 25 May 2024 20:18:03 +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 44PKI3NS015679; Sat, 25 May 2024 20:18:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44PKI3L3015676; Sat, 25 May 2024 20:18:03 GMT (envelope-from git) Date: Sat, 25 May 2024 20:18:03 GMT Message-Id: <202405252018.44PKI3L3015676@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: cadd2ca21765 - main - Merge commit d0be944aa511 from llvm-project (by Simon Pilgrim): 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: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: cadd2ca21765ebcb95b77ec94977b4e74e1edc1b Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=cadd2ca21765ebcb95b77ec94977b4e74e1edc1b commit cadd2ca21765ebcb95b77ec94977b4e74e1edc1b Author: Dimitry Andric AuthorDate: 2024-05-25 17:52:15 +0000 Commit: Dimitry Andric CommitDate: 2024-05-25 19:12:29 +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 --- 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,