-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #79346 - tmiasko:more-names, r=jonas-schievink
Allow using `-Z fewer-names=no` to retain value names Change `-Z fewer-names` into an optional boolean flag and allow using it to either discard value names when true or retain them when false, regardless of other settings.
- Loading branch information
Showing
4 changed files
with
31 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 %0, i32 %1) | ||
// YES-NEXT: %3 = add i32 %1, %0 | ||
// YES-NEXT: ret i32 %3 | ||
|
||
// NO-LABEL: define i32 @sum(i32 %x, i32 %y) | ||
// NO-NEXT: start: | ||
// NO-NEXT: %z = add i32 %y, %x | ||
// NO-NEXT: ret i32 %z | ||
let z = x + y; | ||
z | ||
} |