Auto merge of #89937 - JohnTitor:fix-89875, r=Amanieu

Properly check `target_features` not to trigger an assertion

Fixes #89875
I think it should be a condition instead of an assertion to check if it's a register as it's possible that `reg` is a register class.
Also, this isn't related to the issue directly, but `is_target_supported` doesn't check `target_features` attributes. Is there any way to check it on rustc_codegen_llvm?

r? `@Amanieu`
This commit is contained in:
bors 2021-10-27 03:08:47 +00:00
commit a9b2bfb5ed
6 changed files with 28 additions and 9 deletions

View file

@ -0,0 +1,14 @@
// build-pass
// only-x86_64
#![feature(asm, target_feature_11)]
#[target_feature(enable = "avx")]
fn main() {
unsafe {
asm!(
"/* {} */",
out(ymm_reg) _,
);
}
}