Skip to content

Commit

Permalink
Auto merge of rust-lang#115959 - nikic:update-llvm-13, r=cuviper
Browse files Browse the repository at this point in the history
Update to LLVM 17.0.0

This rebases our LLVM fork to 17.0.0.

Fixes rust-lang#115681.
  • Loading branch information
bors committed Sep 20, 2023
2 parents 3b9e0fe + 531830c commit 793d5ea
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
[submodule "src/llvm-project"]
path = src/llvm-project
url = https://github.com/rust-lang/llvm-project.git
branch = rustc/17.0-2023-07-29
branch = rustc/17.0-2023-09-19
shallow = true
[submodule "src/doc/embedded-book"]
path = src/doc/embedded-book
Expand Down
2 changes: 1 addition & 1 deletion src/llvm-project
Submodule llvm-project updated 157 files
32 changes: 32 additions & 0 deletions tests/ui/match/issue-115681.rs
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);
}

0 comments on commit 793d5ea

Please sign in to comment.