2020-11-23 00:00:00 +00:00
|
|
|
//@ 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 {
|
2024-10-20 00:36:36 +00:00
|
|
|
// YES-LABEL: define{{.*}}i32 @sum(i32{{.*}} %0, i32{{.*}} %1)
|
2023-04-30 02:02:45 +00:00
|
|
|
// YES-NEXT: %3 = add i32 %1, %0
|
|
|
|
// YES-NEXT: ret i32 %3
|
2020-11-23 00:00:00 +00:00
|
|
|
|
2024-10-20 00:36:36 +00:00
|
|
|
// NO-LABEL: define{{.*}}i32 @sum(i32{{.*}} %x, i32{{.*}} %y)
|
2023-04-30 02:02:45 +00:00
|
|
|
// NO-NEXT: start:
|
2023-05-15 19:15:28 +00:00
|
|
|
// NO-NEXT: %z = add i32 %y, %x
|
|
|
|
// NO-NEXT: ret i32 %z
|
2020-11-23 00:00:00 +00:00
|
|
|
let z = x + y;
|
|
|
|
z
|
|
|
|
}
|