disable naked-dead-code-elimination test if no RET mnemonic is available#155692
Conversation
|
r? @jieyouxu rustbot has assigned @jieyouxu. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
Hm actually maybe you want to double-check this, |
This comment was marked as outdated.
This comment was marked as outdated.
|
Hm why does bors trigger |
e087ea0 to
bfe5af9
Compare
|
Some changes occurred in src/tools/compiletest cc @jieyouxu
|
bfe5af9 to
1fcdafd
Compare
|
The rustc-dev-guide subtree was changed. If this PR only touches the dev guide consider submitting a PR directly to rust-lang/rustc-dev-guide otherwise thank you for updating the dev guide with your changes. |
|
@rustbot ready |
e3af485 to
6387697
Compare
Add infrastructure to query LLVM backend for specific assembly mnemonics and use it in compiletest to conditionally run tests based on instruction availability. This fixes test failures with naked-dead-code-elimination which requires the `RET` mnemonic. Co-authored-by: Folkert de Vries <flokkievids@gmail.com>
6387697 to
2a8e588
Compare
|
Nice, thanks! @bors r+ |
…tion, r=folkertdev disable naked-dead-code-elimination test if no RET mnemonic is available this test emit x86_64 specific ret asm instruction and should not be compiled on any other arch.
Rollup of 5 pull requests Successful merges: - #154325 (Tweak irrefutable let else warning output) - #155273 (Lock stable_crate_ids once in create_crate_num) - #155692 (disable naked-dead-code-elimination test if no RET mnemonic is available) - #155747 (Update documentation for `wasm32-wali-linux-musl` after integrating n…) - #155907 (Handle hkl const closures)
…tion, r=folkertdev disable naked-dead-code-elimination test if no RET mnemonic is available this test emit x86_64 specific ret asm instruction and should not be compiled on any other arch.
…uwer Rollup of 12 pull requests Successful merges: - #151994 (switch to v0 mangling by default on stable) - #154325 (Tweak irrefutable let else warning output) - #155899 (`dlltool`: Set the working directory to workaround `--temp-prefix` bug) - #155273 (Lock stable_crate_ids once in create_crate_num) - #155361 (Document that CFI diverges from Rust wrt. ABI-compatibility rules) - #155692 (disable naked-dead-code-elimination test if no RET mnemonic is available) - #155747 (Update documentation for `wasm32-wali-linux-musl` after integrating n…) - #155768 (compiletest: Overhaul the code for running an incremental test revision) - #155907 (Handle hkl const closures) - #155910 (misc stuff from reading borrowck again :)) - #155913 (Delete the 12 year old fixme) - #155920 (remove review queue triagebot mentions)
…tion, r=folkertdev disable naked-dead-code-elimination test if no RET mnemonic is available this test emit x86_64 specific ret asm instruction and should not be compiled on any other arch.
…uwer Rollup of 14 pull requests Successful merges: - #155850 (Only exclude the #155473 change for 1-byte bool-likes) - #155923 (Subtree sync for rustc_codegen_cranelift) - #151994 (switch to v0 mangling by default on stable) - #154325 (Tweak irrefutable let else warning output) - #155899 (`dlltool`: Set the working directory to workaround `--temp-prefix` bug) - #155273 (Lock stable_crate_ids once in create_crate_num) - #155361 (Document that CFI diverges from Rust wrt. ABI-compatibility rules) - #155692 (disable naked-dead-code-elimination test if no RET mnemonic is available) - #155747 (Update documentation for `wasm32-wali-linux-musl` after integrating n…) - #155768 (compiletest: Overhaul the code for running an incremental test revision) - #155907 (Handle hkl const closures) - #155910 (misc stuff from reading borrowck again :)) - #155913 (Delete the 12 year old fixme) - #155920 (remove review queue triagebot mentions)
…uwer Rollup of 14 pull requests Successful merges: - #155850 (Only exclude the #155473 change for 1-byte bool-likes) - #155923 (Subtree sync for rustc_codegen_cranelift) - #151994 (switch to v0 mangling by default on stable) - #154325 (Tweak irrefutable let else warning output) - #155899 (`dlltool`: Set the working directory to workaround `--temp-prefix` bug) - #155273 (Lock stable_crate_ids once in create_crate_num) - #155361 (Document that CFI diverges from Rust wrt. ABI-compatibility rules) - #155692 (disable naked-dead-code-elimination test if no RET mnemonic is available) - #155747 (Update documentation for `wasm32-wali-linux-musl` after integrating n…) - #155768 (compiletest: Overhaul the code for running an incremental test revision) - #155907 (Handle hkl const closures) - #155910 (misc stuff from reading borrowck again :)) - #155913 (Delete the 12 year old fixme) - #155920 (remove review queue triagebot mentions)
…uwer Rollup of 15 pull requests Successful merges: - #155923 (Subtree sync for rustc_codegen_cranelift) - #155930 (Sync from portable simd 2026 04 28) - #155850 (Only exclude the #155473 change for 1-byte bool-likes) - #151994 (switch to v0 mangling by default on stable) - #154325 (Tweak irrefutable let else warning output) - #155273 (Lock stable_crate_ids once in create_crate_num) - #155361 (Document that CFI diverges from Rust wrt. ABI-compatibility rules) - #155692 (disable naked-dead-code-elimination test if no RET mnemonic is available) - #155747 (Update documentation for `wasm32-wali-linux-musl` after integrating n…) - #155768 (compiletest: Overhaul the code for running an incremental test revision) - #155907 (Handle hkl const closures) - #155910 (misc stuff from reading borrowck again :)) - #155913 (Delete the 12 year old fixme) - #155920 (remove review queue triagebot mentions) - #155936 (Rename `SharedContext::emit_dyn_lint*` into `emit_lint*`)
…uwer Rollup of 15 pull requests Successful merges: - #155923 (Subtree sync for rustc_codegen_cranelift) - #155930 (Sync from portable simd 2026 04 28) - #155850 (Only exclude the #155473 change for 1-byte bool-likes) - #151994 (switch to v0 mangling by default on stable) - #154325 (Tweak irrefutable let else warning output) - #155273 (Lock stable_crate_ids once in create_crate_num) - #155361 (Document that CFI diverges from Rust wrt. ABI-compatibility rules) - #155692 (disable naked-dead-code-elimination test if no RET mnemonic is available) - #155747 (Update documentation for `wasm32-wali-linux-musl` after integrating n…) - #155768 (compiletest: Overhaul the code for running an incremental test revision) - #155907 (Handle hkl const closures) - #155910 (misc stuff from reading borrowck again :)) - #155913 (Delete the 12 year old fixme) - #155920 (remove review queue triagebot mentions) - #155936 (Rename `SharedContext::emit_dyn_lint*` into `emit_lint*`)
Rollup merge of #155692 - fneddy:fix_naked-dead-code-elimination, r=folkertdev disable naked-dead-code-elimination test if no RET mnemonic is available this test emit x86_64 specific ret asm instruction and should not be compiled on any other arch.
…henyukang use the new `//@ needs-asm-mnemonic: ret` more Since rust-lang#155692 we have this neat new rule, and a couple of tests should be able to use them.
…henyukang use the new `//@ needs-asm-mnemonic: ret` more Since rust-lang#155692 we have this neat new rule, and a couple of tests should be able to use them.
| reason: "skipping test as non-LLVM backend does not support mnemonic queries" | ||
| .to_string(), | ||
| }; | ||
| } |
There was a problem hiding this comment.
It would have been nicer if this didn't check for LLVM and instead codegen backends by default returned false from the mnemonic query. The CodegenBackend trait could have a has_mnemonic method with a default impl of false.
There was a problem hiding this comment.
Fair, the effect is the same but at least that makes it possible for the other backends to implement something, or to e.g. hardcode some mnemonics being available based on the target.
I'll do some refactoring.
There was a problem hiding this comment.
Actually, the other codegen backends don't handle any of the other print requests either?
…henyukang use the new `//@ needs-asm-mnemonic: ret` more Since rust-lang#155692 we have this neat new rule, and a couple of tests should be able to use them.
View all comments
this test emit x86_64 specific ret asm instruction and should not be compiled on any other arch.