Skip to content

compiler-builtins subtree update - #165730

Open
kleinesfilmroellchen wants to merge 9 commits into
rust-lang:mainfrom
kleinesfilmroellchen:cb-2026-11
Open

kleinesfilmroellchen wants to merge 9 commits into
rust-lang:mainfrom
kleinesfilmroellchen:cb-2026-11

Conversation

@kleinesfilmroellchen

Copy link
Copy Markdown

Subtree update of compiler-builtins to rust-lang/compiler-builtins@099953f.

Created using https://github.com/rust-lang/josh-sync.

r? @ghost

kleinesfilmroellchen and others added 9 commits October 7, 2026 16:24
… core+alloc

This (probably?) requires rebuilding compiler_intrinsics via build_std.
Note that this code is trivially correct, as it simply turns maybe-ifs into never-ifs.

On thumbv8m.main-none-eabi with -Os, this reduces memcpy from 324 bytes to 30 bytes. The assembly is so short, I can include it in the commit message:

```arm-assembly
0000152a <__aeabi_memcpy>:
    152a:           1883        adds    r3, r0, r2
    152c:           4298        cmp     r0, r3
    152e:           bf28        it      cs
    1530:           4770        bxcs    lr
    1532:           b580        push    {r7, lr}
    1534:           466f        mov     r7, sp
    1536:       ,-> f811 3b01   ldrb.w  r3, [r1], rust-lang#1
    153a:       |   3a01        subs    r2, rust-lang#1
    153c:       |   f800 3b01   strb.w  r3, [r0], rust-lang#1
    1540:       '-- d1f9        bne.n   1536 <__aeabi_memcpy+0xc>
    1542:           e8bd 4080   ldmia.w sp!, {r7, lr}
    1546:           4770        bx      lr
```

memset is reduced from 100 to 26 bytes at least in simple tests.
This hides the much slower versions of
memcpy/memset. The regular flag is still kept in
case it gets used in the future by other code.
@rustbot

rustbot commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

compiler-builtins is developed in its own repository. If possible, consider making this change to rust-lang/compiler-builtins instead.

cc @tgross35

@rustbot rustbot added A-compiler-builtins Area: compiler-builtins (https://github.com/rust-lang/compiler-builtins) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Nov 9, 2026
@rustbot

rustbot commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

⚠️ Warning ⚠️

  • There are issue links (such as #123) in the commit messages of the following commits.
    Please move them to the PR description, to avoid spamming the issues with references to the commit, and so this bot can automatically canonicalize them to avoid issues with subtrees.

@tgross35

Copy link
Copy Markdown
Member

The additions aren't yet tested, I don't want to do a sync without that

@rustbot blocked

@rustbot rustbot added S-blocked Status: Blocked on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 10, 2026

This branch has not been deployed

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

Labels

A-compiler-builtins Area: compiler-builtins (https://github.com/rust-lang/compiler-builtins) S-blocked Status: Blocked on something else such as an RFC or other implementation work. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants