From nobody Tue May 28 05:27:15 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 4VpLcM5yzWz5LfPK; Tue, 28 May 2024 05:27:15 +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 4VpLcM4YfYz4j51; Tue, 28 May 2024 05:27:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716874035; 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=i3Ib0Qnf/uuCi60ofH0Dv1g603OB0sqj3/IB7mOdFJE=; b=FC8UUE2Bfdt6kCBoUttBCl1d94iNT4hQy1Cy2vF66fTMJjGIufbOykTrV9g9vfdeNAfT4A rmQkefujVYlHMoPR3+siV5WrJyexAJ/Uzp3K/0n2ttcf1SjZsRbO5x0RUh4T/RryOlT7+Q 6HnsUblyqLBAt3RC5c1NzY/51K7bQFZnCU4Tsw8cT0jCe39612uVAQ75CzpFsIeColHydt M4xnZYq7mP28Vw0/wBGmvOfA+5/Ny+EHIXeBteQr6JDSAO+oRM51UTTqN6YpF7mi+PaevU ziAnIFUqW/2Hezv/rQpdVLLbAgyq2M1N5BRf1Oay8q4vCCZn7RoDq2PF8MUT9g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716874035; a=rsa-sha256; cv=none; b=oMaatJkZkhOTmpX/iKlrOW46l5Yg5gMJu+g1zhutqxuNtYSWbwm30i50VjwtJKaMXQqVtu 6jrJXarlJ7NK+aZzVY03LHDWA5nzYhADrD6ci17vwPfQ+repxIy/fRDcULazysrapnoBjX LihVk2IKT6fYggpLby09U3Y5vdl5MaHbVc8h8BLk77Fpc3GJWlzLygQtvBCEkuqpeMOqUL NDuGmf09WufEVdRTQxTF3EX+4fOCVA91a7n19lLKKzLf9QoT9byk6aSVHAUQ9kCQU3vMV5 lW5IuUV4HspnFRpsg4QcsfJtL/n+TwYxzylaVtRlSCGnqrwRnUjDmbLtF8nyAQ== 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=1716874035; 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=i3Ib0Qnf/uuCi60ofH0Dv1g603OB0sqj3/IB7mOdFJE=; b=freyjD/BXFhT2Aa58K++cZE1FPu3oG/2DJqVfzZW3fhxCkxFZNd5OXyMEaX27zJnJUZy8b 4ciCjNtI80QwaXAlZmI/sEcuYpFqhtKenPi0FU6J5rEVpTADJOilGaAfe27bSHP/4YQBFT 2zJC8tP75qbuCwWzc8Ahj4RxmZpSKDCsxmD/Lo0cRfIXgXyIW5AUYSRh9/Glz7LvFKw8RN eHU7C125t7ZY+HzT3dOQZuqjPHlTgmzjSkpKU0PTW2rW3HnA/eJIMEq7AYl8PE0tH3Cyv5 lQ1Z+ZsDX9X1f57MWiYrUShwG2CpJbcRc29UpiI+KKOy0Xg2TyL2Lg+vl2G2gw== 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 4VpLcM49ndz1FDd; Tue, 28 May 2024 05:27:15 +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 44S5RFZh018565; Tue, 28 May 2024 05:27:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44S5RFCQ018562; Tue, 28 May 2024 05:27:15 GMT (envelope-from git) Date: Tue, 28 May 2024 05:27:15 GMT Message-Id: <202405280527.44S5RFCQ018562@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: ec38746722a1 - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: ec38746722a15b4376bed274e96ff7b8c31804e1 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=ec38746722a15b4376bed274e96ff7b8c31804e1 commit ec38746722a15b4376bed274e96ff7b8c31804e1 Author: Dimitry Andric AuthorDate: 2024-05-25 17:52:15 +0000 Commit: Dimitry Andric CommitDate: 2024-05-28 05:25:49 +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,