about summary refs log tree commit diff
path: root/tests/codegen-llvm/vec-optimizes-away.rs
blob: 93b55454b108ce6fe1cc28e404033e88a0b7b94c (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 sum_me() -> i32 {
    // CHECK-LABEL: @sum_me
    // CHECK-NEXT: {{^.*:$}}
    // CHECK-NEXT: ; call __rustc::__rust_no_alloc_shim_is_unstable_v2
    // CHECK-NEXT: tail call void @_R{{.+}}__rust_no_alloc_shim_is_unstable_v2()
    // CHECK-NEXT: ret i32 6
    vec![1, 2, 3].iter().sum::<i32>()
}