Skip to content

Optimize indexing slices and strs with inclusive ranges #145024

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Kmeakin
Copy link
Contributor

@Kmeakin Kmeakin commented Aug 6, 2025

Instead of separately checking for end == usize::MAX and end + 1 > slice.len(), we can check for end >= slice.len(). Also consolidate all the slice indexing related panic functions into a single function which reports the correct error depending on the arguments, as the str indexing code already does.

The downside of all this is that the panic message is slightly less specific when trying to index with [..=usize::MAX]: instead of saying "attempted to index slice up to maximum usize" it just says "range end index {end} out of range for slice of length {len}". But this is a rare enough case that I think it is acceptable

Kmeakin added 4 commits August 6, 2025 22:12
The check for `self.end() == usize::MAX` can be combined with the `self.end() +
1 > slice.len()` check into `self.en() >= slice.len()`, since `self.end() <
slice.len()` implies both `self.end() <= slice.len()` and `self.end() <
usize::MAX`.

The tradeoff is slightly worse error reporting: previously there would be a
special panic message in the `range.end() == usize::MAX` case.
Same reasoning as previous commit.
Consolidate all the panicking functions in `slice/index.rs` to use a single
`slice_index_fail` function, similar to how it is done in `str/traits.rs`.
@rustbot
Copy link
Collaborator

rustbot commented Aug 6, 2025

r? @ibraheemdev

rustbot has assigned @ibraheemdev.
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 Aug 6, 2025
@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
failures:

---- [codegen] tests/codegen-llvm/integer-overflow.rs stdout ----

error: verification with 'FileCheck' failed
status: exit status: 1
command: "/usr/lib/llvm-19/bin/FileCheck" "--input-file" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/integer-overflow/integer-overflow.ll" "/checkout/tests/codegen-llvm/integer-overflow.rs" "--check-prefix=CHECK" "--allow-unused-prefixes" "--dump-input-context" "100"
stdout: none
--- stderr -------------------------------
/checkout/tests/codegen-llvm/integer-overflow.rs:22:12: error: CHECK: expected string not found in input
 // CHECK: slice_index_order_fail
           ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/integer-overflow/integer-overflow.ll:48:32: note: scanning from here
define { ptr, i64 } @test_check(ptr noalias nocapture noundef readonly align 8 dereferenceable(24) %s, i64 noundef %x, i64 noundef %y) unnamed_addr #0 {
                               ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/integer-overflow/integer-overflow.ll:61:28: note: possible intended match here
; call core::slice::index::slice_index_fail
                           ^

Input file: /checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/integer-overflow/integer-overflow.ll
Check file: /checkout/tests/codegen-llvm/integer-overflow.rs

-dump-input=help explains the following input dump.

