-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'fma' is missing in target-feature #40406
Comments
Rustc does not expose all the LLVM features via attributes consciously. Not a bug. If you want it added your best bet is to make a PR. |
Wouldn't it be better to output a warning in such a case? |
arielb1
pushed a commit
to arielb1/rust
that referenced
this issue
Mar 11, 2017
rustc: Whitelist the FMA target feature This commit adds the entry `"fma\0"` to the whitelist for the x86 target. LLVM already supports fma but rustc did not directly. Previously rustc permitted `+fma` in the target-feature argument and enabled the use of FMA instructions, but it did not list it in the configuration and attributes. fixes rust-lang#40406
arielb1
pushed a commit
to arielb1/rust
that referenced
this issue
Mar 11, 2017
rustc: Whitelist the FMA target feature This commit adds the entry `"fma\0"` to the whitelist for the x86 target. LLVM already supports fma but rustc did not directly. Previously rustc permitted `+fma` in the target-feature argument and enabled the use of FMA instructions, but it did not list it in the configuration and attributes. fixes rust-lang#40406
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When setting
target-feature=+fma
and printing the features via--print cfg
only avx and sse* are listed as target features. Also queries like#[cfg(target_feature = "fma")]
do not detect fma. FMA instructions likex86_mm256_fmadd_ps
are only usable when fma is enable via target-feature as expected.The output of
rustc -C target-feature=+fma --print cfg
isand the expected output is
Also this example
outputs
FMA is not supported
even if it was enabled.Meta
rustc --version --verbose
:rustc 1.17.0-nightly (b1e3176 2017-03-03)
binary: rustc
commit-hash: b1e3176
commit-date: 2017-03-03
host: x86_64-unknown-linux-gnu
release: 1.17.0-nightly
LLVM version: 3.9
The text was updated successfully, but these errors were encountered: