about summary refs log tree commit diff
path: root/src/test/codegen
diff options
context:
space:
mode:
authorTomasz Miąsko <tomasz.miasko@gmail.com>2022-03-03 00:00:00 +0000
committerTomasz Miąsko <tomasz.miasko@gmail.com>2022-03-04 16:57:34 +0100
commit095d818e0c9c2428e11287e918c38bb6c487e6ed (patch)
tree6869e5b21fba14afaa35071cee12b541c20ad9ce /src/test/codegen
parentb6f845f22524c161d94ab37d630086780c4aabc1 (diff)
downloadrust-095d818e0c9c2428e11287e918c38bb6c487e6ed.tar.gz
rust-095d818e0c9c2428e11287e918c38bb6c487e6ed.zip
Always include global target features in function attributes
This ensures that information about target features configured with
`-C target-feature=...` or detected with `-C target-cpu=native` is
retained for subsequent consumers of LLVM bitcode.

This is crucial for linker plugin LTO, since this information is not
conveyed to the plugin otherwise.
Diffstat (limited to 'src/test/codegen')
-rw-r--r--src/test/codegen/target-feature-overrides.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/codegen/target-feature-overrides.rs b/src/test/codegen/target-feature-overrides.rs
index 2c19cfd8c22..4be77e36e76 100644
--- a/src/test/codegen/target-feature-overrides.rs
+++ b/src/test/codegen/target-feature-overrides.rs
@@ -29,7 +29,7 @@ pub unsafe fn apple() -> u32 {
     peach()
 }
 
-// target features same as global (not reflected or overriden in IR)
+// target features same as global
 #[no_mangle]
 pub unsafe fn banana() -> u32 {
 // CHECK-LABEL: @banana()
@@ -43,5 +43,5 @@ pub unsafe fn banana() -> u32 {
 // COMPAT-SAME: "target-features"="+avx2,+avx,+avx"
 // INCOMPAT-SAME: "target-features"="-avx2,-avx,+avx"
 // CHECK: attributes [[BANANAATTRS]]
-// CHECK-NOT: target-features
-// CHECK-SAME: }
+// COMPAT-SAME: "target-features"="+avx2,+avx"
+// INCOMPAT-SAME: "target-features"="-avx2,-avx"