1 // Regression test for #75525, verifies that no bounds checks are generated.
3 // min-llvm-version: 12.0.0
11 pub fn f0(idx: usize, buf: &[u8; 10]) -> u8 {
12 if idx < 8 { buf[idx + 1] } else { 0 }
18 pub fn f1(idx: usize, buf: &[u8; 10]) -> u8 {
19 if idx > 5 && idx < 8 { buf[idx - 1] } else { 0 }
25 pub fn f2(idx: usize, buf: &[u8; 10]) -> u8 {
26 if idx > 5 && idx < 8 { buf[idx] } else { 0 }