[llvm] [X86] Remove TuningPOPCNTFalseDeps from AlderLake (PR #154004)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 17 02:46:40 PDT 2025
ms178 wrote:
Could you please take a look if that is also true for TuningLZCNTFalseDeps? I've applied the patch below locally which also implements [FeatureERMSB, FeatureFSRM] for Raptor Lake and it seems to perform fine, but that might be an idea for another patch.
```
--- a/llvm/lib/Target/X86/X86.td 2025-08-17 08:57:51.604276317 +0200
+++ b/llvm/lib/Target/X86/X86.td 2025-08-17 09:07:22.804296154 +0200
@@ -1291,10 +1292,23 @@ def ProcessorFeatures {
list<SubtargetFeature> ADLAdditionalTuning = [TuningPERMFalseDeps,
TuningPreferMovmskOverVTest,
TuningFastImmVectorShift];
- list<SubtargetFeature> ADLTuning = !listconcat(SKLTuning, ADLAdditionalTuning);
+ // Remove inherited false-dependency tunings that do not apply on Alder/Raptor Lake
+ list<SubtargetFeature> ADLRemoveTuning = [TuningPOPCNTFalseDeps,
+ TuningLZCNTFalseDeps];
+ list<SubtargetFeature> ADLTuning =
+ !listremove(!listconcat(SKLTuning, ADLAdditionalTuning), ADLRemoveTuning);
list<SubtargetFeature> ADLFeatures =
!listconcat(TRMFeatures, ADLAdditionalFeatures);
+ // Raptor Lake (client, no AVX-512): enable fast string ops + prefer 128-bit compute
+ list<SubtargetFeature> RLAdditionalFeatures = [FeatureERMSB, FeatureFSRM];
+ list<SubtargetFeature> RLFeatures =
+ !listconcat(ADLFeatures, RLAdditionalFeatures);
+
+ list<SubtargetFeature> RLAdditionalTuning = [TuningPrefer128Bit];
+ list<SubtargetFeature> RLTuning =
+ !listconcat(ADLTuning, RLAdditionalTuning);
+
// Gracemont
list<SubtargetFeature> GRTTuning = [TuningMacroFusion,
TuningSlow3OpsLEA,
@@ -1866,7 +1880,7 @@ foreach P = ["sierraforest", "grandridge
ProcessorFeatures.GRTTuning>;
}
def : ProcModel<"raptorlake", AlderlakePModel,
- ProcessorFeatures.ADLFeatures, ProcessorFeatures.ADLTuning>;
+ ProcessorFeatures.RLFeatures, ProcessorFeatures.RLTuning>;
def : ProcModel<"meteorlake", AlderlakePModel,
ProcessorFeatures.ADLFeatures, ProcessorFeatures.ADLTuning>;
def : ProcModel<"arrowlake", AlderlakePModel,
```
https://github.com/llvm/llvm-project/pull/154004
More information about the llvm-commits
mailing list