1
Fork 0

Add implied target features to target_feature attribute

This commit is contained in:
Caleb Zulawski 2024-07-26 00:05:20 -04:00
parent 6696447f78
commit 74653b61a6
5 changed files with 113 additions and 31 deletions

View file

@ -0,0 +1,24 @@
//@ only-x86_64
//@ run-pass
#![feature(target_feature_11)]
#![allow(dead_code)]
#[target_feature(enable = "ssse3")]
fn call_ssse3() {}
#[target_feature(enable = "avx")]
fn call_avx() {}
#[target_feature(enable = "avx2")]
fn test_avx2() {
call_ssse3();
call_avx();
}
#[target_feature(enable = "fma")]
fn test_fma() {
call_ssse3();
call_avx();
}
fn main() {}