about summary refs log tree commit diff
path: root/tests/codegen
diff options
context:
space:
mode:
authorJamie Cunliffe <Jamie.Cunliffe@arm.com>2023-05-22 14:46:40 +0100
committerJamie Cunliffe <Jamie.Cunliffe@arm.com>2023-05-22 14:46:40 +0100
commita059e68d118512063e8e3517344178667df951b0 (patch)
tree2ac58edacfffa829bf81e1710ac4ba7e49fe7860 /tests/codegen
parentd51db4275b5271b0349b3d6f21e5eea2d0ee62fc (diff)
downloadrust-a059e68d118512063e8e3517344178667df951b0.tar.gz
rust-a059e68d118512063e8e3517344178667df951b0.zip
Create a structure to define the features from to_llvm_features.
Rather than returning an array of features from to_llvm_features, return a structure that contains
the dependencies. This also contains metadata on how the features depend on each other to allow for
the correct enabling and disabling.
Diffstat (limited to 'tests/codegen')
-rw-r--r--tests/codegen/tied-features-strength.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/codegen/tied-features-strength.rs b/tests/codegen/tied-features-strength.rs
index 5dc9ae47e79..51334c12158 100644
--- a/tests/codegen/tied-features-strength.rs
+++ b/tests/codegen/tied-features-strength.rs
@@ -5,19 +5,19 @@
 
 // The "+v8a" feature is matched as optional as it isn't added when we
 // are targeting older LLVM versions. Once the min supported version
-// is LLVM-14 we can remove the regex matching for this feature.
+// is LLVM-14 we can remove the optional regex matching for this feature.
 
 // [ENABLE_SVE] compile-flags: -C target-feature=+sve
-// ENABLE_SVE: attributes #0 = { {{.*}} "target-features"="+outline-atomics,+sve,+neon{{(,\+v8a)?}}" }
+// ENABLE_SVE: attributes #0 = { {{.*}} "target-features"="{{((\+outline-atomics,?)|(\+v8a,?)?|(\+sve,?)|(\+neon,?))*}}" }
 
 // [DISABLE_SVE] compile-flags: -C target-feature=-sve
-// DISABLE_SVE: attributes #0 = { {{.*}} "target-features"="+outline-atomics,-sve{{(,\+v8a)?}}" }
+// DISABLE_SVE: attributes #0 = { {{.*}} "target-features"="{{((\+outline-atomics,?)|(\+v8a,?)?|(-sve,?)|(\+neon,?))*}}" }
 
 // [DISABLE_NEON] compile-flags: -C target-feature=-neon
-// DISABLE_NEON: attributes #0 = { {{.*}} "target-features"="+outline-atomics,-neon,-fp-armv8{{(,\+v8a)?}}" }
+// DISABLE_NEON: attributes #0 = { {{.*}} "target-features"="{{((\+outline-atomics,?)|(\+v8a,?)?|(-fp-armv8,?)|(-neon,?))*}}" }
 
 // [ENABLE_NEON] compile-flags: -C target-feature=+neon
-// ENABLE_NEON: attributes #0 = { {{.*}} "target-features"="+outline-atomics,+neon,+fp-armv8{{(,\+v8a)?}}" }
+// ENABLE_NEON: attributes #0 = { {{.*}} "target-features"="{{((\+outline-atomics,?)|(\+v8a,?)?|(\+fp-armv8,?)|(\+neon,?))*}}" }
 
 
 #![feature(no_core, lang_items)]