Skip to content

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

Open
InvalidPathException wants to merge 1 commit into
rust-lang:mainfrom
InvalidPathException:llvm-error
Open

explicit tail calls: ignore some tests on unsupported LLVM targets#156585
InvalidPathException wants to merge 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
Copy link
Copy Markdown
Collaborator

rustbot commented May 14, 2026

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
Copy link
Copy Markdown
Contributor Author

InvalidPathException commented May 14, 2026

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
Copy link
Copy Markdown
Collaborator

rustbot commented May 14, 2026

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.
Copy link
Copy Markdown
Contributor

@folkertdev folkertdev May 15, 2026

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.
Copy link
Copy Markdown
Contributor

@folkertdev folkertdev May 15, 2026

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

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-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.

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