]> git.lizzy.rs Git - rust.git/blob - tests/codegen/var-names.rs
Rollup merge of #106978 - mejrs:mir_build3, r=davidtwco
[rust.git] / tests / codegen / var-names.rs
1 // compile-flags: -O -C no-prepopulate-passes
2
3 #![crate_type = "lib"]
4
5 // CHECK-LABEL: define{{.*}}i32 @test(i32 noundef %a, i32 noundef %b)
6 #[no_mangle]
7 pub fn test(a: u32, b: u32) -> u32 {
8     let c = a + b;
9     // CHECK: %c = add i32 %a, %b
10     let d = c;
11     let e = d * a;
12     // CHECK-NEXT: %e = mul i32 %c, %a
13     e
14     // CHECK-NEXT: ret i32 %e
15 }