Skip to content

nvptx: Re-enable fixed merge-functions#154301

Open
Flakebi wants to merge 1 commit intorust-lang:mainfrom
Flakebi:remove-merge-funcs-workaround
Open

nvptx: Re-enable fixed merge-functions#154301
Flakebi wants to merge 1 commit intorust-lang:mainfrom
Flakebi:remove-merge-funcs-workaround

Conversation

@Flakebi
Copy link
Contributor

@Flakebi Flakebi commented Mar 24, 2026

The merge-functions pass generating calls to kernels was fixed in LLVM (released in LLVM 22), so we can remove the workaround and re-enable the merge-functions pass.

The bpf target also disables merge-functions, though from the comment there seem to be other reasons to do that.

Fixes #57356.

The merge-functions pass generating calls to kernels was fixed in LLVM
(released in LLVM 22), so we can remove the workaround and re-enable the
merge-functions pass.
@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 24, 2026
@rustbot
Copy link
Collaborator

rustbot commented Mar 24, 2026

r? @wesleywiser

rustbot has assigned @wesleywiser.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 69 candidates
  • Random selection from 12 candidates

@rust-log-analyzer
Copy link
Collaborator

The job aarch64-gnu-llvm-21-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
##[endgroup]
Executing "/scripts/stage_2_test_set1.sh"
+ /scripts/stage_2_test_set1.sh
+ '[' 1 == 1 ']'
+ echo 'PR_CI_JOB set; skipping tidy'
+ SKIP_TIDY='--skip tidy'
+ ../x.py --stage 2 test --skip tidy --skip compiler --skip src
PR_CI_JOB set; skipping tidy
##[group]Building bootstrap
    Finished `dev` profile [unoptimized] target(s) in 0.04s
##[endgroup]
---

---- [assembly] tests/assembly-llvm/asm/nvptx-types.rs stdout ----
------rustc stdout------------------------------

------rustc stderr------------------------------
warning: type `ptr` should have an upper camel case name
##[warning]  --> /checkout/tests/assembly-llvm/asm/nvptx-types.rs:13:6
   |
13 | type ptr = *mut u8;
   |      ^^^ help: convert the identifier to upper camel case: `Ptr`
   |
   = note: `#[warn(non_camel_case_types)]` (part of `#[warn(nonstandard_style)]`) on by default

rustc-LLVM ERROR: .alias requires PTX version >= 6.3 and sm_30

------------------------------------------

error: compilation failed!
status: exit status: 101
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/assembly-llvm/asm/nvptx-types.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--check-cfg" "cfg(test,FALSE)" "-O" "-Cdebug-assertions=no" "-Zcodegen-source-order" "--emit" "asm" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/assembly-llvm/asm/nvptx-types/nvptx-types.s" "-A" "internal_features" "-A" "incomplete_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Cpanic=abort" "-Cforce-unwind-tables=yes" "--target" "nvptx64-nvidia-cuda" "--extern" "minicore=/checkout/obj/build/aarch64-unknown-linux-gnu/test/assembly-llvm/asm/nvptx-types/libminicore.rlib"
stdout: none
--- stderr -------------------------------
warning: type `ptr` should have an upper camel case name
##[warning]  --> /checkout/tests/assembly-llvm/asm/nvptx-types.rs:13:6
   |
13 | type ptr = *mut u8;
   |      ^^^ help: convert the identifier to upper camel case: `Ptr`
   |
   = note: `#[warn(non_camel_case_types)]` (part of `#[warn(nonstandard_style)]`) on by default

rustc-LLVM ERROR: .alias requires PTX version >= 6.3 and sm_30
------------------------------------------

---- [assembly] tests/assembly-llvm/asm/nvptx-types.rs stdout end ----

failures:

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

Labels

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MergeFunctions LLVM pass can generate invalid function calls under calling convention

4 participants