2024-02-22 06:10:29 -06:00
|
|
|
//@ compile-flags: -O
|
2024-10-11 16:41:02 -05:00
|
|
|
//@ revisions: host x86-64-v3
|
|
|
|
|
|
|
|
// This particular CPU regressed in #131563
|
|
|
|
//@[x86-64-v3] only-x86_64
|
|
|
|
//@[x86-64-v3] compile-flags: -Ctarget-cpu=x86-64-v3
|
2023-04-03 09:37:42 -05:00
|
|
|
|
|
|
|
#![crate_type = "lib"]
|
|
|
|
|
|
|
|
#[no_mangle]
|
|
|
|
pub fn test() -> usize {
|
|
|
|
// CHECK-LABEL: @test(
|
2023-04-11 10:19:07 -05:00
|
|
|
// CHECK: ret {{i64|i32}} 165
|
2023-04-03 09:37:42 -05:00
|
|
|
let values = [23, 16, 54, 3, 60, 9];
|
|
|
|
let mut acc = 0;
|
|
|
|
for item in values {
|
|
|
|
acc += item;
|
|
|
|
}
|
|
|
|
acc
|
|
|
|
}
|