Skip to content

enable PassMode::Indirect { on_stack: true, .. } tail call arguments#153361

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
folkertdev:tail-call-indirect-on-stack-true
Mar 5, 2026
Merged

enable PassMode::Indirect { on_stack: true, .. } tail call arguments#153361
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
folkertdev:tail-call-indirect-on-stack-true

Conversation

@folkertdev
Copy link
Contributor

tracking issue: #112788
fixes #144855

And add a bunch of tests for tail call target support.

r? WaffleLapkin

@folkertdev folkertdev added the F-explicit_tail_calls `#![feature(explicit_tail_calls)]` label Mar 3, 2026
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 3, 2026
@rustbot
Copy link
Collaborator

rustbot commented Mar 3, 2026

WaffleLapkin is not on the review rotation at the moment.
They may take a while to respond.

Comment on lines -1297 to -1301
// FIXME: some LLVM backends (notably x86) do not correctly pass byval
// arguments to tail calls (as of LLVM 21). See also:
//
// - https://github.com/rust-lang/rust/pull/144232#discussion_r2218543841
// - https://github.com/rust-lang/rust/issues/144855
Copy link
Member

Choose a reason for hiding this comment

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

Is this comment not accurate anymore, shouldn't we wait until we don't support llvm 21 anymore?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you can only use tail calls with nightly, which builds with the latest LLVM? We'll need to wait until we don't support LLVM 21 (or higher, given that e.g. riscv will only add support in LLVM 23) for stabilization, but not for experimentation.

@WaffleLapkin
Copy link
Member

@bors r+

@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 4, 2026

📌 Commit e78a9f7 has been approved by WaffleLapkin

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 Mar 4, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Mar 4, 2026
…tack-true, r=WaffleLapkin

enable `PassMode::Indirect { on_stack: true, .. }` tail call arguments

tracking issue: rust-lang#112788
fixes rust-lang#144855

And add a bunch of tests for tail call target support.

r? WaffleLapkin
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Mar 4, 2026
…tack-true, r=WaffleLapkin

enable `PassMode::Indirect { on_stack: true, .. }` tail call arguments

tracking issue: rust-lang#112788
fixes rust-lang#144855

And add a bunch of tests for tail call target support.

r? WaffleLapkin
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Mar 4, 2026
…tack-true, r=WaffleLapkin

enable `PassMode::Indirect { on_stack: true, .. }` tail call arguments

tracking issue: rust-lang#112788
fixes rust-lang#144855

And add a bunch of tests for tail call target support.

r? WaffleLapkin
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Mar 4, 2026
…tack-true, r=WaffleLapkin

enable `PassMode::Indirect { on_stack: true, .. }` tail call arguments

tracking issue: rust-lang#112788
fixes rust-lang#144855

And add a bunch of tests for tail call target support.

r? WaffleLapkin
rust-bors bot pushed a commit that referenced this pull request Mar 4, 2026
Rollup of 9 pull requests

Successful merges:

 - #152164 (Lint unused features)
 - #152801 (Refactor WriteBackendMethods a bit)
 - #153317 (Abort after `representability` errors)
 - #153361 (enable `PassMode::Indirect { on_stack: true, .. }` tail call arguments)
 - #153402 (miri subtree update)
 - #153276 (Remove `cycle_fatal` query modifier)
 - #153396 (use `minicore` in some `run-make` tests)
 - #153401 (Migrationg of `LintDiagnostic` - part 7)
 - #153406 (Remove a ping for myself)
rust-bors bot pushed a commit that referenced this pull request Mar 4, 2026
Rollup of 9 pull requests

Successful merges:

 - #152164 (Lint unused features)
 - #152801 (Refactor WriteBackendMethods a bit)
 - #153317 (Abort after `representability` errors)
 - #153361 (enable `PassMode::Indirect { on_stack: true, .. }` tail call arguments)
 - #153402 (miri subtree update)
 - #153276 (Remove `cycle_fatal` query modifier)
 - #153396 (use `minicore` in some `run-make` tests)
 - #153401 (Migrationg of `LintDiagnostic` - part 7)
 - #153406 (Remove a ping for myself)
@JonathanBrouwer
Copy link
Contributor

@bors r-
#153412 (comment)

@rust-bors rust-bors bot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 4, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 4, 2026

Commit e78a9f7 has been unapproved.

This PR was contained in a rollup (#153412), which was also unapproved.

@folkertdev folkertdev force-pushed the tail-call-indirect-on-stack-true branch from e78a9f7 to 391a755 Compare March 4, 2026 18:43
@folkertdev
Copy link
Contributor Author

Having a host revision fails on wasm32 because the feature flag is not enabled there. Having that revision makes sense for the abi tests that these tests are based on, but I don't think we really need them here, so I've just removed them.

@bors try jobs=test-various

@rust-bors

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Mar 4, 2026
…r=<try>

enable `PassMode::Indirect { on_stack: true, .. }` tail call arguments


try-job: test-various
@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 4, 2026

☀️ Try build successful (CI)
Build commit: 48afccc (48afccc5f13c2208f2509345c6988326c4dfd5d2, parent: b90dc1e597db0bbc0cab0eccb39747b1a9d7e607)

@folkertdev
Copy link
Contributor Author

@bors r=WaffleLapkin

@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 4, 2026

📌 Commit 391a755 has been approved by WaffleLapkin

It is now in the queue for this repository.

🌲 The tree is currently closed for pull requests below priority 1000. This pull request will be tested once the tree is reopened.

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 4, 2026
rust-bors bot pushed a commit that referenced this pull request Mar 5, 2026
…uwer

Rollup of 8 pull requests

Successful merges:

 - #153361 (enable `PassMode::Indirect { on_stack: true, .. }` tail call arguments)
 - #153369 (library/test: always enable unstable features for miri)
 - #152283 (Properly pass offload sizes to kernel args)
 - #153323 (Remove `impl QueryVTable`)
 - #153385 (Fix comment on `is_horizontal_whitespace`)
 - #153394 (fix(thir): Include `NoneWithError` in Enum Struct Tail Assertion)
 - #153419 (rustc_llvm: add missing `-` to flag-comparison logic)
 - #153423 (Update dispatch2 to v0.3.1)
@rust-bors rust-bors bot merged commit fb488de into rust-lang:main Mar 5, 2026
12 checks passed
@rustbot rustbot added this to the 1.96.0 milestone Mar 5, 2026
rust-timer added a commit that referenced this pull request Mar 5, 2026
Rollup merge of #153361 - folkertdev:tail-call-indirect-on-stack-true, r=WaffleLapkin

enable `PassMode::Indirect { on_stack: true, .. }` tail call arguments

tracking issue: #112788
fixes #144855

And add a bunch of tests for tail call target support.

r? WaffleLapkin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

tail calls: Passing Indirect Operands into LLVM hits a span_bug

4 participants