Skip to content

Commit 43357b4

Browse files
Added apxf target feature support, under flag apx_target_feature
1 parent e4272d1 commit 43357b4

File tree

4 files changed

+15
-0
lines changed

4 files changed

+15
-0
lines changed

compiler/rustc_codegen_llvm/src/llvm_util.rs

+12
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,18 @@ pub(crate) fn to_llvm_features<'a>(sess: &Session, s: &'a str) -> Option<LLVMFea
307307
("x86", "avx10.1") => Some(LLVMFeature::new("avx10.1-512")),
308308
("x86", "avx10.2") if get_version().0 < 20 => None,
309309
("x86", "avx10.2") if get_version().0 >= 20 => Some(LLVMFeature::new("avx10.2-512")),
310+
("x86", "apxf") => Some(LLVMFeature::with_dependencies(
311+
"egpr",
312+
smallvec![
313+
TargetFeatureFoldStrength::Both("push2pop2"),
314+
TargetFeatureFoldStrength::Both("ppx"),
315+
TargetFeatureFoldStrength::Both("ndd"),
316+
TargetFeatureFoldStrength::Both("ccmp"),
317+
TargetFeatureFoldStrength::Both("cf"),
318+
TargetFeatureFoldStrength::Both("nf"),
319+
TargetFeatureFoldStrength::Both("zu"),
320+
],
321+
)),
310322
(_, s) => Some(LLVMFeature::new(s)),
311323
}
312324
}

compiler/rustc_feature/src/unstable.rs

+1
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,7 @@ declare_features! (
316316
// Unstable `#[target_feature]` directives.
317317
(unstable, aarch64_unstable_target_feature, "1.82.0", Some(44839)),
318318
(unstable, aarch64_ver_target_feature, "1.27.0", Some(44839)),
319+
(unstable, apx_target_feature, "CURRENT_RUSTC_VERSION", Some(139284)),
319320
(unstable, arm_target_feature, "1.27.0", Some(44839)),
320321
(unstable, avx512_target_feature, "1.27.0", Some(44839)),
321322
(unstable, bpf_target_feature, "1.54.0", Some(44839)),

compiler/rustc_span/src/symbol.rs

+1
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,7 @@ symbols! {
459459
anonymous_lifetime_in_impl_trait,
460460
any,
461461
append_const_msg,
462+
apx_target_feature,
462463
arbitrary_enum_discriminant,
463464
arbitrary_self_types,
464465
arbitrary_self_types_pointers,

compiler/rustc_target/src/target_features.rs

+1
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,7 @@ static X86_FEATURES: &[(&str, Stability, ImpliedFeatures)] = &[
393393
("amx-tf32", Unstable(sym::x86_amx_intrinsics), &["amx-tile"]),
394394
("amx-tile", Unstable(sym::x86_amx_intrinsics), &[]),
395395
("amx-transpose", Unstable(sym::x86_amx_intrinsics), &["amx-tile"]),
396+
("apxf", Unstable(sym::apx_target_feature), &[]),
396397
("avx", Stable, &["sse4.2"]),
397398
(
398399
"avx10.1",

0 commit comments

Comments
 (0)