Input was:
<<<<<<
            1: ; ModuleID = 'integer_overflow.d0a7ef409b5390ce-cgu.0' 
            2: source_filename = "integer_overflow.d0a7ef409b5390ce-cgu.0" 
            3: target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32" 
            4: target triple = "aarch64-unknown-linux-gnu" 
            5:  
            6: @alloc_ff12d07b8177957b8387de7fa843423f = private unnamed_addr constant [49 x i8] c"/checkout/tests/codegen-llvm/integer-overflow.rs\00", align 1 
            7: @alloc_80b179535abce07e679fae91eb039f34 = private unnamed_addr constant <{ ptr, [16 x i8] }> <{ ptr @alloc_ff12d07b8177957b8387de7fa843423f, [16 x i8] c"0\00\00\00\00\00\00\00!\00\00\00\0E\00\00\00" }>, align 8 
            8: @alloc_2f052dbf1188cbaabd48a13a1569aeb7 = private unnamed_addr constant <{ ptr, [16 x i8] }> <{ ptr @alloc_ff12d07b8177957b8387de7fa843423f, [16 x i8] c"0\00\00\00\00\00\00\00\14\00\00\00\0E\00\00\00" }>, align 8 
            9: @alloc_5f8aec4342961b3bb401c39bc9e28820 = private unnamed_addr constant <{ ptr, [16 x i8] }> <{ ptr @alloc_ff12d07b8177957b8387de7fa843423f, [16 x i8] c"0\00\00\00\00\00\00\00\0C\00\00\00\17\00\00\00" }>, align 8 
           10:  
           11: ; Function Attrs: uwtable 
           12: define { ptr, i64 } @slice_no_index_order(ptr noalias nocapture noundef align 8 dereferenceable(24) %s, i64 noundef %n) unnamed_addr #0 { 
           13: start: 
           14:  %0 = getelementptr inbounds i8, ptr %s, i64 16 
           15:  %_4 = load i64, ptr %0, align 8, !noundef !2 
           16:  %1 = tail call { i64, i1 } @llvm.uadd.with.overflow.i64(i64 %_4, i64 %n) 
           17:  %_7.1 = extractvalue { i64, i1 } %1, 1 
           18:  br i1 %_7.1, label %panic, label %bb4.i 
           19:  
           20: bb4.i: ; preds = %start 
           21:  %_7.0 = extractvalue { i64, i1 } %1, 0 
           22:  %2 = getelementptr inbounds i8, ptr %s, i64 8 
           23:  %_9.1 = load i64, ptr %2, align 8, !noundef !2 
           24:  %_9.i = icmp ugt i64 %_7.0, %_9.1 
           25:  br i1 %_9.i, label %bb1.i, label %bb2, !prof !3 
           26:  
           27: bb1.i: ; preds = %bb4.i 
           28: ; call core::slice::index::slice_index_fail 
           29:  tail call void @_ZN4core5slice5index16slice_index_fail17h7239fba7d4845959E(i64 noundef %_4, i64 noundef %_7.0, i64 noundef %_9.1, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @alloc_2f052dbf1188cbaabd48a13a1569aeb7) #3, !noalias !4 
           30:  unreachable 
           31:  
           32: panic: ; preds = %start 
           33: ; call core::panicking::panic_const::panic_const_add_overflow 
           34:  tail call void @_ZN4core9panicking11panic_const24panic_const_add_overflow17he4d31f7bf74cda02E(ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @alloc_80b179535abce07e679fae91eb039f34) #3 
           35:  unreachable 
           36:  
           37: bb2: ; preds = %bb4.i 
           38:  %_9.0 = load ptr, ptr %s, align 8, !nonnull !2, !align !7, !noundef !2 
           39:  %_15.i = sub nuw i64 %_7.0, %_4 
           40:  %_17.i = getelementptr inbounds nuw i8, ptr %_9.0, i64 %_4 
           41:  %3 = insertvalue { ptr, i64 } poison, ptr %_17.i, 0 
           42:  %4 = insertvalue { ptr, i64 } %3, i64 %_15.i, 1 
           43:  store i64 %_7.0, ptr %0, align 8 
           44:  ret { ptr, i64 } %4 
           45: } 
           46:  
           47: ; Function Attrs: uwtable 
           48: define { ptr, i64 } @test_check(ptr noalias nocapture noundef readonly align 8 dereferenceable(24) %s, i64 noundef %x, i64 noundef %y) unnamed_addr #0 { 
check:22'0                                    X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
           49: start: 
check:22'0     ~~~~~~~
           50:  %_5.0 = load ptr, ptr %s, align 8, !nonnull !2, !align !7, !noundef !2 
check:22'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           51:  %0 = getelementptr inbounds i8, ptr %s, i64 8 
check:22'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           52:  %_5.1 = load i64, ptr %0, align 8, !noundef !2 
check:22'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           53:  %_14.i = icmp ult i64 %y, %x 
check:22'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           54:  br i1 %_14.i, label %bb3.i, label %bb4.i, !prof !3 
check:22'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           55:  
check:22'0     ~
           56: bb4.i: ; preds = %start 
