Skip to content

Conversation

@Sa4dUs
Copy link
Contributor

@Sa4dUs Sa4dUs commented Dec 30, 2025

Removes explicit insertion point handling and recovers the pointer at the end of the saved basic block.

r? @ZuseZ4

fixes: #150413

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Dec 30, 2025
@Sa4dUs Sa4dUs changed the title fix offload inline Allow inline calls to offload intrinsic Dec 30, 2025
@rust-log-analyzer

This comment has been minimized.

@bors bors 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 Dec 30, 2025
@Sa4dUs Sa4dUs marked this pull request as ready for review December 31, 2025 00:57
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 31, 2025
@ZuseZ4
Copy link
Member

ZuseZ4 commented Dec 31, 2025

Now that we can compile a bit more interesting code, we should start adding more tests.
Can you add the Rust code from the issue as codegen-llvm one to make sure we don't regress?

I'd probably test for

  1. fnc name (main),
  2. Check-Not: define (to avoid matching other functions)
  3. Check: the branch instruction br
  4. Check-not: define
  5. Check tgt_target_kernel

But anything that vaguely tests "we have control flow and don't die" works.

Otherwise lgtm.

@rustbot
Copy link
Collaborator

rustbot commented Dec 31, 2025

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@ZuseZ4
Copy link
Member

ZuseZ4 commented Dec 31, 2025

@bors r+

@bors
Copy link
Collaborator

bors commented Dec 31, 2025

📌 Commit 41a24c4 has been approved by ZuseZ4

It is now in the queue for this repository.

@bors bors removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 31, 2025
@ZuseZ4 ZuseZ4 mentioned this pull request Dec 31, 2025
5 tasks
bors added a commit that referenced this pull request Dec 31, 2025
…uwer

Rollup of 3 pull requests

Successful merges:

 - #150193 (Port `#[instruction_set]` to attribute parser)
 - #150511 (Allow inline calls to offload intrinsic)
 - #150539 (Corretly link URL in internal Windows docs)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit d898dcc into rust-lang:main Dec 31, 2025
11 checks passed
@rustbot rustbot added this to the 1.94.0 milestone Dec 31, 2025
rust-timer added a commit that referenced this pull request Dec 31, 2025
Rollup merge of #150511 - Sa4dUs:offload-inline, r=ZuseZ4

Allow inline calls to offload intrinsic

Removes explicit insertion point handling and recovers the pointer at the end of the saved basic block.

r? `@ZuseZ4`

fixes: #150413
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. 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.

std::offload fails on control flow in main

5 participants