Skip to content

Conversation

@durin42
Copy link
Contributor

@durin42 durin42 commented Oct 21, 2025

This was a bit more invasive than I had kind of hoped. An alternate approach would be to add an extra call_intrinsic_with_attrs() that would have the new-in-this-change signature for call_intrinsic, but this felt about equivalent and made it a little easier to audit the relevant callsites of call_intrinsic().

Related LLVM change is llvm/llvm-project#163802.

@rustbot label llvm-main

@rustbot
Copy link
Collaborator

rustbot commented Oct 21, 2025

r? @lcnr

rustbot has assigned @lcnr.
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

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. 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 Oct 21, 2025
@rust-log-analyzer

This comment has been minimized.

Copy link
Contributor

@nikic nikic left a comment

Choose a reason for hiding this comment

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

The alignment in CodegenFnAttrs is the function alignment -- setting that on an intrinsic call does not make sense. The attribute needs to be set on the argument, not the function.

View changes since this review

@durin42
Copy link
Contributor Author

durin42 commented Oct 21, 2025

@rustbot label llvm-main

@durin42 durin42 added the llvm-main Marks PRs that are making Rust work with LLVM main (this label is consumed by CI tooling) label Oct 21, 2025
@durin42
Copy link
Contributor Author

durin42 commented Oct 21, 2025

The alignment in CodegenFnAttrs is the function alignment -- setting that on an intrinsic call does not make sense. The attribute needs to be set on the argument, not the function.

View changes since this review

Crud, alright. I'll take a fresh crack at this tomorrow or Thursday then, unless someone else beats me to it.

@rustbot label +S-waiting-on-author -S-waiting-on-review

@durin42
Copy link
Contributor Author

durin42 commented Oct 21, 2025

Do I need to use rustc_codegen_llvm::attributes::apply_to_callsite on the return value of bx.call_intrinsic()?

@nikic
Copy link
Contributor

nikic commented Oct 22, 2025

Do I need to use rustc_codegen_llvm::attributes::apply_to_callsite on the return value of bx.call_intrinsic()?

Sounds right.

@lcnr
Copy link
Contributor

lcnr commented Oct 23, 2025

r? @nikic

@rustbot rustbot assigned nikic and unassigned lcnr Oct 23, 2025
@durin42 durin42 force-pushed the llvm-22-intrinsics-changes branch from 8bedc43 to 6151165 Compare October 23, 2025 21:02
@rustbot
Copy link
Collaborator

rustbot commented Oct 23, 2025

This PR was rebased onto a different master 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.

@durin42 durin42 force-pushed the llvm-22-intrinsics-changes branch from 6151165 to df81a79 Compare October 23, 2025 21:03
@rust-log-analyzer

This comment has been minimized.

… alignment as an attribute

This was a bit more invasive than I had kind of hoped. An alternate
approach would be to add an extra call_intrinsic_with_attrs() that would
have the new-in-this-change signature for call_intrinsic, but this felt
about equivalent and made it a little easier to audit the relevant
callsites of call_intrinsic().
@durin42 durin42 force-pushed the llvm-22-intrinsics-changes branch from df81a79 to e3e342a Compare October 23, 2025 21:23
@nikic
Copy link
Contributor

nikic commented Oct 24, 2025

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Oct 24, 2025

📌 Commit e3e342a has been approved by nikic

It is now in the queue for this repository.

@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-review Status: Awaiting review from the assignee but also interested parties. labels Oct 24, 2025
@bors
Copy link
Collaborator

bors commented Oct 24, 2025

⌛ Testing commit e3e342a with merge ab92564...

@bors
Copy link
Collaborator

bors commented Oct 24, 2025

☀️ Test successful - checks-actions
Approved by: nikic
Pushing ab92564 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 24, 2025
@bors bors merged commit ab92564 into rust-lang:master Oct 24, 2025
12 checks passed
@rustbot rustbot added this to the 1.92.0 milestone Oct 24, 2025
@github-actions
Copy link
Contributor

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 8aab621 (parent) -> ab92564 (this PR)

Test differences

Show 34 test diffs

