about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2023-09-19 10:46:06 +0200
committerNikita Popov <npopov@redhat.com>2023-09-19 11:14:35 +0200
commit531830cecd8467735e5c6fd9caa7a28683c028fb (patch)
tree03d4e807d6b6cd58ae9acce8ea56905bc88a4458
parentde68911f4adaed19ac662880cf1a5ded9e44d685 (diff)
downloadrust-531830cecd8467735e5c6fd9caa7a28683c028fb.tar.gz
rust-531830cecd8467735e5c6fd9caa7a28683c028fb.zip
Update to LLVM 17.0.0
This rebases our LLVM fork to 17.0.0.

Fixes #115681.
-rw-r--r--.gitmodules2
m---------src/llvm-project0
-rw-r--r--tests/ui/match/issue-115681.rs32
3 files changed, 33 insertions, 1 deletions
diff --git a/.gitmodules b/.gitmodules
index a13a2f5e01b..f5025097a18 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -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
diff --git a/src/llvm-project b/src/llvm-project
-Subproject 0537f6354cffe546cbf47f6dc9c7f82e49e86cf
+Subproject 42263494d29febc26d3c1ebdaa7b63677573ec4
diff --git a/tests/ui/match/issue-115681.rs b/tests/ui/match/issue-115681.rs
new file mode 100644
index 00000000000..c41e808e170
--- /dev/null
+++ b/tests/ui/match/issue-115681.rs
@@ -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);
+}