Skip to content

explicit tail calls: ignore some tests on unsupported LLVM targets#156585

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
InvalidPathException:llvm-error
May 18, 2026
Merged

explicit tail calls: ignore some tests on unsupported LLVM targets#156585
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
InvalidPathException:llvm-error

Conversation

@InvalidPathException

Copy link
Copy Markdown
Contributor

Fixes #148748

Add ignore derivatives to two tests that cause the most platforms to fail, there are two reasons:

All tests involving musttail should fail on these platforms due to poor support overall by LLVM, but since they have low usage and supposedly already have many tests failing we limit ignores to the two "worst" tests.

//@ ignore-aix
//@ ignore-csky
//@ ignore-mips
//@ ignore-mips64
//@ ignore-powerpc
//@ ignore-powerpc64
//@ ignore-thumb

aix/powerpc issue: llvm/llvm-project#187119
thumb issue: llvm/llvm-project#73167
mips has been fixed but it is in a different LLVM version than what is pinned by Rust: llvm/llvm-project#57795

These were caused by argument/returns that do not fit in registers (e.g., indirect), they had a fix but were reverted due to lifetime issues:

//@ ignore-riscv64
//@ ignore-loongarch32
//@ ignore-loongarch64

RISC-V had a fix which got reverted: llvm/llvm-project#191508
LoongArch fix also got reverted: llvm/llvm-project#191525

Also add missing compiletest directive names for ignore-csky, ignore-mips, and ignore-mips64.

r? folkertdev

@rustbot

rustbot commented May 14, 2026

Copy link
Copy Markdown
Collaborator

compiletest directives have been modified. Please add or update docs for the
new or modified directive in src/doc/rustc-dev-guide/.

Some changes occurred in src/tools/compiletest

cc @jieyouxu

@rustbot rustbot added A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc F-explicit_tail_calls `#![feature(explicit_tail_calls)]` S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 14, 2026
@InvalidPathException

InvalidPathException commented May 14, 2026

Copy link
Copy Markdown
Contributor Author

My apologies for leaving the issue around - I've been waiting to see what happens to LLVM but it seems like we will not get support on these too soon, maybe it's better to just ignore these for now so they stop troubling folks...

@rustbot

rustbot commented May 14, 2026

Copy link
Copy Markdown
Collaborator

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.

cc @BoxyUwU, @tshepang

@rustbot rustbot added the A-rustc-dev-guide Area: rustc-dev-guide label May 14, 2026
// See https://github.com/rust-lang/rust/issues/148748 for the target test matrix.
// See https://github.com/llvm/llvm-project/issues/63214 for AIX and PowerPC.
// See https://github.com/llvm/llvm-project/issues/57795 for MIPS and MIPS64.
// See https://github.com/llvm/llvm-project/issues/73167 for Thumb.

@folkertdev folkertdev May 15, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you actually read that thread, it seems like tail calls actually do/should work at this point for thumb, at least for recent versions?

View changes since the review

Comment on lines +22 to +23
// See https://github.com/llvm/llvm-project/pull/170547 for the RISC-V fix.
// See https://github.com/llvm/llvm-project/pull/191508 for the RISC-V revert.

@folkertdev folkertdev May 15, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just linking this llvm/llvm-project#185094 which fixes the riscv issue (and extends functionality too). Should be in LLVM 23, and I suspect loongarch will basically copy this approach.

View changes since the review

@folkertdev

Copy link
Copy Markdown
Contributor

@bors r+ rollup

@rust-bors

rust-bors Bot commented May 17, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 04c325f has been approved by folkertdev

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 17, 2026
rust-bors Bot pushed a commit that referenced this pull request May 17, 2026
…uwer

Rollup of 14 pull requests

