2019-09-04 07:21:46 -05:00
|
|
|
//@ compile-flags: -O -C no-prepopulate-passes
|
|
|
|
|
|
|
|
#![crate_type = "lib"]
|
|
|
|
|
2022-12-30 08:55:05 -06:00
|
|
|
// CHECK-LABEL: define{{.*}}i32 @test(i32 noundef %a, i32 noundef %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
|
|
|
}
|