summary refs log tree commit diff
path: root/tests/codegen/issues/issue-101048.rs
blob: cfe65e758fdbd8e6db7989dbd7abc5031d276ecf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
//@ compile-flags: -Copt-level=3

#![crate_type = "lib"]

#[no_mangle]
pub fn all_zero(data: &[u64]) -> bool {
    // CHECK-LABEL: @all_zero(
    // CHECK: [[PHI:%.*]] = phi i1
    // CHECK-NOT: phi i8
    // CHECK-NOT: zext
    data.iter().copied().fold(true, |acc, x| acc & (x == 0))
}