Successful merges:

 - #151742 (Remove redundant information in `rustc_abi::Variants`)
 - #151362 (Add interior-mutability suggestion to `static_mut_refs`)
 - #156121 (compiler: suggest `.collect()` when `String` is expected and `Iterator` is found)
 - #156208 (Emit retags in codegen to support BorrowSanitizer (part 1))
 - #156596 (Split `LintExpectationId`s)
 - #156607 (ci: Update FreeBSD version to FreeBSD 14)
 - #156376 (suggest hex escapes for C-style escapes)
 - #156577 (Test EII UI tests with prefer-dynamic)
 - #156585 (explicit tail calls: ignore some tests on unsupported LLVM targets)
 - #156598 (Avoid rustfix suggestions for macro-expanded unused imports)
 - #156616 (rustdoc: add test case for `-Drustdoc::` and `--cap-lints`)
 - #156633 (Add regression test for issue #41261)
 - #156635 (rename unexpected_try_recover function)
 - #156636 (minor `rustc_mir_transform` cleanup)
rust-bors Bot pushed a commit that referenced this pull request May 17, 2026
…uwer

Rollup of 14 pull requests

Successful merges:

 - #151742 (Remove redundant information in `rustc_abi::Variants`)
 - #151362 (Add interior-mutability suggestion to `static_mut_refs`)
 - #156121 (compiler: suggest `.collect()` when `String` is expected and `Iterator` is found)
 - #156208 (Emit retags in codegen to support BorrowSanitizer (part 1))
 - #156596 (Split `LintExpectationId`s)
 - #156607 (ci: Update FreeBSD version to FreeBSD 14)
 - #156376 (suggest hex escapes for C-style escapes)
 - #156577 (Test EII UI tests with prefer-dynamic)
 - #156585 (explicit tail calls: ignore some tests on unsupported LLVM targets)
 - #156598 (Avoid rustfix suggestions for macro-expanded unused imports)
 - #156616 (rustdoc: add test case for `-Drustdoc::` and `--cap-lints`)
 - #156633 (Add regression test for issue #41261)
 - #156635 (rename unexpected_try_recover function)
 - #156636 (minor `rustc_mir_transform` cleanup)
@rust-bors rust-bors Bot merged commit ded0aab into rust-lang:main May 18, 2026
11 checks passed
@rustbot rustbot added this to the 1.97.0 milestone May 18, 2026
github-actions Bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request May 18, 2026
…uwer

Rollup of 14 pull requests

Successful merges:

 - rust-lang/rust#151742 (Remove redundant information in `rustc_abi::Variants`)
 - rust-lang/rust#151362 (Add interior-mutability suggestion to `static_mut_refs`)
 - rust-lang/rust#156121 (compiler: suggest `.collect()` when `String` is expected and `Iterator` is found)
 - rust-lang/rust#156208 (Emit retags in codegen to support BorrowSanitizer (part 1))
 - rust-lang/rust#156596 (Split `LintExpectationId`s)
 - rust-lang/rust#156607 (ci: Update FreeBSD version to FreeBSD 14)
 - rust-lang/rust#156376 (suggest hex escapes for C-style escapes)
 - rust-lang/rust#156577 (Test EII UI tests with prefer-dynamic)
 - rust-lang/rust#156585 (explicit tail calls: ignore some tests on unsupported LLVM targets)
 - rust-lang/rust#156598 (Avoid rustfix suggestions for macro-expanded unused imports)
 - rust-lang/rust#156616 (rustdoc: add test case for `-Drustdoc::` and `--cap-lints`)
 - rust-lang/rust#156633 (Add regression test for issue rust-lang/rust#41261)
 - rust-lang/rust#156635 (rename unexpected_try_recover function)
 - rust-lang/rust#156636 (minor `rustc_mir_transform` cleanup)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-compiletest Area: The compiletest test runner A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc F-explicit_tail_calls `#![feature(explicit_tail_calls)]` S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

riscv64: rustc-LLVM ERROR: failed to perform tail call elimination on a call site marked musttail

3 participants