diff options
Diffstat (limited to 'tests/codegen/fewer-names.rs')
-rw-r--r-- | tests/codegen/fewer-names.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/codegen/fewer-names.rs b/tests/codegen/fewer-names.rs new file mode 100644 index 000000000..ac8cba06b --- /dev/null +++ b/tests/codegen/fewer-names.rs @@ -0,0 +1,20 @@ +// no-system-llvm +// compile-flags: -Coverflow-checks=no -O +// revisions: YES NO +// [YES]compile-flags: -Zfewer-names=yes +// [NO] compile-flags: -Zfewer-names=no +#![crate_type = "lib"] + +#[no_mangle] +pub fn sum(x: u32, y: u32) -> u32 { +// YES-LABEL: define{{.*}}i32 @sum(i32 noundef %0, i32 noundef %1) +// YES-NEXT: %3 = add i32 %1, %0 +// YES-NEXT: ret i32 %3 + +// NO-LABEL: define{{.*}}i32 @sum(i32 noundef %x, i32 noundef %y) +// NO-NEXT: start: +// NO-NEXT: %z = add i32 %y, %x +// NO-NEXT: ret i32 %z + let z = x + y; + z +} |