Skip to content

Commit 69e0fd6

Browse files
[X86] Remove PREFETCHI from PTL (#163196)
Per Intel Architecture Instruction Set Extensions Programming Reference rev. 59 (https://cdrdv2.intel.com/v1/dl/getContent/671368), table 1-2, PTL doesn't have support for PREFETCHI.
1 parent 6f51431 commit 69e0fd6

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

clang/test/Preprocessor/predefined-arch-macros.c

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2525,10 +2525,10 @@
25252525
// RUN: | FileCheck -match-full-lines %s -check-prefixes=CHECK_ARL_M32,CHECK_ARLS_M32,CHECK_KL_M32
25262526
// RUN: %clang -march=pantherlake -m32 -E -dM %s -o - 2>&1 \
25272527
// RUN: -target i386-unknown-linux \
2528-
// RUN: | FileCheck -match-full-lines %s -check-prefixes=CHECK_ARL_M32,CHECK_ARLS_M32,CHECK_PTL_M32,CHECK_NKL_M32
2528+
// RUN: | FileCheck -match-full-lines %s -check-prefixes=CHECK_ARL_M32,CHECK_ARLS_M32,CHECK_NKL_M32
25292529
// RUN: %clang -march=clearwaterforest -m32 -E -dM %s -o - 2>&1 \
25302530
// RUN: -target i386-unknown-linux \
2531-
// RUN: | FileCheck -match-full-lines %s -check-prefixes=CHECK_SRF_M32,CHECK_ARLS_M32,CHECK_PTL_M32,CHECK_CWF_M32,CHECK_NKL_M32
2531+
// RUN: | FileCheck -match-full-lines %s -check-prefixes=CHECK_SRF_M32,CHECK_ARLS_M32,CHECK_CWF_M32,CHECK_NKL_M32
25322532
// CHECK_ARL_M32: #define __ADX__ 1
25332533
// CHECK_ARL_M32: #define __AES__ 1
25342534
// CHECK_ARL_M32: #define __AVX2__ 1
@@ -2568,7 +2568,7 @@
25682568
// CHECK_ARL_M32: #define __POPCNT__ 1
25692569
// CHECK_ARL_M32-NOT: #define __PREFETCHI__ 1
25702570
// CHECK_ARLS_M32-NOT: #define __PREFETCHI__ 1
2571-
// CHECK_PTL_M32: #define __PREFETCHI__ 1
2571+
// CHECK_CWF_M32: #define __PREFETCHI__ 1
25722572
// CHECK_ARL_M32: #define __PRFCHW__ 1
25732573
// CHECK_ARL_M32: #define __PTWRITE__ 1
25742574
// CHECK_ARL_M32-NOT: #define __RAOINT__ 1
@@ -2595,7 +2595,6 @@
25952595
// CHECK_ARL_M32: #define __UINTR__ 1
25962596
// CHECK_ARL_M32-NOT: #define __USERMSR__ 1
25972597
// CHECK_ARLS_M32-NOT: #define __USERMSR__ 1
2598-
// CHECK_PTL_M32-NOT: #define __USERMSR__ 1
25992598
// CHECK_CWF_M32: #define __USERMSR__ 1
26002599
// CHECK_ARL_M32: #define __VAES__ 1
26012600
// CHECK_ARL_M32: #define __VPCLMULQDQ__ 1
@@ -2630,10 +2629,10 @@
26302629
// RUN: | FileCheck -match-full-lines %s -check-prefixes=CHECK_ARL_M64,CHECK_ARLS_M64,CHECK_KL_M64
26312630
// RUN: %clang -march=pantherlake -m64 -E -dM %s -o - 2>&1 \
26322631
// RUN: -target i386-unknown-linux \
2633-
// RUN: | FileCheck -match-full-lines %s -check-prefixes=CHECK_ARL_M64,CHECK_ARLS_M64,CHECK_PTL_M64,CHECK_NKL_M64
2632+
// RUN: | FileCheck -match-full-lines %s -check-prefixes=CHECK_ARL_M64,CHECK_ARLS_M64,CHECK_NKL_M64
26342633
// RUN: %clang -march=clearwaterforest -m64 -E -dM %s -o - 2>&1 \
26352634
// RUN: -target i386-unknown-linux \
2636-
// RUN: | FileCheck -match-full-lines %s -check-prefixes=CHECK_ARL_M64,CHECK_SRF_M64,CHECK_ARLS_M64,CHECK_PTL_M64,CHECK_CWF_M64,CHECK_NKL_M64
2635+
// RUN: | FileCheck -match-full-lines %s -check-prefixes=CHECK_ARL_M64,CHECK_SRF_M64,CHECK_ARLS_M64,CHECK_CWF_M64,CHECK_NKL_M64
26372636
// CHECK_ARL_M64: #define __ADX__ 1
26382637
// CHECK_ARL_M64: #define __AES__ 1
26392638
// CHECK_ARL_M64: #define __AVX2__ 1
@@ -2673,7 +2672,7 @@
26732672
// CHECK_ARL_M64: #define __POPCNT__ 1
26742673
// CHECK_ARL_M64-NOT: #define __PREFETCHI__ 1
26752674
// CHECK_ARLS_M64-NOT: #define __PREFETCHI__ 1
2676-
// CHECK_PTL_M64: #define __PREFETCHI__ 1
2675+
// CHECK_CWF_M64: #define __PREFETCHI__ 1
26772676
// CHECK_ARL_M64: #define __PRFCHW__ 1
26782677
// CHECK_ARL_M64: #define __PTWRITE__ 1
26792678
// CHECK_ARL_M64-NOT: #define __RAOINT__ 1
@@ -2701,7 +2700,6 @@
27012700
// CHECK_ARL_M64: #define __UINTR__ 1
27022701
// CHECK_ARL_M64-NOT: #define __USERMSR__ 1
27032702
// CHECK_ARLS_M64-NOT: #define __USERMSR__ 1
2704-
// CHECK_PTL_M64-NOT: #define __USERMSR__ 1
27052703
// CHECK_CWF_M64: #define __USERMSR__ 1
27062704
// CHECK_ARL_M64: #define __VAES__ 1
27072705
// CHECK_ARL_M64: #define __VPCLMULQDQ__ 1

llvm/lib/Target/X86/X86.td

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1335,9 +1335,8 @@ def ProcessorFeatures {
13351335
!listconcat(ARLFeatures, ARLSAdditionalFeatures);
13361336

13371337
// Pantherlake
1338-
list<SubtargetFeature> PTLAdditionalFeatures = [FeaturePREFETCHI];
13391338
list<SubtargetFeature> PTLFeatures =
1340-
!listremove(!listconcat(ARLSFeatures, PTLAdditionalFeatures), [FeatureWIDEKL]);
1339+
!listremove(ARLSFeatures, [FeatureWIDEKL]);
13411340

13421341

13431342
// Clearwaterforest

llvm/lib/TargetParser/X86TargetParser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ constexpr FeatureBitset FeaturesArrowlakeS =
175175
FeaturesArrowlake | FeatureAVXVNNIINT16 | FeatureSHA512 | FeatureSM3 |
176176
FeatureSM4;
177177
constexpr FeatureBitset FeaturesPantherlake =
178-
(FeaturesArrowlakeS ^ FeatureWIDEKL) | FeaturePREFETCHI;
178+
(FeaturesArrowlakeS ^ FeatureWIDEKL);
179179
constexpr FeatureBitset FeaturesClearwaterforest =
180180
(FeaturesSierraforest ^ FeatureWIDEKL) | FeatureAVXVNNIINT16 |
181181
FeatureSHA512 | FeatureSM3 | FeatureSM4 | FeaturePREFETCHI | FeatureUSERMSR;

0 commit comments

Comments
 (0)