2019-09-04 07:21:46 -05:00
|
|
|
//@ compile-flags: -O -C no-prepopulate-passes
|
|
|
|
|
|
|
|
#![crate_type = "lib"]
|
|
|
|
|
2024-10-19 19:36:36 -05:00
|
|
|
// CHECK-LABEL: define{{.*}}i32 @test(i32{{.*}} %a, i32{{.*}} %b)
|
2019-09-04 07:21:46 -05:00
|
|
|
#[no_mangle]
|
|
|
|
pub fn test(a: u32, b: u32) -> u32 {
|
|
|
|
let c = a + b;
|
|
|
|
// CHECK: %c = add i32 %a, %b
|
|
|
|
let d = c;
|
|
|
|
let e = d * a;
|
2023-05-15 14:15:28 -05:00
|
|
|
// CHECK-NEXT: %e = mul i32 %c, %a
|
2019-09-04 07:21:46 -05:00
|
|
|
e
|
2023-05-15 14:15:28 -05:00
|
|
|
// CHECK-NEXT: ret i32 %e
|
2019-09-04 07:21:46 -05:00
|
|
|
}
|