check:22'0     ~~~~~~~~~~~~~~~~~~~~~~~~
           57:  %_9.i = icmp ult i64 %_5.1, %y 
check:22'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           58:  br i1 %_9.i, label %bb1.i, label %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17hb6ccfd74930e09ffE.exit", !prof !3 
check:22'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           59:  
check:22'0     ~
           60: bb3.i: ; preds = %start 
check:22'0     ~~~~~~~~~~~~~~~~~~~~~~~~
           61: ; call core::slice::index::slice_index_fail 
check:22'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:22'1                                ?                 possible intended match
           62:  tail call void @_ZN4core5slice5index16slice_index_fail17h7239fba7d4845959E(i64 noundef %x, i64 noundef %y, i64 noundef %_5.1, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @alloc_5f8aec4342961b3bb401c39bc9e28820) #3, !noalias !8 
check:22'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           63:  unreachable 
check:22'0     ~~~~~~~~~~~~~
           64:  
check:22'0     ~
           65: bb1.i: ; preds = %bb4.i 
check:22'0     ~~~~~~~~~~~~~~~~~~~~~~~~
           66: ; call core::slice::index::slice_index_fail 
check:22'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           67:  tail call void @_ZN4core5slice5index16slice_index_fail17h7239fba7d4845959E(i64 noundef %x, i64 noundef %y, i64 noundef %_5.1, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @alloc_5f8aec4342961b3bb401c39bc9e28820) #3, !noalias !8 
check:22'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           68:  unreachable 
check:22'0     ~~~~~~~~~~~~~
           69:  
check:22'0     ~
           70: "_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17hb6ccfd74930e09ffE.exit": ; preds = %bb4.i 
check:22'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           71:  %_15.i = sub nuw i64 %y, %x 
check:22'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           72:  %_17.i = getelementptr inbounds nuw i8, ptr %_5.0, i64 %x 
check:22'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           73:  %1 = insertvalue { ptr, i64 } poison, ptr %_17.i, 0 
check:22'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           74:  %2 = insertvalue { ptr, i64 } %1, i64 %_15.i, 1 
check:22'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           75:  ret { ptr, i64 } %2 
check:22'0     ~~~~~~~~~~~~~~~~~~~~~
           76: } 
check:22'0     ~~
           77:  
check:22'0     ~
           78: ; core::slice::index::slice_index_fail 
check:22'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           79: ; Function Attrs: cold noinline noreturn uwtable 
check:22'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           80: declare void @_ZN4core5slice5index16slice_index_fail17h7239fba7d4845959E(i64 noundef, i64 noundef, i64 noundef, ptr noalias noundef readonly align 8 dereferenceable(24)) unnamed_addr #1 
check:22'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           81:  
check:22'0     ~
           82: ; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) 
check:22'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           83: declare { i64, i1 } @llvm.uadd.with.overflow.i64(i64, i64) #2 
check:22'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           84:  
check:22'0     ~
           85: ; core::panicking::panic_const::panic_const_add_overflow 
check:22'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           86: ; Function Attrs: cold noinline noreturn uwtable 
check:22'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           87: declare void @_ZN4core9panicking11panic_const24panic_const_add_overflow17he4d31f7bf74cda02E(ptr noalias noundef readonly align 8 dereferenceable(24)) unnamed_addr #1 
check:22'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           88:  
check:22'0     ~
           89: attributes #0 = { uwtable "frame-pointer"="non-leaf" "probe-stack"="inline-asm" "target-cpu"="generic" "target-features"="+v8a,+outline-atomics" } 
check:22'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           90: attributes #1 = { cold noinline noreturn uwtable "frame-pointer"="non-leaf" "probe-stack"="inline-asm" "target-cpu"="generic" "target-features"="+v8a,+outline-atomics" } 
check:22'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           91: attributes #2 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) } 
check:22'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           92: attributes #3 = { noreturn } 
check:22'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           93:  
check:22'0     ~
           94: !llvm.module.flags = !{!0} 