Stage 1

  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-gather.rs: pass -> [missing] (J2)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-gather.rs#LLVM21: [missing] -> pass (J2)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-gather.rs#LLVM22: [missing] -> ignore (ignored when the LLVM version 20.1.2 is older than 22.0.0) (J2)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-masked-load.rs: pass -> [missing] (J2)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-masked-load.rs#LLVM21: [missing] -> pass (J2)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-masked-load.rs#LLVM22: [missing] -> ignore (ignored when the LLVM version 20.1.2 is older than 22.0.0) (J2)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-masked-store.rs: pass -> [missing] (J2)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-masked-store.rs#LLVM21: [missing] -> pass (J2)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-masked-store.rs#LLVM22: [missing] -> ignore (ignored when the LLVM version 20.1.2 is older than 22.0.0) (J2)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-scatter.rs: pass -> [missing] (J2)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-scatter.rs#LLVM21: [missing] -> pass (J2)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-scatter.rs#LLVM22: [missing] -> ignore (ignored when the LLVM version 20.1.2 is older than 22.0.0) (J2)

Stage 2

  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-gather.rs#LLVM22: [missing] -> ignore (ignored when the LLVM version 21.1.3 is older than 22.0.0) (J0)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-masked-load.rs#LLVM22: [missing] -> ignore (ignored when the LLVM version 21.1.3 is older than 22.0.0) (J0)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-masked-store.rs#LLVM22: [missing] -> ignore (ignored when the LLVM version 21.1.3 is older than 22.0.0) (J0)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-scatter.rs#LLVM22: [missing] -> ignore (ignored when the LLVM version 21.1.3 is older than 22.0.0) (J0)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-gather.rs: pass -> [missing] (J1)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-gather.rs#LLVM21: [missing] -> pass (J1)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-masked-load.rs: pass -> [missing] (J1)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-masked-load.rs#LLVM21: [missing] -> pass (J1)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-masked-store.rs: pass -> [missing] (J1)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-masked-store.rs#LLVM21: [missing] -> pass (J1)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-scatter.rs: pass -> [missing] (J1)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-scatter.rs#LLVM21: [missing] -> pass (J1)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-gather.rs#LLVM22: [missing] -> ignore (ignored when the LLVM version 20.1.2 is older than 22.0.0) (J3)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-masked-load.rs#LLVM22: [missing] -> ignore (ignored when the LLVM version 20.1.2 is older than 22.0.0) (J3)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-masked-store.rs#LLVM22: [missing] -> ignore (ignored when the LLVM version 20.1.2 is older than 22.0.0) (J3)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-scatter.rs#LLVM22: [missing] -> ignore (ignored when the LLVM version 20.1.2 is older than 22.0.0) (J3)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-gather.rs#LLVM22: [missing] -> ignore (ignored when the LLVM version 20.1.8 is older than 22.0.0) (J4)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-masked-load.rs#LLVM22: [missing] -> ignore (ignored when the LLVM version 20.1.8 is older than 22.0.0) (J4)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-masked-store.rs#LLVM22: [missing] -> ignore (ignored when the LLVM version 20.1.8 is older than 22.0.0) (J4)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-scatter.rs#LLVM22: [missing] -> ignore (ignored when the LLVM version 20.1.8 is older than 22.0.0) (J4)

Additionally, 2 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard ab925646fae038b02bd462cd328ae9eef1639236 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. pr-check-1: 1930.9s -> 1500.5s (-22.3%)
  2. x86_64-rust-for-linux: 3066.7s -> 2461.8s (-19.7%)
  3. i686-gnu-2: 6430.7s -> 5392.9s (-16.1%)
  4. x86_64-gnu-debug: 7150.2s -> 6137.5s (-14.2%)
  5. pr-check-2: 2715.9s -> 2345.7s (-13.6%)
  6. aarch64-gnu: 6933.2s -> 6019.0s (-13.2%)
  7. aarch64-apple: 8083.1s -> 8816.0s (9.1%)
  8. x86_64-gnu-llvm-20: 2667.7s -> 2428.1s (-9.0%)
  9. x86_64-gnu-gcc: 3296.5s -> 3033.5s (-8.0%)
  10. armhf-gnu: 5286.6s -> 4878.6s (-7.7%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (ab92564): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

This benchmark run did not return any relevant results for this metric.

Cycles

Results (secondary 1.3%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.2% [2.7%, 3.6%] 5
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.6% [-4.6%, -2.6%] 2
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 475.14s -> 474.337s (-0.17%)
Artifact size: 390.49 MiB -> 390.48 MiB (-0.00%)

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. llvm-main Marks PRs that are making Rust work with LLVM main (this label is consumed by CI tooling) merged-by-bors This PR was explicitly merged by bors. 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.

7 participants