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;
|
|
|
|
// CHECK-NEXT: %e = mul i32 %c, %a
|
|
|
|
e
|
|
|
|
// CHECK-NEXT: ret i32 %e
|
|
|
|
}
|