check:22'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
           95: !llvm.ident = !{!1} 
check:22'0     ~~~~~~~~~~~~~~~~~~~~
           96:  
check:22'0     ~
           97: !0 = !{i32 8, !"PIC Level", i32 2} 
check:22'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           98: !1 = !{!"rustc version 1.91.0-nightly (a9eea1f0c 2025-08-06)"} 
check:22'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           99: !2 = !{} 
check:22'0     ~~~~~~~~~
          100: !3 = !{!"branch_weights", !"expected", i32 1, i32 2000} 
check:22'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          101: !4 = !{!5} 
check:22'0     ~~~~~~~~~~~
          102: !5 = distinct !{!5, !6, !"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17hb6ccfd74930e09ffE: %slice.0"} 
check:22'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          103: !6 = distinct !{!6, !"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17hb6ccfd74930e09ffE"} 
check:22'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          104: !7 = !{i64 1} 
check:22'0     ~~~~~~~~~~~~~~
          105: !8 = !{!9} 
check:22'0     ~~~~~~~~~~~
          106: !9 = distinct !{!9, !10, !"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17hb6ccfd74930e09ffE: %slice.0"} 
check:22'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          107: !10 = distinct !{!10, !"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17hb6ccfd74930e09ffE"} 
check:22'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>>>>>
------------------------------------------


---- [codegen] tests/codegen-llvm/issues/issue-69101-bounds-check.rs stdout ----

error: verification with 'FileCheck' failed
status: exit status: 1
command: "/usr/lib/llvm-19/bin/FileCheck" "--input-file" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/issues/issue-69101-bounds-check/issue-69101-bounds-check.ll" "/checkout/tests/codegen-llvm/issues/issue-69101-bounds-check.rs" "--check-prefix=CHECK" "--allow-unused-prefixes" "--dump-input-context" "100"
stdout: none
--- stderr -------------------------------
/checkout/tests/codegen-llvm/issues/issue-69101-bounds-check.rs:13:12: error: CHECK: expected string not found in input
 // CHECK: slice_end_index_len_fail
           ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/issues/issue-69101-bounds-check/issue-69101-bounds-check.ll:19:44: note: scanning from here
define void @already_sliced_no_bounds_check(ptr noalias nocapture noundef nonnull readonly align 1 %a.0, i64 noundef %a.1, ptr noalias nocapture noundef nonnull readonly align 1 %b.0, i64 noundef %b.1, ptr noalias nocapture noundef nonnull writeonly align 1 %c.0, i64 noundef %c.1) unnamed_addr #0 {
                                           ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/issues/issue-69101-bounds-check/issue-69101-bounds-check.ll:25:28: note: possible intended match here
; call core::slice::index::slice_index_fail
                           ^
/checkout/tests/codegen-llvm/issues/issue-69101-bounds-check.rs:24:12: error: CHECK: expected string not found in input
 // CHECK: slice_end_index_len_fail
           ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/issues/issue-69101-bounds-check/issue-69101-bounds-check.ll:497:50: note: scanning from here
define void @already_sliced_no_bounds_check_exact(ptr noalias nocapture noundef nonnull readonly align 1 %a.0, i64 noundef %a.1, ptr noalias nocapture noundef nonnull readonly align 1 %b.0, i64 noundef %b.1, ptr noalias nocapture noundef nonnull writeonly align 1 %c.0, i64 noundef %c.1) unnamed_addr #0 {
                                                 ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/issues/issue-69101-bounds-check/issue-69101-bounds-check.ll:503:28: note: possible intended match here
; call core::slice::index::slice_index_fail
                           ^
/checkout/tests/codegen-llvm/issues/issue-69101-bounds-check.rs:36:12: error: CHECK: expected string not found in input
 // CHECK: slice_end_index_len_fail
           ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/issues/issue-69101-bounds-check/issue-69101-bounds-check.ll:975:41: note: scanning from here
