Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vectorize slice::is_sorted #132883

Merged
merged 1 commit into from
Nov 13, 2024
Merged

vectorize slice::is_sorted #132883

merged 1 commit into from
Nov 13, 2024

Conversation

LaihoE
Copy link
Contributor

@LaihoE LaihoE commented Nov 10, 2024

Benchmarks using u32 slices:

len New Old
2 1.1997 ns 889.23 ps
4 1.6479 ns 1.5396 ns
8 2.5764 ns 2.5633 ns
16 5.4750 ns 4.7421 ns
32 11.344 ns 8.4634 ns
64 12.105 ns 18.104 ns
128 17.263 ns 33.185 ns
256 29.465 ns 60.928 ns
512 48.926 ns 116.19 ns
1024 85.274 ns 237.91 ns
2048 160.94 ns 469.53 ns
4096 311.60 ns 911.43 ns
8192 615.89 ns 2.2316 µs
16384 1.2619 µs 3.4871 µs
32768 2.5245 µs 6.9947 µs
65536 5.2254 µs 15.212 µs

Seems to be a bit slower on small N but much faster on large N.

Godbolt: https://rust.godbolt.org/z/Txn5MdfKn

@rustbot
Copy link
Collaborator

rustbot commented Nov 10, 2024

r? @thomcc

rustbot has assigned @thomcc.
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 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 10, 2024
@clubby789
Copy link
Contributor

Not seeing many uses of this in rustc itself but worth checking:
@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Nov 11, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 11, 2024
vectorize slice::is_sorted

Benchmarks using u32 slices:
| len | New | Old |
|--------|----------------------|----------------------|
| 2      | 1.1997 ns           | 889.23 ps           |
| 4      | 1.6479 ns           | 1.5396 ns           |
| 8      | 2.5764 ns           | 2.5633 ns           |
| 16     | 5.4750 ns           | 4.7421 ns           |
| 32     | 11.344 ns           | 8.4634 ns           |
| 64     | 12.105 ns           | 18.104 ns           |
| 128    | 17.263 ns           | 33.185 ns           |
| 256    | 29.465 ns           | 60.928 ns           |
| 512    | 48.926 ns           | 116.19 ns           |
| 1024   | 85.274 ns           | 237.91 ns           |
| 2048   | 160.94 ns           | 469.53 ns           |
| 4096   | 311.60 ns           | 911.43 ns           |
| 8192   | 615.89 ns           | 2.2316 µs           |
| 16384  | 1.2619 µs           | 3.4871 µs           |
| 32768  | 2.5245 µs           | 6.9947 µs           |
| 65536  | 5.2254 µs           | 15.212 µs           |

Seems to be a bit slower on small N but much faster on large N.

Godbolt: https://rust.godbolt.org/z/Txn5MdfKn
@bors
Copy link
Contributor

bors commented Nov 11, 2024

⌛ Trying commit 3855cb8 with merge d8d4110...

@bors
Copy link
Contributor

bors commented Nov 11, 2024

☀️ Try build successful - checks-actions
Build commit: d8d4110 (d8d4110c5e02792f11d378b725b30c28ae0908c9)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (d8d4110): comparison URL.

