rust/tests/codegen-llvm/lib-optimizations/eq_ignore_ascii_case.rs
okaneco a5ba24843d Relocate bench and use str corpora for data
Add #[inline(always)] to inner function and check not for filecheck test
2025-10-08 14:42:33 -04:00

16 lines
539 B
Rust

//@ compile-flags: -Copt-level=3
//@ only-x86_64
#![crate_type = "lib"]
// Ensure that the optimized variant of the function gets auto-vectorized and
// that the inner helper function is inlined.
// CHECK-LABEL: @eq_ignore_ascii_case_autovectorized
#[no_mangle]
pub fn eq_ignore_ascii_case_autovectorized(s: &str, other: &str) -> bool {
// CHECK: load <16 x i8>
// CHECK: load <16 x i8>
// CHECK: bitcast <16 x i1>
// CHECK-NOT: call {{.*}}eq_ignore_ascii_inner
// CHECK-NOT: panic
s.eq_ignore_ascii_case(other)
}