define void @already_sliced_bounds_check(ptr noalias nocapture noundef nonnull readonly align 1 %a.0, i64 noundef %a.1, ptr noalias nocapture noundef nonnull readonly align 1 %b.0, i64 noundef %b.1, ptr noalias nocapture noundef nonnull writeonly align 1 %c.0, i64 noundef %c.1) unnamed_addr #0 {
                                        ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/issues/issue-69101-bounds-check/issue-69101-bounds-check.ll:981:28: note: possible intended match here
; call core::slice::index::slice_index_fail
                           ^

Input file: /checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/issues/issue-69101-bounds-check/issue-69101-bounds-check.ll
Check file: /checkout/tests/codegen-llvm/issues/issue-69101-bounds-check.rs

-dump-input=help explains the following input dump.

Input was:
<<<<<<
            1: ; ModuleID = 'issue_69101_bounds_check.f796e1e003b06a72-cgu.0' 
            2: source_filename = "issue_69101_bounds_check.f796e1e003b06a72-cgu.0" 
            3: target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32" 
            4: target triple = "aarch64-unknown-linux-gnu" 
            5:  
            6: @alloc_e0073998dbaedaf627eb89eab806b434 = private unnamed_addr constant [64 x i8] c"/checkout/tests/codegen-llvm/issues/issue-69101-bounds-check.rs\00", align 1 
            7: @alloc_d8c049126d147b68a60f5c2cc90be550 = private unnamed_addr constant <{ ptr, [16 x i8] }> <{ ptr @alloc_e0073998dbaedaf627eb89eab806b434, [16 x i8] c"?\00\00\00\00\00\00\00\10\00\00\00\0F\00\00\00" }>, align 8 
            8: @alloc_f21a8f1db6d4b71716735462cb8f5045 = private unnamed_addr constant <{ ptr, [16 x i8] }> <{ ptr @alloc_e0073998dbaedaf627eb89eab806b434, [16 x i8] c"?\00\00\00\00\00\00\00\1C\00\00\00\0F\00\00\00" }>, align 8 
            9: @alloc_8d27892e916a919b32748c4ef2afe7bb = private unnamed_addr constant <{ ptr, [16 x i8] }> <{ ptr @alloc_e0073998dbaedaf627eb89eab806b434, [16 x i8] c"?\00\00\00\00\00\00\00,\00\00\00\0F\00\00\00" }>, align 8 
           10: @alloc_a806dec9e5b353ba559ee6e6349fff24 = private unnamed_addr constant <{ ptr, [16 x i8] }> <{ ptr @alloc_e0073998dbaedaf627eb89eab806b434, [16 x i8] c"?\00\00\00\00\00\00\00\10\00\00\00\1A\00\00\00" }>, align 8 
           11: @alloc_fd852bdad66320c930706b5c060267ad = private unnamed_addr constant <{ ptr, [16 x i8] }> <{ ptr @alloc_e0073998dbaedaf627eb89eab806b434, [16 x i8] c"?\00\00\00\00\00\00\00\1C\00\00\00\1A\00\00\00" }>, align 8 
           12: @alloc_c7605538d35d134e9b74d5f217c4e0dd = private unnamed_addr constant <{ ptr, [16 x i8] }> <{ ptr @alloc_e0073998dbaedaf627eb89eab806b434, [16 x i8] c"?\00\00\00\00\00\00\00,\00\00\00\1A\00\00\00" }>, align 8 
           13: @alloc_30dfbed0ae8f0bf93c63e9704b7734d6 = private unnamed_addr constant <{ ptr, [16 x i8] }> <{ ptr @alloc_e0073998dbaedaf627eb89eab806b434, [16 x i8] c"?\00\00\00\00\00\00\00\10\00\00\00&\00\00\00" }>, align 8 
           14: @alloc_61f814102c20f28d639093ba5ed4c7d0 = private unnamed_addr constant <{ ptr, [16 x i8] }> <{ ptr @alloc_e0073998dbaedaf627eb89eab806b434, [16 x i8] c"?\00\00\00\00\00\00\00\1C\00\00\00&\00\00\00" }>, align 8 
           15: @alloc_28bd3360f826dd440c44476f7b26c2b5 = private unnamed_addr constant <{ ptr, [16 x i8] }> <{ ptr @alloc_e0073998dbaedaf627eb89eab806b434, [16 x i8] c"?\00\00\00\00\00\00\00,\00\00\00&\00\00\00" }>, align 8 
           16: @alloc_750a443aab3685d35612bde5fb8572c3 = private unnamed_addr constant <{ ptr, [16 x i8] }> <{ ptr @alloc_e0073998dbaedaf627eb89eab806b434, [16 x i8] c"?\00\00\00\00\00\00\00\10\00\00\00(\00\00\00" }>, align 8 
           17:  
           18: ; Function Attrs: uwtable 
           19: define void @already_sliced_no_bounds_check(ptr noalias nocapture noundef nonnull readonly align 1 %a.0, i64 noundef %a.1, ptr noalias nocapture noundef nonnull readonly align 1 %b.0, i64 noundef %b.1, ptr noalias nocapture noundef nonnull writeonly align 1 %c.0, i64 noundef %c.1) unnamed_addr #0 { 
check:13'0                                                X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
           20: start: 
check:13'0     ~~~~~~~
           21:  %_9.i4 = icmp ult i64 %a.1, 2048 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           22:  br i1 %_9.i4, label %bb1.i5, label %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17hbfbfd951c32d7235E.exit6", !prof !2 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           23:  
check:13'0     ~
           24: bb1.i5: ; preds = %start 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~
           25: ; call core::slice::index::slice_index_fail 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:13'1                                ?                 possible intended match
           26:  tail call void @_ZN4core5slice5index16slice_index_fail17h7239fba7d4845959E(i64 noundef 0, i64 noundef 2048, i64 noundef %a.1, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @alloc_d8c049126d147b68a60f5c2cc90be550) #4, !noalias !3 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           27:  unreachable 
check:13'0     ~~~~~~~~~~~~~
           28:  
check:13'0     ~
           29: "_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17hbfbfd951c32d7235E.exit6": ; preds = %start 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           30:  %_9.i = icmp ult i64 %b.1, 2048 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           31:  br i1 %_9.i, label %bb1.i, label %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17hbfbfd951c32d7235E.exit", !prof !2 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           32:  
check:13'0     ~
           33: bb1.i: ; preds = %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17hbfbfd951c32d7235E.exit6" 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           34: ; call core::slice::index::slice_index_fail 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           35:  tail call void @_ZN4core5slice5index16slice_index_fail17h7239fba7d4845959E(i64 noundef 0, i64 noundef 2048, i64 noundef %b.1, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @alloc_f21a8f1db6d4b71716735462cb8f5045) #4, !noalias !6 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           36:  unreachable 
check:13'0     ~~~~~~~~~~~~~
           37:  
check:13'0     ~
           38: "_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17hbfbfd951c32d7235E.exit": ; preds = %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17hbfbfd951c32d7235E.exit6" 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           39:  %_9.i7 = icmp ult i64 %c.1, 2048 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           40:  br i1 %_9.i7, label %bb1.i8, label %vector.body, !prof !2 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           41:  
check:13'0     ~
           42: vector.body: ; preds = %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17hbfbfd951c32d7235E.exit" 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           43:  %0 = getelementptr inbounds i8, ptr %a.0, i64 16 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           44:  %wide.load = load <16 x i8>, ptr %a.0, align 1 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           45:  %wide.load13 = load <16 x i8>, ptr %0, align 1 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           46:  %1 = getelementptr inbounds i8, ptr %b.0, i64 16 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           47:  %wide.load14 = load <16 x i8>, ptr %b.0, align 1 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           48:  %wide.load15 = load <16 x i8>, ptr %1, align 1 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           49:  %2 = xor <16 x i8> %wide.load14, %wide.load 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           50:  %3 = xor <16 x i8> %wide.load15, %wide.load13 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           51:  %4 = getelementptr inbounds i8, ptr %c.0, i64 16 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           52:  store <16 x i8> %2, ptr %c.0, align 1 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           53:  store <16 x i8> %3, ptr %4, align 1 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           54:  %5 = getelementptr inbounds i8, ptr %a.0, i64 32 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           55:  %6 = getelementptr inbounds i8, ptr %a.0, i64 48 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           56:  %wide.load.1 = load <16 x i8>, ptr %5, align 1 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           57:  %wide.load13.1 = load <16 x i8>, ptr %6, align 1 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           58:  %7 = getelementptr inbounds i8, ptr %b.0, i64 32 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           59:  %8 = getelementptr inbounds i8, ptr %b.0, i64 48 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           60:  %wide.load14.1 = load <16 x i8>, ptr %7, align 1 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           61:  %wide.load15.1 = load <16 x i8>, ptr %8, align 1 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           62:  %9 = getelementptr inbounds i8, ptr %c.0, i64 32 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           63:  %10 = xor <16 x i8> %wide.load14.1, %wide.load.1 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           64:  %11 = xor <16 x i8> %wide.load15.1, %wide.load13.1 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           65:  %12 = getelementptr inbounds i8, ptr %c.0, i64 48 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           66:  store <16 x i8> %10, ptr %9, align 1 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           67:  store <16 x i8> %11, ptr %12, align 1 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           68:  %13 = getelementptr inbounds i8, ptr %a.0, i64 64 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           69:  %14 = getelementptr inbounds i8, ptr %a.0, i64 80 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           70:  %wide.load.2 = load <16 x i8>, ptr %13, align 1 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           71:  %wide.load13.2 = load <16 x i8>, ptr %14, align 1 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           72:  %15 = getelementptr inbounds i8, ptr %b.0, i64 64 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           73:  %16 = getelementptr inbounds i8, ptr %b.0, i64 80 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           74:  %wide.load14.2 = load <16 x i8>, ptr %15, align 1 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           75:  %wide.load15.2 = load <16 x i8>, ptr %16, align 1 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           76:  %17 = getelementptr inbounds i8, ptr %c.0, i64 64 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           77:  %18 = xor <16 x i8> %wide.load14.2, %wide.load.2 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           78:  %19 = xor <16 x i8> %wide.load15.2, %wide.load13.2 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           79:  %20 = getelementptr inbounds i8, ptr %c.0, i64 80 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           80:  store <16 x i8> %18, ptr %17, align 1 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           81:  store <16 x i8> %19, ptr %20, align 1 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           82:  %21 = getelementptr inbounds i8, ptr %a.0, i64 96 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           83:  %22 = getelementptr inbounds i8, ptr %a.0, i64 112 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           84:  %wide.load.3 = load <16 x i8>, ptr %21, align 1 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           85:  %wide.load13.3 = load <16 x i8>, ptr %22, align 1 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           86:  %23 = getelementptr inbounds i8, ptr %b.0, i64 96 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           87:  %24 = getelementptr inbounds i8, ptr %b.0, i64 112 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           88:  %wide.load14.3 = load <16 x i8>, ptr %23, align 1 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           89:  %wide.load15.3 = load <16 x i8>, ptr %24, align 1 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           90:  %25 = getelementptr inbounds i8, ptr %c.0, i64 96 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           91:  %26 = xor <16 x i8> %wide.load14.3, %wide.load.3 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           92:  %27 = xor <16 x i8> %wide.load15.3, %wide.load13.3 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           93:  %28 = getelementptr inbounds i8, ptr %c.0, i64 112 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           94:  store <16 x i8> %26, ptr %25, align 1 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           95:  store <16 x i8> %27, ptr %28, align 1 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           96:  %29 = getelementptr inbounds i8, ptr %a.0, i64 128 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           97:  %30 = getelementptr inbounds i8, ptr %a.0, i64 144 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           98:  %wide.load.4 = load <16 x i8>, ptr %29, align 1 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           99:  %wide.load13.4 = load <16 x i8>, ptr %30, align 1 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          100:  %31 = getelementptr inbounds i8, ptr %b.0, i64 128 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          101:  %32 = getelementptr inbounds i8, ptr %b.0, i64 144 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          102:  %wide.load14.4 = load <16 x i8>, ptr %31, align 1 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          103:  %wide.load15.4 = load <16 x i8>, ptr %32, align 1 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          104:  %33 = getelementptr inbounds i8, ptr %c.0, i64 128 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          105:  %34 = xor <16 x i8> %wide.load14.4, %wide.load.4 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          106:  %35 = xor <16 x i8> %wide.load15.4, %wide.load13.4 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          107:  %36 = getelementptr inbounds i8, ptr %c.0, i64 144 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          108:  store <16 x i8> %34, ptr %33, align 1 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          109:  store <16 x i8> %35, ptr %36, align 1 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          110:  %37 = getelementptr inbounds i8, ptr %a.0, i64 160 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          111:  %38 = getelementptr inbounds i8, ptr %a.0, i64 176 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          112:  %wide.load.5 = load <16 x i8>, ptr %37, align 1 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          113:  %wide.load13.5 = load <16 x i8>, ptr %38, align 1 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          114:  %39 = getelementptr inbounds i8, ptr %b.0, i64 160 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          115:  %40 = getelementptr inbounds i8, ptr %b.0, i64 176 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          116:  %wide.load14.5 = load <16 x i8>, ptr %39, align 1 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          117:  %wide.load15.5 = load <16 x i8>, ptr %40, align 1 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          118:  %41 = getelementptr inbounds i8, ptr %c.0, i64 160 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          119:  %42 = xor <16 x i8> %wide.load14.5, %wide.load.5 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          120:  %43 = xor <16 x i8> %wide.load15.5, %wide.load13.5 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          121:  %44 = getelementptr inbounds i8, ptr %c.0, i64 176 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          122:  store <16 x i8> %42, ptr %41, align 1 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          123:  store <16 x i8> %43, ptr %44, align 1 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          124:  %45 = getelementptr inbounds i8, ptr %a.0, i64 192 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          125:  %46 = getelementptr inbounds i8, ptr %a.0, i64 208 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            .
            .
            .
          397:  %wide.load15.25 = load <16 x i8>, ptr %200, align 1 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          398:  %201 = getelementptr inbounds i8, ptr %c.0, i64 800 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          399:  %202 = xor <16 x i8> %wide.load14.25, %wide.load.25 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          400:  %203 = xor <16 x i8> %wide.load15.25, %wide.load13.25 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          401:  %204 = getelementptr inbounds i8, ptr %c.0, i64 816 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          402:  store <16 x i8> %202, ptr %201, align 1 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          403:  store <16 x i8> %203, ptr %204, align 1 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          404:  %205 = getelementptr inbounds i8, ptr %a.0, i64 832 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          405:  %206 = getelementptr inbounds i8, ptr %a.0, i64 848 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          406:  %wide.load.26 = load <16 x i8>, ptr %205, align 1 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          407:  %wide.load13.26 = load <16 x i8>, ptr %206, align 1 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          408:  %207 = getelementptr inbounds i8, ptr %b.0, i64 832 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Copy link
Member

@scottmcm scottmcm left a comment

Choose a reason for hiding this comment

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

As you saw from the PR build failure, if you're touching things like slice_index_order_fail you'll need to look through every mention of those in the repo -- there are a bunch of codegen tests that look for their absence, and you need to make sure that you don't make those tests useless by renaming what they're looking for.

(You probably also need to re-bless some MIR tests that include indexing.)

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-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