Skip to content

x86: on targets that requires SSE, use those registers for ABI - #161583

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
RalfJung:x86-sse-abi
Sep 18, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
RalfJung:x86-sse-abi

Conversation

@RalfJung

@RalfJung RalfJung commented Aug 23, 2026

Copy link
Copy Markdown
Member

View all comments

Now that llvm/llvm-project#142321 is fixed, we can use the vector ABI without re-introducing #139029. So this effectively reverts #141309.

Since this means we are relying on the SSE target feature for the Rust ABI, we also need to turn the ABI target feature check into a hard error. If we don't do that, we'll get post-mono errors in some situations and plain miscompilations in others.

Also this will cause performance regressions on LLVM 22 and 21 as those don't have the fix for llvm/llvm-project#142321. IMO that's fine. Programs will do the right thing, they will just be a bit slower due to #139029.

r? @nikic
Cc @tgross35

@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 Aug 23, 2026
@RalfJung
RalfJung force-pushed the x86-sse-abi branch 2 times, most recently from 7f487df to 06a4f6d Compare August 23, 2026 10:33
@RalfJung RalfJung added the I-lang-nominated Nominated for discussion during a lang team meeting. label Aug 23, 2026
@rust-log-analyzer

This comment has been minimized.

Comment thread compiler/rustc_target/src/callconv/mod.rs Outdated
@RalfJung
RalfJung force-pushed the x86-sse-abi branch 2 times, most recently from a01a5dd to 7d66bd1 Compare August 23, 2026 11:45
Comment thread tests/codegen-llvm/simd/splat.rs Outdated
@RalfJung

Copy link
Copy Markdown
Member Author

@bors try jobs=i686,various

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Aug 23, 2026
x86: on targets that requires SSE, use those registers for ABI


try-job: *i686*
try-job: *various*
@rust-bors

rust-bors Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: a32c597 (a32c597e182d95bb782185c7b388721b365ca029)
Base parent: be0ea33 (be0ea33bba5000ac134e58acde780af83d908e44)

@RalfJung

Copy link
Copy Markdown
Member Author

@bors try jobs=aarch64-linux

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Aug 23, 2026
x86: on targets that requires SSE, use those registers for ABI


try-job: *aarch64-linux*
@traviscross traviscross added I-lang-radar Items that are on lang's radar and will need eventual work or consideration. P-lang-drag-1 Lang team prioritization drag level 1. https://rust-lang.zulipchat.com/#narrow/channel/410516-t-lang labels Aug 23, 2026
@rust-bors

rust-bors Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 6212267 (6212267738008defc37104e01a0afc3421c7d50e)
Base parent: 9a4ad59 (9a4ad59ae3073b013cd62f53f8349ddc61a012e8)

@RalfJung

Copy link
Copy Markdown
Member Author

It is strange that PR CI passed. Looks like even on LLVM 21, tests/codegen-llvm/pclmulqdq-target-feature-inlining.rs works? How can that be if it does not have llvm/llvm-project#205106 ?

@joshtriplett joshtriplett added the relnotes Marks issues that should be documented in the release notes of the next release. label Sep 2, 2026
@tmandry tmandry added the T-lang Relevant to the language team label Sep 2, 2026
@RalfJung

This comment was marked as resolved.

@RalfJung

Copy link
Copy Markdown
Member Author

@bors try jobs=test-x86_64-gnu-nopt

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Sep 17, 2026
x86: on targets that requires SSE, use those registers for ABI


try-job: test-x86_64-gnu-nopt
@rust-bors

rust-bors Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: f4bfdd4 (f4bfdd417b5a04eed37ca9fe7569083b1915b4d1)
Base parent: 923c95c (923c95cdf5ba65cea505aa2ea829f578e1506ed8)

@RalfJung

Copy link
Copy Markdown
Member Author

@bors r=nikic

@rust-bors

rust-bors Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 429c1c1 has been approved by nikic

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 17, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Sep 17, 2026
x86: on targets that requires SSE, use those registers for ABI



Now that llvm/llvm-project#142321 is fixed, we can use the vector ABI without re-introducing #139029. So this effectively reverts #141309.

Since this means we are relying on the SSE target feature for the Rust ABI, we also need to turn the ABI target feature check into a hard error. If we don't do that, we'll get post-mono errors in some situations and plain miscompilations in others.

Also this will cause performance regressions on LLVM 22 and 21 as those don't have the fix for  llvm/llvm-project#142321. IMO that's fine. Programs will do the right thing, they will just be a bit slower due to #139029.

r? @nikic 
Cc @tgross35
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job test-x86_64-gnu-tools failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
..                                                 (152/152)

======== tests/rustdoc-gui/copy-code.goml ========

[ERROR] line 28
    at `tests/rustdoc-gui/copy-code.goml` line 13: ProtocolError: Input.dispatchMouseEvent timed out. Increase the 'protocolTimeout' setting in launch/connect calls for a higher timeout if needed.: for command `move-cursor-to: ".example-wrap"`
    at <file:///checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-gui/doc/test_docs/fn.foo.html>

======== tests/rustdoc-gui/search-result-display.goml ========

[WARNING] line 38: Delta is 0 for "x", maybe try to use `compare-elements-position` instead?

@rust-bors rust-bors Bot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 17, 2026
@rust-bors

rust-bors Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

💔 Test for b7b7636 failed: CI. Failed job:

@tgross35

Copy link
Copy Markdown
Member
=> Running 152 doc-ui tests (on 1 thread)...

..............F................................... (50/152)
.................................................. (100/152)
.................................................. (150/152)
..                                                 (152/152)

======== tests/rustdoc-gui/copy-code.goml ========

[ERROR] line 28
    at `tests/rustdoc-gui/copy-code.goml` line 13: ProtocolError: Input.dispatchMouseEvent timed out. Increase the 'protocolTimeout' setting in launch/connect calls for a higher timeout if needed.: for command `move-cursor-to: ".example-wrap"`
    at <file:///checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-gui/doc/test_docs/fn.foo.html>

======== tests/rustdoc-gui/search-result-display.goml ========

[WARNING] line 38: Delta is 0 for "x", maybe try to use `compare-elements-position` instead?


<= doc-ui tests done: 151 succeeded, 1 failed, 0 filtered out

Spurious? That's an interesting failure
@bors retry

@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 Sep 17, 2026
@beetrees

Copy link
Copy Markdown
Contributor

#93784

@rust-bors

This comment has been minimized.

@rust-bors rust-bors Bot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 18, 2026
@rust-bors

rust-bors Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: nikic
Duration: 3h 31m 28s
Pushing 498b89d to main...

@rust-bors
rust-bors Bot merged commit 498b89d into rust-lang:main Sep 18, 2026
15 checks passed
@rustbot rustbot added this to the 1.100.0 milestone Sep 18, 2026
@github-actions

Copy link
Copy Markdown
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 50d5409 (parent) -> 498b89d (this PR)

Test differences

Show 38 test diffs

Stage 1

  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-transmute-array.rs#by-ref: [missing] -> pass (J0)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-transmute-array.rs#x86-64: [missing] -> ignore (only executed when the architecture is x86_64) (J0)
  • [codegen] tests/codegen-llvm/simd/splat.rs#by-ref: [missing] -> pass (J0)
  • [codegen] tests/codegen-llvm/simd/splat.rs#x86-64: [missing] -> ignore (only executed when the architecture is x86_64) (J0)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-transmute-array.rs: pass -> [missing] (J1)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-transmute-array.rs#x86-32-sse2: [missing] -> ignore (only executed when the target rustc_abi is rustc_abi-x86-sse2) (J1)
  • [codegen] tests/codegen-llvm/simd/splat.rs: pass -> [missing] (J1)
  • [codegen] tests/codegen-llvm/simd/splat.rs#x86-32-sse2: [missing] -> ignore (only executed when the target rustc_abi is rustc_abi-x86-sse2) (J1)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-transmute-array.rs#by-ref: [missing] -> ignore (ignored when the architecture is x86_64) (J2)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-transmute-array.rs#x86-64: [missing] -> pass (J2)
  • [codegen] tests/codegen-llvm/simd/splat.rs#by-ref: [missing] -> ignore (ignored when the architecture is x86_64) (J2)
  • [codegen] tests/codegen-llvm/simd/splat.rs#x86-64: [missing] -> pass (J2)
  • [codegen] tests/codegen-llvm/pclmulqdq-target-feature-inlining.rs: pass -> ignore (ignored when the LLVM version 21.1.2 is older than 23.0.0) (J10)
  • [codegen] tests/codegen-llvm/pclmulqdq-target-feature-inlining.rs: pass -> ignore (ignored when the LLVM version 22.1.2 is older than 23.0.0) (J16)

Stage 2

  • [codegen] tests/codegen-llvm/pclmulqdq-target-feature-inlining.rs: pass -> ignore (ignored when the LLVM version 21.1.2 is older than 23.0.0) (J3)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-transmute-array.rs#by-ref: [missing] -> ignore (ignored when the architecture is x86_64) (J4)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-transmute-array.rs#x86-64: [missing] -> pass (J4)
  • [codegen] tests/codegen-llvm/simd/splat.rs#by-ref: [missing] -> ignore (ignored when the architecture is x86_64) (J4)
  • [codegen] tests/codegen-llvm/simd/splat.rs#x86-64: [missing] -> pass (J4)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-transmute-array.rs#by-ref: [missing] -> ignore (ignored when the target rustc_abi is rustc_abi-x86-sse2) (J5)
  • [codegen] tests/codegen-llvm/simd/splat.rs#by-ref: [missing] -> ignore (ignored when the target rustc_abi is rustc_abi-x86-sse2) (J5)
  • [codegen] tests/codegen-llvm/simd/splat.rs#x86-32-sse2: [missing] -> pass (J5)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-transmute-array.rs#x86-32-sse2: [missing] -> ignore (only executed when the target rustc_abi is rustc_abi-x86-sse2) (J6)
  • [codegen] tests/codegen-llvm/simd/splat.rs#x86-32-sse2: [missing] -> ignore (only executed when the target rustc_abi is rustc_abi-x86-sse2) (J6)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-transmute-array.rs: pass -> [missing] (J7)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-transmute-array.rs#x86-64: [missing] -> ignore (only executed when the architecture is x86_64) (J8)
  • [codegen] tests/codegen-llvm/simd/splat.rs#x86-64: [missing] -> ignore (only executed when the architecture is x86_64) (J8)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-transmute-array.rs: ignore (ignored when the target is i686-pc-windows-msvc) -> [missing] (J9)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-transmute-array.rs#x86-32-sse2: [missing] -> ignore (ignored when the target is i686-pc-windows-msvc) (J9)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-transmute-array.rs#x86-32-sse2: [missing] -> pass (J11)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-transmute-array.rs#by-ref: [missing] -> pass (J12)
  • [codegen] tests/codegen-llvm/simd/splat.rs#by-ref: [missing] -> pass (J12)
  • [codegen] tests/codegen-llvm/simd/splat.rs: pass -> [missing] (J13)
  • [codegen] tests/codegen-llvm/pclmulqdq-target-feature-inlining.rs: ignore (only executed when the architecture is x86_64) -> ignore (ignored when the LLVM version 21.1.2 is older than 23.0.0) (J14)
  • [codegen] tests/codegen-llvm/pclmulqdq-target-feature-inlining.rs: pass -> ignore (ignored when the LLVM version 22.1.2 is older than 23.0.0) (J15)

Additionally, 3 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 498b89dd40af107a23c13a009345a0dea224248c --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. test-x86_64-gnu-miri: 52m 20s -> 1h 32m (+76.4%)
  2. test-x86_64-gnu-llvm-22-1: 51m 8s -> 1h 20m (+57.7%)
  3. test-x86_64-gnu-gcc: 53m 47s -> 1h 23m (+55.7%)
  4. dist-powerpc64le-linux-musl: 1h 11m -> 1h 42m (+42.6%)
  5. test-x86_64-gnu-tools: 47m 56s -> 1h 6m (+38.2%)
  6. test-armhf-gnu: 1h 15m -> 1h 42m (+36.2%)
  7. dist-x86_64-llvm-mingw: 2h 19m -> 1h 31m (-34.5%)
  8. test-x86_64-gnu-parallel-frontend: 1h 28m -> 1h 59m (+34.2%)
  9. dist-ohos-aarch64: 59m 18s -> 1h 19m (+33.2%)
  10. dist-x86_64-musl: 2h 30m -> 1h 43m (-31.6%)
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
Copy Markdown
Collaborator

Finished benchmarking commit (498b89d): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This perf run didn't have relevant results for this metric.

Max RSS (memory usage)

Results (secondary 3.1%)

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.1% [3.1%, 3.1%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

Results (primary 0.0%, secondary 3.6%)

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

mean range count
Regressions ❌
(primary)
2.1% [2.1%, 2.1%] 1
Regressions ❌
(secondary)
3.6% [3.1%, 4.0%] 2
Improvements ✅
(primary)
-2.1% [-2.1%, -2.1%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.0% [-2.1%, 2.1%] 2

Binary size

Results (primary -0.1%, secondary -0.1%)

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)
- - 0
Improvements ✅
(primary)
-0.1% [-0.2%, -0.0%] 10
Improvements ✅
(secondary)
-0.1% [-0.2%, -0.0%] 4
All ❌✅ (primary) -0.1% [-0.2%, -0.0%] 10

Bootstrap: 498.048s -> 497.674s (-0.08%)
Artifact size: 408.91 MiB -> 408.91 MiB (0.00%)

@RalfJung
RalfJung deleted the x86-sse-abi branch September 18, 2026 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. I-lang-radar Items that are on lang's radar and will need eventual work or consideration. merged-by-bors This PR was explicitly merged by bors. relnotes Marks issues that should be documented in the release notes of the next release. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-lang Relevant to the language team to-announce Announce this issue on triage meeting

Projects

None yet

Development

Successfully merging this pull request may close these issues.