Overall result: ✅ improvements - no action needed

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.5% [-0.5%, -0.4%] 2
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary -1.8%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.8% [-1.8%, -1.8%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -1.8% [-1.8%, -1.8%] 1

Cycles

Results (secondary -2.1%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.1% [-2.2%, -2.0%] 4
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 786.53s -> 786.425s (-0.01%)
Artifact size: 335.31 MiB -> 335.34 MiB (0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Nov 11, 2024
@Kobzol
Copy link
Contributor

Kobzol commented Nov 11, 2024

FWIW, the two changed benchmarks are most likely spurious, they are oscillating currently. So it's perf. neutral on compiler benchmarks, which is fine.

@thomcc
Copy link
Member

thomcc commented Nov 12, 2024

Seems fine to me.

@bors r+

@bors
Copy link
Contributor

bors commented Nov 12, 2024

📌 Commit 3855cb8 has been approved by thomcc

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 Nov 12, 2024
@bors
Copy link
Contributor

bors commented Nov 13, 2024

⌛ Testing commit 3855cb8 with merge 44f233f...

@bors
Copy link
Contributor

bors commented Nov 13, 2024

☀️ Test successful - checks-actions
Approved by: thomcc
Pushing 44f233f to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 13, 2024
@bors bors merged commit 44f233f into rust-lang:master Nov 13, 2024
7 checks passed
@rustbot rustbot added this to the 1.84.0 milestone Nov 13, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (44f233f): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.3% [0.3%, 0.3%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary -1.7%, secondary -1.6%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.7% [-1.7%, -1.7%] 1
Improvements ✅
(secondary)
-1.6% [-1.7%, -1.5%] 3
All ❌✅ (primary) -1.7% [-1.7%, -1.7%] 1

Cycles

Results (secondary 2.1%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.1% [1.9%, 2.3%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 785.272s -> 784.378s (-0.11%)
Artifact size: 335.35 MiB -> 335.40 MiB (0.02%)

@therealprof
Copy link
Contributor

It would be nice if we could check impacts not only on x86_64 but also (at least) on aarch64. The original function was already partially vectorized on x86_64 but the new generated code is growing substantially on ARMv7 and to a lesser extent on aarch64 and I do have doubts about this being a universal improvement...

@LaihoE
Copy link
Contributor Author

LaihoE commented Nov 13, 2024

I'm completely fine with reverting this if there are concerns with other targets. The improvements on x86 are not that big.

The original function was already partially vectorized on x86_64

Do you have an example of this? I would expect that optimization to be illegal as the old function used all() that short circuits on every element.

I must admit that my experience with aarch64 is quite limited but isn't this a fine hot loop?

.LBB0_4:
        ldp     q1, q2, [x10, #-32]
        ldur    q3, [x10, #-28]
        ldur    q4, [x10, #-12]
        ldur    q17, [x10, #-76]
        ldur    q18, [x10, #-60]
        ldur    q19, [x10, #-44]
        ldur    q20, [x10, #-124]
        ldur    q21, [x10, #-108]
        cmgt    v2.4s, v2.4s, v4.4s
        cmgt    v1.4s, v1.4s, v3.4s
        ldur    q22, [x10, #-92]
        ldp     q5, q6, [x10, #-128]
        ldp     q3, q4, [x10, #-96]
        uzp1    v1.8h, v1.8h, v2.8h
        ldp     q7, q16, [x10, #-64]
        cmgt    v6.4s, v6.4s, v21.4s
        cmgt    v5.4s, v5.4s, v20.4s
        cmgt    v4.4s, v4.4s, v17.4s
        cmgt    v3.4s, v3.4s, v22.4s
        cmgt    v16.4s, v16.4s, v19.4s
        cmgt    v7.4s, v7.4s, v18.4s
        uzp1    v3.8h, v3.8h, v4.8h
        uzp1    v4.8h, v5.8h, v6.8h
        uzp1    v2.8h, v7.8h, v16.8h
        uzp1    v1.16b, v2.16b, v1.16b
        uzp1    v2.16b, v4.16b, v3.16b
        and     v1.16b, v1.16b, v0.16b
        and     v2.16b, v2.16b, v0.16b
        ext     v3.16b, v1.16b, v1.16b, #8
        ext     v4.16b, v2.16b, v2.16b, #8
        zip1    v1.16b, v1.16b, v3.16b
        zip1    v2.16b, v2.16b, v4.16b
        addv    h1, v1.8h
        addv    h2, v2.8h
        fmov    w12, s1
        fmov    w13, s2
        orr     w12, w13, w12
        tst     w12, #0xffff
        b.ne    .LBB0_36
        add     x11, x11, #32
        add     x10, x10, #128
        cmp     x11, x9
        b.lo    .LBB0_4

generated code is growing substantially on ARMv7 and to a lesser extent on aarch64

How about setting the CHUNK_SIZE to 9?

@therealprof
Copy link
Contributor

Do you have an example of this? I would expect that optimization to be illegal as the old function used all() that short circuits on every element.

Upon closer inspection it seems I've mistaken the (vectorized) initialisation for the is_sorted implementation.

However I did a few more generated code comparisons (excluding the lookup tables). And what is even worse: the vectorisation only works on opt-level 3, in other opt-levels the number of insns (haven't dared to check actual code size) is
significantly larger than the vectorised code and most likely also a lot slower, both on x864_64 and aarch64.

On x86_64 (opt-level 3):

        push    rax
        cmp     rsi, 32
        ja      .LBB0_4
        add     rdi, 4
.LBB0_2:
        cmp     rsi, 2
        setb    al
        jb      .LBB0_14
        dec     rsi
        mov     ecx, dword ptr [rdi - 4]
        lea     rdx, [rdi + 4]
        cmp     ecx, dword ptr [rdi]
        mov     rdi, rdx
        jbe     .LBB0_2
.LBB0_14:
        pop     rcx
        ret
.LBB0_4:
        mov     rcx, rsi
        xor     eax, eax
        add     rcx, -33
        je      .LBB0_5
        movdqa  xmm0, xmmword ptr [rip + .LCPI0_0]
.LBB0_12:
        movdqu  xmm1, xmmword ptr [rdi + 4*rax + 48]
        movdqu  xmm3, xmmword ptr [rdi + 4*rax + 80]
        movdqu  xmm4, xmmword ptr [rdi + 4*rax + 64]
        movdqu  xmm2, xmmword ptr [rdi + 4*rax]
        movdqu  xmm5, xmmword ptr [rdi + 4*rax + 68]
        pxor    xmm5, xmm0
        pxor    xmm4, xmm0
        pcmpgtd xmm4, xmm5
        movdqu  xmm5, xmmword ptr [rdi + 4*rax + 4]
        pxor    xmm5, xmm0
        pxor    xmm2, xmm0
        pcmpgtd xmm2, xmm5
        movdqu  xmm5, xmmword ptr [rdi + 4*rax + 84]
        por     xmm2, xmm4
        movdqu  xmm6, xmmword ptr [rdi + 4*rax + 16]
        pxor    xmm5, xmm0
        pxor    xmm3, xmm0
        pcmpgtd xmm3, xmm5
        movdqu  xmm4, xmmword ptr [rdi + 4*rax + 20]
        pxor    xmm4, xmm0
        pxor    xmm6, xmm0
        pcmpgtd xmm6, xmm4
        movdqu  xmm4, xmmword ptr [rdi + 4*rax + 32]
        por     xmm6, xmm3
        movdqu  xmm3, xmmword ptr [rdi + 4*rax + 96]
        packssdw        xmm2, xmm6
        movdqu  xmm5, xmmword ptr [rdi + 4*rax + 100]
        pxor    xmm5, xmm0
        pxor    xmm3, xmm0
        pcmpgtd xmm3, xmm5
        movdqu  xmm5, xmmword ptr [rdi + 4*rax + 36]
        pxor    xmm5, xmm0
        pxor    xmm4, xmm0
        pcmpgtd xmm4, xmm5
        movdqu  xmm5, xmmword ptr [rdi + 4*rax + 112]
        por     xmm4, xmm3
        movdqu  xmm3, xmmword ptr [rdi + 4*rax + 116]
        pxor    xmm3, xmm0
        pxor    xmm5, xmm0
        pcmpgtd xmm5, xmm3
        movdqu  xmm3, xmmword ptr [rdi + 4*rax + 52]
        pxor    xmm3, xmm0
        pxor    xmm1, xmm0
        pcmpgtd xmm1, xmm3
        por     xmm1, xmm5
        packssdw        xmm4, xmm1
        packsswb        xmm2, xmm4
        pmovmskb        edx, xmm2
        test    edx, edx
        jne     .LBB0_13
        add     rax, 32
        cmp     rax, rcx
        jb      .LBB0_12
        cmp     rax, rsi
        ja      .LBB0_10
.LBB0_5:
        sub     rsi, rax
        lea     rcx, [rdi + 4*rax]
        add     rcx, 4
.LBB0_6:
        cmp     rsi, 2
        setb    al
        jb      .LBB0_14
        dec     rsi
        mov     edx, dword ptr [rcx - 4]
        lea     rdi, [rcx + 4]
        cmp     edx, dword ptr [rcx]
        mov     rcx, rdi
        jbe     .LBB0_6
        jmp     .LBB0_14
.LBB0_13:
        xor     eax, eax
        pop     rcx
        ret
.LBB0_10:
        lea     rdx, [rip + .L__unnamed_1]
        mov     rdi, rax
        call    qword ptr [rip + core::slice::index::slice_start_index_len_fail::h818a98ee9244191a@GOTPCREL]

On x86_64 (opt-level 2):

        push    rax
        cmp     rsi, 32
        ja      .LBB0_4
        add     rdi, 4
.LBB0_2:
        cmp     rsi, 2
        setb    al
        jb      .LBB0_8
        dec     rsi
        mov     ecx, dword ptr [rdi - 4]
        lea     rdx, [rdi + 4]
        cmp     ecx, dword ptr [rdi]
        mov     rdi, rdx
        jbe     .LBB0_2
        jmp     .LBB0_8
.LBB0_4:
        mov     rdx, rsi
        xor     ecx, ecx
        add     rdx, -33
        je      .LBB0_5
        xor     eax, eax
.LBB0_12:
        mov     r8d, dword ptr [rdi + 4*rcx + 4]
        cmp     dword ptr [rdi + 4*rcx], r8d
        ja      .LBB0_8
        mov     r9d, dword ptr [rdi + 4*rcx + 8]
        cmp     r8d, r9d
        ja      .LBB0_8
        mov     r8d, dword ptr [rdi + 4*rcx + 12]
        cmp     r9d, r8d
        ja      .LBB0_8
        mov     r9d, dword ptr [rdi + 4*rcx + 16]
        cmp     r8d, r9d
        ja      .LBB0_8
        mov     r8d, dword ptr [rdi + 4*rcx + 20]
        cmp     r9d, r8d
        ja      .LBB0_8
        mov     r9d, dword ptr [rdi + 4*rcx + 24]
        cmp     r8d, r9d
        ja      .LBB0_8
        mov     r8d, dword ptr [rdi + 4*rcx + 28]
        cmp     r9d, r8d
        ja      .LBB0_8
        mov     r9d, dword ptr [rdi + 4*rcx + 32]
        cmp     r8d, r9d
        ja      .LBB0_8
        mov     r8d, dword ptr [rdi + 4*rcx + 36]
        cmp     r9d, r8d
        ja      .LBB0_8
        mov     r9d, dword ptr [rdi + 4*rcx + 40]
        cmp     r8d, r9d
        ja      .LBB0_8
        mov     r8d, dword ptr [rdi + 4*rcx + 44]
        cmp     r9d, r8d
        ja      .LBB0_8
        mov     r9d, dword ptr [rdi + 4*rcx + 48]
        cmp     r8d, r9d
        ja      .LBB0_8
        mov     r8d, dword ptr [rdi + 4*rcx + 52]
        cmp     r9d, r8d
        ja      .LBB0_8
        mov     r9d, dword ptr [rdi + 4*rcx + 56]
        cmp     r8d, r9d
        ja      .LBB0_8
        mov     r8d, dword ptr [rdi + 4*rcx + 60]
        cmp     r9d, r8d
        ja      .LBB0_8
        mov     r9d, dword ptr [rdi + 4*rcx + 64]
        cmp     r8d, r9d
        ja      .LBB0_8
        mov     r8d, dword ptr [rdi + 4*rcx + 68]
        cmp     r9d, r8d
        ja      .LBB0_8
        mov     r9d, dword ptr [rdi + 4*rcx + 72]
        cmp     r8d, r9d
        ja      .LBB0_8
        mov     r8d, dword ptr [rdi + 4*rcx + 76]
        cmp     r9d, r8d
        ja      .LBB0_8
        mov     r9d, dword ptr [rdi + 4*rcx + 80]
        cmp     r8d, r9d
        ja      .LBB0_8
        mov     r8d, dword ptr [rdi + 4*rcx + 84]
        cmp     r9d, r8d
        ja      .LBB0_8
        mov     r9d, dword ptr [rdi + 4*rcx + 88]
        cmp     r8d, r9d
        ja      .LBB0_8
        mov     r8d, dword ptr [rdi + 4*rcx + 92]
        cmp     r9d, r8d
        ja      .LBB0_8
        mov     r9d, dword ptr [rdi + 4*rcx + 96]
        cmp     r8d, r9d
        ja      .LBB0_8
        mov     r8d, dword ptr [rdi + 4*rcx + 100]
        cmp     r9d, r8d
        ja      .LBB0_8
        mov     r9d, dword ptr [rdi + 4*rcx + 104]
        cmp     r8d, r9d
        ja      .LBB0_8
        mov     r8d, dword ptr [rdi + 4*rcx + 108]
        cmp     r9d, r8d
        ja      .LBB0_8
        mov     r9d, dword ptr [rdi + 4*rcx + 112]
        cmp     r8d, r9d
        ja      .LBB0_8
        mov     r8d, dword ptr [rdi + 4*rcx + 116]
        cmp     r9d, r8d
        ja      .LBB0_8
        mov     r9d, dword ptr [rdi + 4*rcx + 120]
        cmp     r8d, r9d
        ja      .LBB0_8
        mov     r8d, dword ptr [rdi + 4*rcx + 124]
        cmp     r9d, r8d
        ja      .LBB0_8
        cmp     r8d, dword ptr [rdi + 4*rcx + 128]
        ja      .LBB0_8
        add     rcx, 32
        cmp     rcx, rdx
        jb      .LBB0_12
        cmp     rcx, rsi
        ja      .LBB0_10
.LBB0_5:
        sub     rsi, rcx
        lea     rcx, [rdi + 4*rcx]
        add     rcx, 4
.LBB0_6:
        cmp     rsi, 2
        setb    al
        jb      .LBB0_8
        dec     rsi
        mov     edx, dword ptr [rcx - 4]
        lea     rdi, [rcx + 4]
        cmp     edx, dword ptr [rcx]
        mov     rcx, rdi
        jbe     .LBB0_6
.LBB0_8:
        pop     rcx
        ret
.LBB0_10:
        lea     rdx, [rip + .L__unnamed_1]
        mov     rdi, rcx
        call    qword ptr [rip + core::slice::index::slice_start_index_len_fail::h818a98ee9244191a@GOTPCREL]

vs (old):

        xor     eax, eax
        sub     rsi, 1
        cmovb   rsi, rax
.LBB0_1:
        mov     rcx, rax
        cmp     rsi, rax
        je      .LBB0_3
        mov     edx, dword ptr [rdi + 4*rcx]
        lea     rax, [rcx + 1]
        cmp     edx, dword ptr [rdi + 4*rcx + 4]
        jbe     .LBB0_1
.LBB0_3:
        cmp     rsi, rcx
        sete    al
        ret

On aarch64 (opt-level 3):

        sub     sp, sp, #32
        stp     x29, x30, [sp, #16]
        add     x29, sp, #16
        cmp     x1, #32
        b.hi    LBB0_4
        add     x8, x0, #4
LBB0_2:
        cmp     x1, #2
        cset    w0, lo
        b.lo    LBB0_13
        sub     x1, x1, #1
        ldp     w9, w10, [x8, #-4]
        add     x8, x8, #4
        cmp     w9, w10
        b.ls    LBB0_2
        b       LBB0_13
LBB0_4:
        mov     x8, #0
        subs    x9, x1, #33
        b.eq    LBB0_9
        add     x10, x0, #128
        adrp    x11, lCPI0_0@PAGE
        ldr     q0, [x11, lCPI0_0@PAGEOFF]
LBB0_6:
        ldp     q1, q2, [x10, #-128]
        ldp     q3, q4, [x10, #-96]
        ldp     q5, q6, [x10, #-64]
        ldp     q7, q16, [x10, #-32]
        ldur    q17, [x10, #-124]
        ldur    q18, [x10, #-108]
        ldur    q19, [x10, #-92]
        ldur    q20, [x10, #-76]
        ldur    q21, [x10, #-60]
        ldur    q22, [x10, #-44]
        ldur    q23, [x10, #-28]
        ldur    q24, [x10, #-12]
        cmhi.4s v16, v16, v24
        cmhi.4s v7, v7, v23
        uzp1.8h v7, v7, v16
        cmhi.4s v6, v6, v22
        cmhi.4s v5, v5, v21
        uzp1.8h v5, v5, v6
        uzp1.16b        v5, v5, v7
        and.16b v5, v5, v0
        ext.16b v6, v5, v5, #8
        zip1.16b        v5, v5, v6
        addv.8h h5, v5
        fmov    w11, s5
        cmhi.4s v4, v4, v20
        cmhi.4s v3, v3, v19
        uzp1.8h v3, v3, v4
        cmhi.4s v2, v2, v18
        cmhi.4s v1, v1, v17
        uzp1.8h v1, v1, v2
        uzp1.16b        v1, v1, v3
        and.16b v1, v1, v0
        ext.16b v2, v1, v1, #8
        zip1.16b        v1, v1, v2
        addv.8h h1, v1
        fmov    w12, s1
        orr     w11, w12, w11
        tst     w11, #0xffff
        b.ne    LBB0_12
        add     x8, x8, #32
        add     x10, x10, #128
        cmp     x8, x9
        b.lo    LBB0_6
        cmp     x8, x1
        b.hi    LBB0_14
LBB0_9:
        sub     x9, x1, x8
        add     x8, x0, x8, lsl #2
        add     x8, x8, #4
LBB0_10:
        cmp     x9, #2
        cset    w0, lo
        b.lo    LBB0_13
        sub     x9, x9, #1
        ldp     w10, w11, [x8, #-4]
        add     x8, x8, #4
        cmp     w10, w11
        b.ls    LBB0_10
        b       LBB0_13
LBB0_12:
        mov     w0, #0
LBB0_13:
        ldp     x29, x30, [sp, #16]
        add     sp, sp, #32
        ret
LBB0_14:
        adrp    x2, l___unnamed_1@PAGE
        add     x2, x2, l___unnamed_1@PAGEOFF
        mov     x0, x8
        bl      __ZN4core5slice5index26slice_start_index_len_fail17h8e009aba8a824b46E

vs. aarch64 (opt-level 2):

        stp     x29, x30, [sp, #-16]!
        mov     x29, sp
        cmp     x1, #32
        b.hi    LBB0_4
        add     x8, x0, #4
LBB0_2:
        cmp     x1, #2
        cset    w0, lo
        b.lo    LBB0_44
        sub     x1, x1, #1
        ldp     w9, w10, [x8, #-4]
        add     x8, x8, #4
        cmp     w9, w10
        b.ls    LBB0_2
        b       LBB0_44
LBB0_4:
        mov     x8, #0
        subs    x10, x1, #33
        b.eq    LBB0_41
        mov     x9, x0
        add     x11, x0, #64
LBB0_6:
        mov     w0, #0
        ldp     w13, w12, [x11, #-64]
        cmp     w13, w12
        b.hi    LBB0_44
        ldur    w13, [x11, #-56]
        cmp     w12, w13
        b.hi    LBB0_44
        ldur    w12, [x11, #-52]
        cmp     w13, w12
        b.hi    LBB0_44
        ldur    w13, [x11, #-48]
        cmp     w12, w13
        b.hi    LBB0_44
        ldur    w12, [x11, #-44]
        cmp     w13, w12
        b.hi    LBB0_44
        ldur    w13, [x11, #-40]
        cmp     w12, w13
        b.hi    LBB0_44
        ldur    w12, [x11, #-36]
        cmp     w13, w12
        b.hi    LBB0_44
        ldur    w13, [x11, #-32]
        cmp     w12, w13
        b.hi    LBB0_44
        ldur    w12, [x11, #-28]
        cmp     w13, w12
        b.hi    LBB0_44
        ldur    w13, [x11, #-24]
        cmp     w12, w13
        b.hi    LBB0_44
        ldur    w12, [x11, #-20]
        cmp     w13, w12
        b.hi    LBB0_44
        ldur    w13, [x11, #-16]
        cmp     w12, w13
        b.hi    LBB0_44
        ldur    w12, [x11, #-12]
        cmp     w13, w12
        b.hi    LBB0_44
        ldur    w13, [x11, #-8]
        cmp     w12, w13
        b.hi    LBB0_44
        ldur    w12, [x11, #-4]
        cmp     w13, w12
        b.hi    LBB0_44
        ldr     w13, [x11]
        cmp     w12, w13
        b.hi    LBB0_44
        ldr     w12, [x11, #4]
        cmp     w13, w12
        b.hi    LBB0_44
        ldr     w13, [x11, #8]
        cmp     w12, w13
        b.hi    LBB0_44
        ldr     w12, [x11, #12]
        cmp     w13, w12
        b.hi    LBB0_44
        ldr     w13, [x11, #16]
        cmp     w12, w13
        b.hi    LBB0_44
        ldr     w12, [x11, #20]
        cmp     w13, w12
        b.hi    LBB0_44
        ldr     w13, [x11, #24]
        cmp     w12, w13
        b.hi    LBB0_44
        ldr     w12, [x11, #28]
        cmp     w13, w12
        b.hi    LBB0_44
        ldr     w13, [x11, #32]
        cmp     w12, w13
        b.hi    LBB0_44
        ldr     w12, [x11, #36]
        cmp     w13, w12
        b.hi    LBB0_44
        ldr     w13, [x11, #40]
        cmp     w12, w13
        b.hi    LBB0_44
        ldr     w12, [x11, #44]
        cmp     w13, w12
        b.hi    LBB0_44
        ldr     w13, [x11, #48]
        cmp     w12, w13
        b.hi    LBB0_44
        ldr     w12, [x11, #52]
        cmp     w13, w12
        b.hi    LBB0_44
        ldr     w13, [x11, #56]
        cmp     w12, w13
        b.hi    LBB0_44
        ldr     w12, [x11, #60]
        cmp     w13, w12
        b.hi    LBB0_44
        ldr     w13, [x11, #64]
        cmp     w12, w13
        b.hi    LBB0_44
        add     x11, x11, #128
        add     x8, x8, #32
        cmp     x8, x10
        b.lo    LBB0_6
        cmp     x8, x1
        b.hi    LBB0_45
        mov     x0, x9
LBB0_41:
        sub     x9, x1, x8
        add     x8, x0, x8, lsl #2
        add     x8, x8, #4
LBB0_42:
        cmp     x9, #2
        cset    w0, lo
        b.lo    LBB0_44
        sub     x9, x9, #1
        ldp     w10, w11, [x8, #-4]
        add     x8, x8, #4
        cmp     w10, w11
        b.ls    LBB0_42
LBB0_44:
        ldp     x29, x30, [sp], #16
        ret
LBB0_45:
        adrp    x2, l___unnamed_1@PAGE
        add     x2, x2, l___unnamed_1@PAGEOFF
        mov     x0, x8
        bl      __ZN4core5slice5index26slice_start_index_len_fail17h8e009aba8a824b46E

vs. (old):

        add     x8, x0, #4
        cmp     x1, #1
        csinc   x9, x1, xzr, lo
        sub     x10, x9, x1
LBB0_1:
        mov     x9, x10
        cbz     x10, LBB0_3
        ldp     w11, w12, [x8, #-4]
        add     x8, x8, #4
        add     x10, x9, #1
        cmp     w11, w12
        b.ls    LBB0_1
LBB0_3:
        cmp     x9, #0
        cset    w0, eq
        ret

It gets worse from there, on armv7 (both opt-level 2 and 3):

        push    {r4, r5, r6, lr}
        mov     lr, r0
        cmp     r1, #32
        bhi     .LBB0_4
        add     r2, lr, #4
.LBB0_2:
        cmp     r1, #2
        mov     r0, #0
        movwlo  r0, #1
        blo     .LBB0_27
        add     r3, r2, #4
        ldr     r5, [r2]
        ldr     r2, [r2, #-4]
        sub     r1, r1, #1
        cmp     r2, r5
        mov     r2, r3
        bls     .LBB0_2
        b       .LBB0_27
.LBB0_4:
        subs    r12, r1, #33
        mov     r3, #0
        beq     .LBB0_24
        add     r2, lr, #128
        mov     r0, #0
.LBB0_6:
        add     r4, lr, r3, lsl #2
        ldr     r6, [r2, #-128]
        ldr     r5, [r4, #4]
        cmp     r6, r5
        ldrls   r6, [r4, #8]
        cmpls   r5, r6
        bhi     .LBB0_27
        ldr     r5, [r4, #12]
        cmp     r6, r5
        ldrls   r6, [r4, #16]
        cmpls   r5, r6
        bhi     .LBB0_27
        ldr     r5, [r4, #20]
        cmp     r6, r5
        ldrls   r6, [r4, #24]
        cmpls   r5, r6
        bhi     .LBB0_27
        ldr     r5, [r4, #28]
        cmp     r6, r5
        ldrls   r6, [r4, #32]
        cmpls   r5, r6
        bhi     .LBB0_27
        ldr     r5, [r4, #36]
        cmp     r6, r5
        ldrls   r6, [r4, #40]
        cmpls   r5, r6
        bhi     .LBB0_27
        ldr     r5, [r4, #44]
        cmp     r6, r5
        ldrls   r6, [r4, #48]
        cmpls   r5, r6
        bhi     .LBB0_27
        ldr     r5, [r4, #52]
        cmp     r6, r5
        ldrls   r6, [r4, #56]
        cmpls   r5, r6
        bhi     .LBB0_27
        ldr     r5, [r4, #60]
        cmp     r6, r5
        ldrls   r6, [r4, #64]
        cmpls   r5, r6
        bhi     .LBB0_27
        ldr     r5, [r4, #68]
        cmp     r6, r5
        ldrls   r6, [r4, #72]
        cmpls   r5, r6
        bhi     .LBB0_27
        ldr     r5, [r4, #76]
        cmp     r6, r5
        ldrls   r6, [r4, #80]
        cmpls   r5, r6
        bhi     .LBB0_27
        ldr     r5, [r4, #84]
        cmp     r6, r5
        ldrls   r6, [r4, #88]
        cmpls   r5, r6
        bhi     .LBB0_27
        ldr     r5, [r4, #92]
        cmp     r6, r5
        ldrls   r6, [r4, #96]
        cmpls   r5, r6
        bhi     .LBB0_27
        ldr     r5, [r4, #100]
        cmp     r6, r5
        ldrls   r6, [r4, #104]
        cmpls   r5, r6
        bhi     .LBB0_27
        ldr     r5, [r4, #108]
        cmp     r6, r5
        ldrls   r6, [r4, #112]
        cmpls   r5, r6
        bhi     .LBB0_27
        ldr     r5, [r4, #116]
        cmp     r6, r5
        ldrls   r6, [r4, #120]
        cmpls   r5, r6
        bhi     .LBB0_27
        ldr     r4, [r4, #124]
        cmp     r6, r4
        ldrls   r5, [r2]
        cmpls   r4, r5
        bhi     .LBB0_27
        add     r3, r3, #32
        add     r2, r2, #128
        cmp     r3, r12
        blo     .LBB0_6
        cmp     r3, r1
        bhi     .LBB0_28
.LBB0_24:
        add     r0, lr, r3, lsl #2
        sub     r1, r1, r3
        add     r2, r0, #4
.LBB0_25:
        cmp     r1, #2
        mov     r0, #0
        movwlo  r0, #1
        blo     .LBB0_27
        add     r3, r2, #4
        ldr     r5, [r2]
        ldr     r2, [r2, #-4]
        sub     r1, r1, #1
        cmp     r2, r5
        mov     r2, r3
        bls     .LBB0_25
.LBB0_27:
        pop     {r4, r5, r6, pc}
.LBB0_28:
        ldr     r2, .LCPI0_0
        mov     r0, r3
.LPC0_0:
        add     r2, pc, r2
        bl      core::slice::index::slice_start_index_len_fail::h3874335222775e64
.LCPI0_0:
        .long   .L__unnamed_1-(.LPC0_0+8)

vs.

        push    {r5, lr}
        cmp     r1, #1
        mov     r2, r1
        movhs   r2, #1
        add     r0, r0, #4
        sub     r2, r2, r1
.LBB0_1:
        mov     r1, r2
        cmp     r2, #0
        beq     .LBB0_3
        add     r3, r0, #4
        ldr     r5, [r0]
        ldr     r0, [r0, #-4]
        add     r2, r1, #1
        cmp     r0, r5
        mov     r0, r3
        bls     .LBB0_1
.LBB0_3:
        clz     r0, r1
        lsr     r0, r0, #5
        pop     {r5, pc}

celinval added a commit to celinval/rust-dev that referenced this pull request Nov 29, 2024
78fc550 Auto merge of rust-lang#133247 - GuillaumeGomez:reduce-integer-display-impl, r=workingjubilee
db5c2c6 Rollup merge of rust-lang#132982 - suaviloquence:2-doc-changed-alloc-methods, r=Mark-Simulacrum
117ad4f Rollup merge of rust-lang#132533 - SUPERCILEX:patch-4, r=Mark-Simulacrum
e2aa7c1 fix `Allocator` method names in `alloc` free function docs
6b141ee Rollup merge of rust-lang#133298 - n0toose:remove-dir-all-but-not-paths, r=Noratrieb
e3691db Rollup merge of rust-lang#133260 - compiler-errors:deref, r=fee1-dead
895f290 Rollup merge of rust-lang#132730 - joboet:after_main_sync, r=Noratrieb
6ffa455 Rollup merge of rust-lang#133389 - eduardosm:stabilize-const_float_methods, r=RalfJung
f413935 Rollup merge of rust-lang#133301 - GuillaumeGomez:add-example-wrapping-neg, r=workingjubilee
6112cfd Auto merge of rust-lang#132611 - compiler-errors:async-prelude, r=ibraheemdev
23a5a0e Auto merge of rust-lang#132597 - lukas-code:btree-plug-leak, r=jhpratt
f0b0942 Constify Deref and DerefMut
d05e8e8 Auto merge of rust-lang#133379 - jieyouxu:rollup-00jxo71, r=jieyouxu
641c1ae Stabilize `const_float_methods`
256c54d Auto merge of rust-lang#133377 - jieyouxu:rollup-n536hzq, r=jieyouxu
dff533f Improve code by using `unsigned_abs`
a850f7c Rollup merge of rust-lang#133237 - fee1-dead-contrib:constadd, r=compiler-errors
99741dd Rollup merge of rust-lang#133332 - bjoernager:const-array-as-mut-slice, r=jhpratt
9a152e2 Rollup merge of rust-lang#131505 - madsmtm:darwin_user_temp_dir, r=dtolnay
a12c838 Auto merge of rust-lang#132994 - clubby789:cc-bisect, r=Kobzol
6548ad8 Auto merge of rust-lang#133360 - compiler-errors:rollup-a2o38tq, r=compiler-errors
a4f797e Rollup merge of rust-lang#133264 - lolbinarycat:os-string-truncate, r=joboet
a939801 Auto merge of rust-lang#132329 - compiler-errors:fn-and-destruct, r=lcnr
30aa6db Add code example for `wrapping_neg` method for signed integers
bc77567 Deduplicate checking drop terminator
6f3ec5c Gate const drop behind const_destruct feature, and fix const_precise_live_drops post-drop-elaboration check
fb6f0c2 Auto merge of rust-lang#133339 - jieyouxu:rollup-gav0nvr, r=jieyouxu
c792ef3 Rollup merge of rust-lang#133337 - ColinFinck:thread-scoped-fix-typo, r=joboet
cfed1c6 Rollup merge of rust-lang#133330 - RalfJung:close, r=the8472
e26edf0 Rollup merge of rust-lang#133313 - thesummer:fix-arc4random, r=cuviper
90a85ef Rollup merge of rust-lang#133288 - bjoernager:const-array-each-ref, r=jhpratt
4e6f154 Rollup merge of rust-lang#133238 - heiher:loong-stdarch-rexport, r=Amanieu
23a1b31 Auto merge of rust-lang#130867 - michirakara:steps_between, r=dtolnay
9693572 Fix typo in `std::thread::Scope::spawn` documentation.
b4a5067 Mark '<[T; N]>::as_mut_slice' as 'const';
b6b40ef library: update comment around close()
6ce7e79 Don't try to use confstr in Miri
40d6e2c Auto merge of rust-lang#129238 - umgefahren:stabilize-ipv6-unique-local, r=dtolnay
276c0fc distinguish overflow and unimplemented in Step::steps_between
8be952b Use arc4random of libc for RTEMS target
4583dde Mention that std::fs::remove_dir_all fails on files
4f6ca37 Mark and implement 'each_ref' and 'each_mut' in '[T; N]' as const;
ec220b6 constify `Add`
3c558bf Rollup merge of rust-lang#131736 - hoodmane:emscripten-wasm-bigint, r=workingjubilee
38d4c11 implement OsString::truncate
4fd2c8d Rollup merge of rust-lang#133226 - compiler-errors:opt-in-pointer-like, r=lcnr
3f03a0f Rollup merge of rust-lang#130800 - bjoernager:const-mut-cursor, r=joshtriplett
eea7e23 Rollup merge of rust-lang#129838 - Ayush1325:uefi-process-args, r=joboet
8b4995a Make PointerLike opt-in as a trait
f74b38a Reduce integer `Display` implementation size
2f179d1 Stabilize const_pin_2
b2dc297 re-export `is_loongarch_feature_detected`
e26c298 Rollup merge of rust-lang#132732 - gavincrawford:as_ptr_attribute, r=Urgau
d6ee9db Rollup merge of rust-lang#133183 - n0toose:improve-remove-dir-docs, r=joboet
40735d3 Rollup merge of rust-lang#125405 - m-ou-se:thread-add-spawn-hook, r=WaffleLapkin
6c20348 Rollup merge of rust-lang#123947 - zopsicle:vec_deque-Iter-as_slices, r=Amanieu
2089cb3 Update doc comments for spawn hook.
c02090d Address review comments.
79bffa9 Fix tracking issue.
3eff64c Add tracking issue.
15bac4f Use Send + Sync for spawn hooks.
a42af06 Add thread Builder::no_hooks().
49ac15b Update thread spawn hooks.
2cc4b2e Use add_spawn_hook for libtest's output capturing.
24a0765 Add std::thread::add_spawn_hook.
50ac725 Correct comments concerning updated dangling pointer lint
cdf5486 Auto merge of rust-lang#133205 - matthiaskrgr:rollup-xhhhp5u, r=matthiaskrgr
543667a Rollup merge of rust-lang#133200 - RalfJung:miri-rwlock-test, r=tgross35
7430eb4 ignore an occasionally-failing test in Miri
607b493 Rollup merge of rust-lang#133182 - RalfJung:const-panic-inline, r=tgross35
e6cd122 Rollup merge of rust-lang#132758 - nnethercote:improve-get_key_value-docs, r=cuviper
a3c9597 Mention std::fs::remove_dir_all in std::fs::remove_dir
bd5c142 Bump `stdarch` to the latest master
e84f865 const_panic: inline in bootstrap builds to avoid f16/f128 crashes
05fecb9 std: allow after-main use of synchronization primitives
c1beb25 Auto merge of rust-lang#133160 - jhpratt:rollup-wzj9q15, r=jhpratt
ce80c9f Rollup merge of rust-lang#133145 - kornelski:static-mutex, r=traviscross
f385ac2 Auto merge of rust-lang#128219 - connortsui20:rwlock-downgrade, r=tgross35
86151ab rename rustc_const_stable_intrinsic -> rustc_intrinsic_const_stable_indirect
a33f889 Improve `{BTreeMap,HashMap}::get_key_value` docs.
15e6fc0 Document alternatives to `static mut`
1cd1dd7 Auto merge of rust-lang#120370 - x17jiri:likely_unlikely_fix, r=saethlin
e475f40 Likely unlikely fix
ddcabfe Rollup merge of rust-lang#133126 - ohno418:fix-String-doc, r=jhpratt
e4eff6a Rollup merge of rust-lang#133116 - RalfJung:const-null-ptr, r=dtolnay
16e6d20 alloc: fix `String`'s doc
e4fb962 clean up const stability around UB checks
ee78601 stabilize const_ptr_is_null
1e4a9ee Rollup merge of rust-lang#132449 - RalfJung:is_val_statically_known, r=compiler-errors
1dfe94c Rollup merge of rust-lang#131717 - tgross35:stabilize-const_atomic_from_ptr, r=RalfJung
70326e8 reduce threads in downgrade test
d58e4f2 fix `DOWNGRADED` bit unpreserved
5d68316 fix memory ordering bug + bad test
0604b8f add safety comments for queue implementation
00255e6 add `downgrade` to `queue` implementation
40256c6 modify queue implementation documentation
f804164 add `downgrade` to `futex` implementation
572aded add simple `downgrade` implementations
48bcf09 add `downgrade` method onto `RwLockWriteGuard`
5416aef add `RwLock` `downgrade` tests
4010980 Rollup merge of rust-lang#133050 - tgross35:inline-f16-f128, r=saethlin
2ee4159 Rollup merge of rust-lang#133048 - cyrgani:ptr-doc-update, r=Amanieu
e1448de Rollup merge of rust-lang#133019 - sorairolake:add-missing-period-and-colon, r=tgross35
b1d31d2 Rollup merge of rust-lang#132984 - sunshowers:pipe2, r=tgross35
8cef1ef Rollup merge of rust-lang#132977 - cberner:fix_solaris, r=tgross35
daa9c43 Rollup merge of rust-lang#132790 - aDotInTheVoid:ioslice-asslice-rides-again, r=cuviper
cdb5ff5 Pass `f16` and `f128` by value in `const_assert!`
60ef479 use `&raw` in `{read, write}_unaligned` documentation
d2983ff Auto merge of rust-lang#132709 - programmerjake:optimize-charto_digit, r=joshtriplett
918cc8d Rollup merge of rust-lang#133027 - no1wudi:master, r=jhpratt
25f5512 Auto merge of rust-lang#133026 - workingjubilee:rollup-q8ig6ah, r=workingjubilee
d8de2cc Fix a copy-paste issue in the NuttX raw type definition
c06bb34 Rollup merge of rust-lang#133008 - onur-ozkan:update-outdated-comment, r=jieyouxu
8eaea39 Rollup merge of rust-lang#133004 - cuviper:unrecover-btree, r=ibraheemdev
81a191a Rollup merge of rust-lang#133003 - zachs18:clonetouninit-dyn-compat-u8, r=dtolnay
e3e5e35 Rollup merge of rust-lang#132907 - BLANKatGITHUB:intrinsic, r=saethlin
f57853b Rollup merge of rust-lang#131304 - RalfJung:float-core, r=tgross35
7bc0436 Auto merge of rust-lang#122770 - iximeow:ixi/int-formatting-optimization, r=workingjubilee
ce2e318 docs: Fix missing colon in methods for primitive types
1870e92 docs: Fix missing period in methods for integer types
6439774 Auto merge of rust-lang#133006 - matthiaskrgr:rollup-dz6oiq5, r=matthiaskrgr
98dad0b update outdated comment about test-float-parse
520d4fd Rollup merge of rust-lang#126046 - davidzeng0:mixed_integer_ops_unsigned_sub, r=Amanieu
e3c425b Auto merge of rust-lang#132662 - RalfJung:const-panic-inlining, r=tgross35
c4b77cf Update core CloneToUninit tests
d4e21f5 btree: simplify the backdoor between set and map
5d61cf9 Bump `cc`
44f376b Fix compilation error on Solaris due to flock usage
75609d6 Auto merge of rust-lang#132556 - clubby789:cargo-update, r=Mark-Simulacrum
5ba28a4 Run `cargo update` and update licenses
0820004 const_panic: don't wrap it in a separate function
d30e2c0 [illumos] use pipe2 to create anonymous pipes
7e12686 Auto merge of rust-lang#132883 - LaihoE:vectorized_is_sorted, r=thomcc
02e32d7 Auto merge of rust-lang#132972 - matthiaskrgr:rollup-456osr7, r=matthiaskrgr
157eb1c Rollup merge of rust-lang#132970 - tyilo:nonzero-u-div-ceil-issue, r=tgross35
03e52a5 Rollup merge of rust-lang#132966 - RalfJung:const_option_ext, r=jhpratt
2f615a1 Rollup merge of rust-lang#132948 - RalfJung:const_unicode_case_lookup, r=Noratrieb
f00e091 Rollup merge of rust-lang#132851 - chansuke:update-comment, r=thomcc
6560098 Auto merge of rust-lang#132870 - Noratrieb:inline-int-parsing, r=tgross35
a0c0c40 Add tracking issue number to unsigned_nonzero_div_ceil feature
c229666 Make `CloneToUninit` dyn-compatible
6ab50dd stabilize const_option_ext
27fe6c7 Rollup merge of rust-lang#132541 - RalfJung:const-stable-extern-crate, r=compiler-errors
7fafe99 stabilize const_unicode_case_lookup
c5ed625 Stabilize `Ipv6Addr::is_unique_local` and `Ipv6Addr::is_unicast_link_local`
e0452c9 adds new declaration to codegen
33fa870 Auto merge of rust-lang#132943 - matthiaskrgr:rollup-164l3ej, r=matthiaskrgr
7f12f02 Rollup merge of rust-lang#132914 - rcorre:cell-grammar, r=tgross35
300a266 Rollup merge of rust-lang#132895 - scottmcm:generalize-nonnull-from-raw-parts, r=ibraheemdev
a461cf9 remove no-longer-needed abs_private
170e993 allow rustc_private feature in force-unstable-if-unmarked crates
4a20245 Rollup merge of rust-lang#132929 - cuviper:check-alloc_zeroed, r=tgross35
992bbf7 Rollup merge of rust-lang#132869 - lolbinarycat:library-fix-too_long_first_doc_paragraph, r=tgross35
e3925fa Rollup merge of rust-lang#132847 - RalfJung:addr-dont-expose, r=Mark-Simulacrum
327a0d7 Auto merge of rust-lang#132919 - matthiaskrgr:rollup-ogghyvp, r=matthiaskrgr
67c3c9f Check for null in the `alloc_zeroed` example
068537a new intrinsic declaration
b689951 new intrinsic declaration
16fa12e Rollup merge of rust-lang#132144 - adetaylor:receiver-trait-itself, r=wesleywiser
54f699d Rollup merge of rust-lang#120077 - SUPERCILEX:set-entry, r=Amanieu
e541a4f Update dangling pointer tests
7707584 Tag relevant functions with #[rustc_as_ptr] attribute
b541c5a Auto merge of rust-lang#132902 - matthiaskrgr:rollup-43qgg3t, r=matthiaskrgr
2d676d4 Update grammar in std::cell docs.
7325f33 Emscripten: link with -sWASM_BIGINT
1c482c9 Rollup merge of rust-lang#130999 - cberner:flock_pr, r=joboet
4dd2270 Auto merge of rust-lang#127589 - notriddle:notriddle/search-sem-3, r=GuillaumeGomez
0af64b6 Generalize `NonNull::from_raw_parts` per ACP362
2fd9ac4 vectorize slice::is_sorted
737521c `#[inline]` integer parsing functions
b9be1dd split up the first paragraph of doc comments for better summaries
f9063ff Update the doc comment of `ASCII_CASE_MASK`
57c7b80 elem_offset / subslice_range: use addr() instead of 'as usize'
d19aa69 Rollup merge of rust-lang#132136 - RalfJung:target-feature-abi-compat, r=Mark-Simulacrum
6b0bd5a honor rustc_const_stable_indirect in non-staged_api crate with -Zforce-unstable-if-unmarked
070baf4 Add as_slice/into_slice for IoSlice/IoSliceMut.
978a553 Rollup merge of rust-lang#132778 - lolbinarycat:io-Error-into_inner-docs, r=cuviper
6d54bfe update io::Error::into_inner to acknowlage io::Error::other
7c0a90c Address review comments
ac66068 Update library/std/src/sys/pal/windows/fs.rs
d90f866 Auto merge of rust-lang#132717 - RalfJung:rustc_safe_intrinsic, r=compiler-errors
f2bf9e6 remove support for rustc_safe_intrinsic attribute; use rustc_intrinsic functions instead
2391b4b Rollup merge of rust-lang#132738 - cuviper:channel-heap-init, r=ibraheemdev
086cfef mark is_val_statically_known intrinsic as stably const-callable
dffc5e7 Rollup merge of rust-lang#132696 - fortanix:raoul/rte-235-fix_fmodl_missing_symbol_issue, r=tgross35
f14fc56 Rollup merge of rust-lang#132639 - RalfJung:intrinsics, r=workingjubilee,Amanieu
6d63012 Initialize channel `Block`s directly on the heap
7ff251b core: move intrinsics.rs into intrinsics folder
6244f48 Auto merge of rust-lang#132714 - mati865:update-memchr, r=tgross35
a2eaef7 Rollup merge of rust-lang#132715 - tabokie:fix-lazy-lock-doc, r=Noratrieb
6a77b21 Rollup merge of rust-lang#132665 - tyilo:nonzero-u-div-ceil, r=joboet
79d2063 Separate f128 `%` operation to deal with missing `fmodl` symbol
8022523 Auto merge of rust-lang#132705 - kornelski:inline-repeat, r=tgross35
df9f5db fix lazylock comment
7a82eb5 Auto merge of rust-lang#131888 - ChrisDenton:deopt, r=ibraheemdev
75b9ce3 unpin and update memchr
4d1c7d9 optimize char::to_digit and assert radix is at least 2
95bff3e Inline str::repeat
52c2a45 Rollup merge of rust-lang#132617 - uellenberg:fix-rendered-doc, r=cuviper
28f7e7b Auto merge of rust-lang#131721 - okaneco:const_eq_ignore_ascii_case, r=m-ou-se
41b7e5f Auto merge of rust-lang#132500 - RalfJung:char-is-whitespace-const, r=jhpratt
4ed08bd Add new unstable feature `const_eq_ignore_ascii_case`
f4e9fe4 Auto merge of rust-lang#132664 - matthiaskrgr:rollup-i27nr7i, r=matthiaskrgr
afc66fe Change some code blocks to quotes in rendered std doc
2e63cbd Rollup merge of rust-lang#131261 - clarfonthey:unsafe-cell-from-mut, r=m-ou-se
ab6f663 Auto merge of rust-lang#132661 - matthiaskrgr:rollup-npytbl6, r=matthiaskrgr
8b165db Implement div_ceil for NonZero<unsigned>
6bc1b1b Rollup merge of rust-lang#132571 - RalfJung:const_eval_select_macro, r=oli-obk
c12f4d1 Rollup merge of rust-lang#132473 - ZhekaS:core_fmt_radix_no_panic, r=joboet
bbb9275 Rollup merge of rust-lang#132153 - bjoernager:const-char-encode-utf16, r=dtolnay
919de70 add const_eval_select macro to reduce redundancy
538f5b4 Rollup merge of rust-lang#132609 - NotWearingPants:patch-1, r=Amanieu
86c6f27 Rollup merge of rust-lang#132606 - eduardosm:char-slice-str-pattern-doc, r=tgross35
4660d7e most const intrinsics don't need an explicit rustc_const_unstable any more
8eb30fe add new rustc_const_stable_intrinsic attribute for const-stable intrinsics
792d164 convert all const-callable intrinsics into the new form (without extern block)
fad7d68 docs: fix grammar in doc comment at unix/process.rs
92bb779 Improve example of `impl Pattern for &[char]`
553bb18 Add AsyncFn* to to the prelude in all editions
2ae24bf Fixed typo, rebased
47f60d7 Updated SAFETY comment to address underflow
581aa8d Replace checked slice indexing by unchecked to support panic-free code
c5a0f6c Rollup merge of rust-lang#132579 - RalfJung:rustc-std-workspace-crates, r=Amanieu
9cdbf39 btree: don't leak value if destructor of key panics
4caff13 Stabilise 'const_char_encode_utf16';
84fae7e Auto merge of rust-lang#132586 - workingjubilee:rollup-qrmn49a, r=workingjubilee
95b4127 update rustc-std-workspace crates
082b98d Rollup merge of rust-lang#132423 - RalfJung:const-eval-align-offset, r=dtolnay
3b40634 Auto merge of rust-lang#132434 - tgross35:f128-tests, r=workingjubilee
5dea8b2 Enable `f128` tests on all non-buggy platforms 🎉
2bb8ea3 Auto merge of rust-lang#132581 - workingjubilee:rollup-4wj318p, r=workingjubilee
83bd286 Update `compiler_builtins` to 0.1.138 and pin it
699702f Rollup merge of rust-lang#132563 - frectonz:master, r=Amanieu
4390c35 Auto merge of rust-lang#123723 - madsmtm:apple-std-os, r=dtolnay
1e8ed90 Auto merge of rust-lang#132479 - compiler-errors:fx-feat-yeet, r=fee1-dead
9a3b7c0 Rename the FIXMEs, remove a few that dont matter anymore
ed4f110 Auto merge of rust-lang#132542 - RalfJung:const_panic, r=tgross35
d8bca01 remove const-support for align_offset
76b866c Modify `NonZero` documentation to reference the underlying integer type
9e57964 Rollup merge of rust-lang#132511 - RalfJung:const_arguments_as_str, r=dtolnay
bfeeb74 Rollup merge of rust-lang#132503 - RalfJung:const-hash-map, r=Amanieu
a42fc21 Rollup merge of rust-lang#132499 - RalfJung:unicode_data.rs, r=tgross35
0278cab Rollup merge of rust-lang#132393 - zedddie16:issue-131865-fix, r=tgross35
714115a Rollup merge of rust-lang#131377 - rick-de-water:nonzero-exp, r=dtolnay
9789c54 Rollup merge of rust-lang#129329 - eduardosm:rc-from-mut-slice, r=dtolnay
ff9178b add const_panic macro to make it easier to fall back to non-formatting panic in const
9ef483b stabilize const_arguments_as_str
4c6593f Auto merge of rust-lang#132458 - RalfJung:rustc-const-unstable, r=Amanieu
81b20e0 Rustdoc: added brief colon explanation
73d9f4d Add Set entry API
e883a60 Add BorrowedBuf::into_filled{,_mut} methods to allow returning buffer with original lifetime
261c5b9 remove const_hash feature leftovers
d515da6 const_with_hasher test: actually construct a usable HashMap
11dc6c3 make char::is_whitespace unstably const
1a481fd unicode_data.rs: show command for generating file
3a5b026 get rid of a whole bunch of unnecessary rustc_const_unstable attributes
2e24b7f remove no-longer-needed attribute
ffbcba0 add missing safety comments
768d0cd adjust test gating for f16/f128
6335056 float types: move copysign, abs, signum to libcore
c353337 rustdoc-search: simplify rules for generics and type params
9d10ab7 Implement `From<&mut {slice}>` for `Box/Rc/Arc<{slice}>`
34329c0 Stabilize `const_atomic_from_ptr`
a2e1edf Arbitrary self types v2: (unused) Receiver trait
2d26681 ABI compatibility: remove section on target features
f1c9904 Support lock() and lock_shared() on async IO Files
7f6af4d Revert using `HEAP` static in Windows alloc
541bda1 Implement file_lock feature
d7a7b0a uefi: process: Add args support
14aef3d Use with_capacity(0) because we're reading the capacity later on
5b16abe Prefer `target_vendor = "apple"` on confstr
bc63981 use `confstr(_CS_DARWIN_USER_TEMP_DIR, ...)` as a `TMPDIR` fallback on darwin
f8dc879 Add LowerExp and UpperExp implementations
50afc52 Stabilize UnsafeCell::from_mut
aa74e93 Mark 'get_mut' and 'set_position' in 'std::io::Cursor' as const;
c370665 Make `std::os::darwin` public
797c249 Implement `mixed_integer_ops_unsigned_sub`
ff1212e Add vec_deque::Iter::as_slices and friends
e938dea try adding a test that LowerHex and friends don't panic, but it doesn't work
c6d2bb7 improve codegen of fmt_num to delete unreachable panic

git-subtree-dir: library
git-subtree-split: 78fc550
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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-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.

8 participants