<commit_before>// This test checks that the call to memchr/slice_contains is optimized away
// when searching in small slices.

// compile-flags: -O

#![crate_type = "lib"]

// CHECK-LABEL: @foo1
#[no_mangle]
pub fn foo1(x: u8, data: &[u8; 1]) -> bool {
    // CHECK-NOT: memchr
    // CHECK-NOT: slice_contains
    data.contains(&x)
}

// CHECK-LABEL: @foo2
#[no_mangle]
pub fn foo2(x: u8, data: &[u8; 2]) -> bool {
    // CHECK-NOT: memchr
    // CHECK-NOT: slice_contains
    data.contains(&x)<commit_msg>Only test on x86_64<commit_after>// This test checks that the call to memchr/slice_contains is optimized away
// when searching in small slices.

// compile-flags: -O
// only-x86_64

#![crate_type = "lib"]

// CHECK-LABEL: @foo1
#[no_mangle]
pub fn foo1(x: u8, data: &[u8; 1]) -> bool {
    // CHECK-NOT: memchr
    // CHECK-NOT: slice_contains
    data.contains(&x)
}

// CHECK-LABEL: @foo2
#[no_mangle]
pub fn foo2(x: u8, data: &[u8; 2]) -> bool {
    // CHECK-NOT: memchr
    // CHECK-NOT: slice_contains
    data.contains(&x)
{'fraction_non_alphanumeric': 0.16875602700096431, 'fraction_numerical': 0.02700096432015429, 'mean_word_length': 2.9770114942528734, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7534813', 'n_tokens_mistral': 405, 'n_tokens_neox': 401, 'n_words': 109}