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:
commit
a9b2bfb5ed
6 changed files with 28 additions and 9 deletions
14
src/test/ui/asm/x86_64/issue-89875.rs
Normal file
14
src/test/ui/asm/x86_64/issue-89875.rs
Normal 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) _,
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue