2020-11-22 18:00:00 -06:00
|
|
|
// no-system-llvm
|
|
|
|
// compile-flags: -Coverflow-checks=no -O
|
|
|
|
// revisions: YES NO
|
|
|
|
// [YES]compile-flags: -Zfewer-names=yes
|
|
|
|
// [NO] compile-flags: -Zfewer-names=no
|
|
|
|
#![crate_type = "lib"]
|
|
|
|
|
|
|
|
#[no_mangle]
|
|
|
|
pub fn sum(x: u32, y: u32) -> u32 {
|
2022-12-30 08:55:05 -06:00
|
|
|
// YES-LABEL: define{{.*}}i32 @sum(i32 noundef %0, i32 noundef %1)
|
2020-11-22 18:00:00 -06:00
|
|
|
// YES-NEXT: %3 = add i32 %1, %0
|
|
|
|
// YES-NEXT: ret i32 %3
|
|
|
|
|
2022-12-30 08:55:05 -06:00
|
|
|
// NO-LABEL: define{{.*}}i32 @sum(i32 noundef %x, i32 noundef %y)
|
2020-11-22 18:00:00 -06:00
|
|
|
// NO-NEXT: start:
|
2023-03-10 04:29:41 -06:00
|
|
|
// NO-NEXT: %0 = add i32 %y, %x
|
|
|
|
// NO-NEXT: ret i32 %0
|
2020-11-22 18:00:00 -06:00
|
|
|
let z = x + y;
|
|
|
|
z
|
|
|
|
}
|