]> git.lizzy.rs Git - rust.git/blob - tests/codegen/fewer-names.rs
Rollup merge of #107190 - fmease:fix-81698, r=compiler-errors
[rust.git] / tests / codegen / fewer-names.rs
1 // no-system-llvm
2 // compile-flags: -Coverflow-checks=no -O
3 // revisions: YES NO
4 // [YES]compile-flags: -Zfewer-names=yes
5 // [NO] compile-flags: -Zfewer-names=no
6 #![crate_type = "lib"]
7
8 #[no_mangle]
9 pub fn sum(x: u32, y: u32) -> u32 {
10 // YES-LABEL: define{{.*}}i32 @sum(i32 noundef %0, i32 noundef %1)
11 // YES-NEXT:    %3 = add i32 %1, %0
12 // YES-NEXT:    ret i32 %3
13
14 // NO-LABEL: define{{.*}}i32 @sum(i32 noundef %x, i32 noundef %y)
15 // NO-NEXT:  start:
16 // NO-NEXT:    %z = add i32 %y, %x
17 // NO-NEXT:    ret i32 %z
18     let z = x + y;
19     z
20 }