[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Driver / aarch64-mcpu-native.c
blob2e7fc2c5adc4532dde659f1cd9eb9dae915be839
1 // REQUIRES: aarch64-registered-target,system-linux,aarch64-host
2 // RUN: export LLVM_CPUINFO=%S/Inputs/cpunative/neoverse-v2
3 // RUN: %clang --target=aarch64 --print-enabled-extensions -mcpu=native | FileCheck --strict-whitespace --check-prefix=CHECK-FEAT-NV2 --implicit-check-not=FEAT_ %s
5 // CHECK-FEAT-NV2: Extensions enabled for the given AArch64 target
6 // CHECK-FEAT-NV2-EMPTY:
7 // CHECK-FEAT-NV2: Architecture Feature(s) Description
8 // CHECK-FEAT-NV2: FEAT_AES, FEAT_PMULL Enable AES support
9 // CHECK-FEAT-NV2: FEAT_AMUv1 Enable Armv8.4-A Activity Monitors extension
10 // CHECK-FEAT-NV2: FEAT_AdvSIMD Enable Advanced SIMD instructions
11 // CHECK-FEAT-NV2: FEAT_BF16 Enable BFloat16 Extension
12 // CHECK-FEAT-NV2: FEAT_BTI Enable Branch Target Identification
13 // CHECK-FEAT-NV2: FEAT_CCIDX Enable Armv8.3-A Extend of the CCSIDR number of sets
14 // CHECK-FEAT-NV2: FEAT_CRC32 Enable Armv8.0-A CRC-32 checksum instructions
15 // CHECK-FEAT-NV2: FEAT_CSV2_2 Enable architectural speculation restriction
16 // CHECK-FEAT-NV2: FEAT_DIT Enable Armv8.4-A Data Independent Timing instructions
17 // CHECK-FEAT-NV2: FEAT_DPB Enable Armv8.2-A data Cache Clean to Point of Persistence
18 // CHECK-FEAT-NV2: FEAT_DPB2 Enable Armv8.5-A Cache Clean to Point of Deep Persistence
19 // CHECK-FEAT-NV2: FEAT_DotProd Enable dot product support
20 // CHECK-FEAT-NV2: FEAT_ETE Enable Embedded Trace Extension
21 // CHECK-FEAT-NV2: FEAT_FCMA Enable Armv8.3-A Floating-point complex number support
22 // CHECK-FEAT-NV2: FEAT_FHM Enable FP16 FML instructions
23 // CHECK-FEAT-NV2: FEAT_FP Enable Armv8.0-A Floating Point Extensions
24 // CHECK-FEAT-NV2: FEAT_FP16 Enable half-precision floating-point data processing
25 // CHECK-FEAT-NV2: FEAT_FRINTTS Enable FRInt[32|64][Z|X] instructions that round a floating-point number to an integer (in FP format) forcing it to fit into a 32- or 64-bit int
26 // CHECK-FEAT-NV2: FEAT_FlagM Enable Armv8.4-A Flag Manipulation instructions
27 // CHECK-FEAT-NV2: FEAT_FlagM2 Enable alternative NZCV format for floating point comparisons
28 // CHECK-FEAT-NV2: FEAT_I8MM Enable Matrix Multiply Int8 Extension
29 // CHECK-FEAT-NV2: FEAT_JSCVT Enable Armv8.3-A JavaScript FP conversion instructions
30 // CHECK-FEAT-NV2: FEAT_LOR Enable Armv8.1-A Limited Ordering Regions extension
31 // CHECK-FEAT-NV2: FEAT_LRCPC Enable support for RCPC extension
32 // CHECK-FEAT-NV2: FEAT_LRCPC2 Enable Armv8.4-A RCPC instructions with Immediate Offsets
33 // CHECK-FEAT-NV2: FEAT_LSE Enable Armv8.1-A Large System Extension (LSE) atomic instructions
34 // CHECK-FEAT-NV2: FEAT_LSE2 Enable Armv8.4-A Large System Extension 2 (LSE2) atomicity rules
35 // CHECK-FEAT-NV2: FEAT_MPAM Enable Armv8.4-A Memory system Partitioning and Monitoring extension
36 // CHECK-FEAT-NV2: FEAT_MTE, FEAT_MTE2 Enable Memory Tagging Extension
37 // CHECK-FEAT-NV2: FEAT_NV, FEAT_NV2 Enable Armv8.4-A Nested Virtualization Enchancement
38 // CHECK-FEAT-NV2: FEAT_PAN Enable Armv8.1-A Privileged Access-Never extension
39 // CHECK-FEAT-NV2: FEAT_PAN2 Enable Armv8.2-A PAN s1e1R and s1e1W Variants
40 // CHECK-FEAT-NV2: FEAT_PAuth Enable Armv8.3-A Pointer Authentication extension
41 // CHECK-FEAT-NV2: FEAT_PMUv3 Enable Armv8.0-A PMUv3 Performance Monitors extension
42 // CHECK-FEAT-NV2: FEAT_RAS, FEAT_RASv1p1 Enable Armv8.0-A Reliability, Availability and Serviceability Extensions
43 // CHECK-FEAT-NV2: FEAT_RDM Enable Armv8.1-A Rounding Double Multiply Add/Subtract instructions
44 // CHECK-FEAT-NV2: FEAT_RNG Enable Random Number generation instructions
45 // CHECK-FEAT-NV2: FEAT_SB Enable Armv8.5-A Speculation Barrier
46 // CHECK-FEAT-NV2: FEAT_SEL2 Enable Armv8.4-A Secure Exception Level 2 extension
47 // CHECK-FEAT-NV2: FEAT_SHA1, FEAT_SHA256 Enable SHA1 and SHA256 support
48 // CHECK-FEAT-NV2: FEAT_SPE Enable Statistical Profiling extension
49 // CHECK-FEAT-NV2: FEAT_SPECRES Enable Armv8.5-A execution and data prediction invalidation instructions
50 // CHECK-FEAT-NV2: FEAT_SSBS, FEAT_SSBS2 Enable Speculative Store Bypass Safe bit
51 // CHECK-FEAT-NV2: FEAT_SVE Enable Scalable Vector Extension (SVE) instructions
52 // CHECK-FEAT-NV2: FEAT_SVE2 Enable Scalable Vector Extension 2 (SVE2) instructions
53 // CHECK-FEAT-NV2: FEAT_SVE_BitPerm Enable bit permutation SVE2 instructions
54 // CHECK-FEAT-NV2: FEAT_TLBIOS, FEAT_TLBIRANGE Enable Armv8.4-A TLB Range and Maintenance instructions
55 // CHECK-FEAT-NV2: FEAT_TRBE Enable Trace Buffer Extension
56 // CHECK-FEAT-NV2: FEAT_TRF Enable Armv8.4-A Trace extension
57 // CHECK-FEAT-NV2: FEAT_UAO Enable Armv8.2-A UAO PState
58 // CHECK-FEAT-NV2: FEAT_VHE Enable Armv8.1-A Virtual Host extension
60 // RUN: export LLVM_CPUINFO=%S/Inputs/cpunative/neoverse-n1
61 // RUN: %clang --target=aarch64 --print-enabled-extensions -mcpu=native | FileCheck --strict-whitespace --check-prefix=CHECK-FEAT-NN1 --implicit-check-not=FEAT_ %s
63 // CHECK-FEAT-NN1: Extensions enabled for the given AArch64 target
64 // CHECK-FEAT-NN1-EMPTY:
65 // CHECK-FEAT-NN1: Architecture Feature(s) Description
66 // CHECK-FEAT-NN1: FEAT_AES, FEAT_PMULL Enable AES support
67 // CHECK-FEAT-NN1: FEAT_AdvSIMD Enable Advanced SIMD instructions
68 // CHECK-FEAT-NN1: FEAT_CRC32 Enable Armv8.0-A CRC-32 checksum instructions
69 // CHECK-FEAT-NN1: FEAT_DPB Enable Armv8.2-A data Cache Clean to Point of Persistence
70 // CHECK-FEAT-NN1: FEAT_DotProd Enable dot product support
71 // CHECK-FEAT-NN1: FEAT_FP Enable Armv8.0-A Floating Point Extensions
72 // CHECK-FEAT-NN1: FEAT_FP16 Enable half-precision floating-point data processing
73 // CHECK-FEAT-NN1: FEAT_LOR Enable Armv8.1-A Limited Ordering Regions extension
74 // CHECK-FEAT-NN1: FEAT_LRCPC Enable support for RCPC extension
75 // CHECK-FEAT-NN1: FEAT_LSE Enable Armv8.1-A Large System Extension (LSE) atomic instructions
76 // CHECK-FEAT-NN1: FEAT_PAN Enable Armv8.1-A Privileged Access-Never extension
77 // CHECK-FEAT-NN1: FEAT_PAN2 Enable Armv8.2-A PAN s1e1R and s1e1W Variants
78 // CHECK-FEAT-NN1: FEAT_PMUv3 Enable Armv8.0-A PMUv3 Performance Monitors extension
79 // CHECK-FEAT-NN1: FEAT_RAS, FEAT_RASv1p1 Enable Armv8.0-A Reliability, Availability and Serviceability Extensions
80 // CHECK-FEAT-NN1: FEAT_RDM Enable Armv8.1-A Rounding Double Multiply Add/Subtract instructions
81 // CHECK-FEAT-NN1: FEAT_SHA1, FEAT_SHA256 Enable SHA1 and SHA256 support
82 // CHECK-FEAT-NN1: FEAT_SPE Enable Statistical Profiling extension
83 // CHECK-FEAT-NN1: FEAT_SSBS, FEAT_SSBS2 Enable Speculative Store Bypass Safe bit
84 // CHECK-FEAT-NN1: FEAT_UAO Enable Armv8.2-A UAO PState
85 // CHECK-FEAT-NN1: FEAT_VHE Enable Armv8.1-A Virtual Host extension
88 // RUN: export LLVM_CPUINFO=%S/Inputs/cpunative/cortex-a57
89 // RUN: %clang --target=aarch64 --print-enabled-extensions -mcpu=native | FileCheck --strict-whitespace --check-prefix=CHECK-FEAT-CA57 --implicit-check-not=FEAT_ %s
91 // CHECK-FEAT-CA57: Extensions enabled for the given AArch64 target
92 // CHECK-FEAT-CA57-EMPTY:
93 // CHECK-FEAT-CA57: Architecture Feature(s) Description
94 // CHECK-FEAT-CA57: FEAT_AES, FEAT_PMULL Enable AES support
95 // CHECK-FEAT-CA57: FEAT_AdvSIMD Enable Advanced SIMD instructions
96 // CHECK-FEAT-CA57: FEAT_CRC32 Enable Armv8.0-A CRC-32 checksum instructions
97 // CHECK-FEAT-CA57: FEAT_FP Enable Armv8.0-A Floating Point Extensions
98 // CHECK-FEAT-CA57: FEAT_PMUv3 Enable Armv8.0-A PMUv3 Performance Monitors extension
99 // CHECK-FEAT-CA57: FEAT_SHA1, FEAT_SHA256 Enable SHA1 and SHA256 support
101 // RUN: export LLVM_CPUINFO=%S/Inputs/cpunative/cortex-a72
102 // RUN: %clang --target=aarch64 --print-enabled-extensions -mcpu=native | FileCheck --strict-whitespace --check-prefix=CHECK-FEAT-CA72 --implicit-check-not=FEAT_ %s
104 // CHECK-FEAT-CA72: Extensions enabled for the given AArch64 target
105 // CHECK-EMPTY:
106 // CHECK-FEAT-CA72: Architecture Feature(s) Description
107 // CHECK-FEAT-CA72: FEAT_AES, FEAT_PMULL Enable AES support
108 // CHECK-FEAT-CA72: FEAT_AdvSIMD Enable Advanced SIMD instructions
109 // CHECK-FEAT-CA72: FEAT_CRC32 Enable Armv8.0-A CRC-32 checksum instructions
110 // CHECK-FEAT-CA72: FEAT_FP Enable Armv8.0-A Floating Point Extensions
111 // CHECK-FEAT-CA72: FEAT_PMUv3 Enable Armv8.0-A PMUv3 Performance Monitors extension
112 // CHECK-FEAT-CA72: FEAT_SHA1, FEAT_SHA256 Enable SHA1 and SHA256 support
114 // RUN: export LLVM_CPUINFO=%S/Inputs/cpunative/cortex-a76
115 // RUN: %clang --target=aarch64 --print-enabled-extensions -mcpu=native | FileCheck --strict-whitespace --check-prefix=CHECK-FEAT-CA76 --implicit-check-not=FEAT_ %s
117 // CHECK-FEAT-CA76: Extensions enabled for the given AArch64 target
118 // CHECK-FEAT-CA76-EMPTY:
119 // CHECK-FEAT-CA76: Architecture Feature(s) Description
120 // CHECK-FEAT-CA76: FEAT_AES, FEAT_PMULL Enable AES support
121 // CHECK-FEAT-CA76: FEAT_AdvSIMD Enable Advanced SIMD instructions
122 // CHECK-FEAT-CA76: FEAT_CRC32 Enable Armv8.0-A CRC-32 checksum instructions
123 // CHECK-FEAT-CA76: FEAT_DPB Enable Armv8.2-A data Cache Clean to Point of Persistence
124 // CHECK-FEAT-CA76: FEAT_DotProd Enable dot product support
125 // CHECK-FEAT-CA76: FEAT_FP Enable Armv8.0-A Floating Point Extensions
126 // CHECK-FEAT-CA76: FEAT_FP16 Enable half-precision floating-point data processing
127 // CHECK-FEAT-CA76: FEAT_LOR Enable Armv8.1-A Limited Ordering Regions extension
128 // CHECK-FEAT-CA76: FEAT_LRCPC Enable support for RCPC extension
129 // CHECK-FEAT-CA76: FEAT_LSE Enable Armv8.1-A Large System Extension (LSE) atomic instructions
130 // CHECK-FEAT-CA76: FEAT_PAN Enable Armv8.1-A Privileged Access-Never extension
131 // CHECK-FEAT-CA76: FEAT_PAN2 Enable Armv8.2-A PAN s1e1R and s1e1W Variants
132 // CHECK-FEAT-CA76: FEAT_PMUv3 Enable Armv8.0-A PMUv3 Performance Monitors extension
133 // CHECK-FEAT-CA76: FEAT_RAS, FEAT_RASv1p1 Enable Armv8.0-A Reliability, Availability and Serviceability Extensions
134 // CHECK-FEAT-CA76: FEAT_RDM Enable Armv8.1-A Rounding Double Multiply Add/Subtract instructions
135 // CHECK-FEAT-CA76: FEAT_SHA1, FEAT_SHA256 Enable SHA1 and SHA256 support
136 // CHECK-FEAT-CA76: FEAT_SSBS, FEAT_SSBS2 Enable Speculative Store Bypass Safe bit
137 // CHECK-FEAT-CA76: FEAT_UAO Enable Armv8.2-A UAO PState
138 // CHECK-FEAT-CA76: FEAT_VHE Enable Armv8.1-A Virtual Host extension