-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #115959 - nikic:update-llvm-13, r=cuviper
Update to LLVM 17.0.0 This rebases our LLVM fork to 17.0.0. Fixes #115681.
- Loading branch information
Showing
3 changed files
with
34 additions
and
2 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
Submodule llvm-project
updated
157 files
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,32 @@ | ||
// run-pass | ||
// compile-flags: -C opt-level=1 | ||
|
||
// Make sure LLVM does not miscompile this match. | ||
fn main() { | ||
enum Bits { | ||
None = 0x00, | ||
Low = 0x40, | ||
High = 0x80, | ||
Both = 0xC0, | ||
} | ||
|
||
let value = Box::new(0x40u8); | ||
let mut out = Box::new(0u8); | ||
|
||
let bits = match *value { | ||
0x00 => Bits::None, | ||
0x40 => Bits::Low, | ||
0x80 => Bits::High, | ||
0xC0 => Bits::Both, | ||
_ => return, | ||
}; | ||
|
||
match bits { | ||
Bits::None | Bits::Low => { | ||
*out = 1; | ||
} | ||
_ => (), | ||
} | ||
|
||
assert_eq!(*out, 1); | ||
} |