mirror of
https://github.com/openharmony/third_party_rust_rust.git
synced 2026-07-18 17:34:40 -04:00
Auto merge of #114726 - DianQK:beta, r=cuviper
[beta] Update LLVM to resolve a miscompilation found in 114312. Related issue: #114312 . After the master updates the LLVM, we will add the same test cases. In the meantime, close the issue.
This commit is contained in:
+1
-1
Submodule src/llvm-project updated: 06248fa7f3...c9bca8a6cb
@@ -0,0 +1,27 @@
|
||||
// compile-flags: -O
|
||||
// min-system-llvm-version: 17
|
||||
// only-x86_64-unknown-linux-gnu
|
||||
|
||||
// We want to check that this function does not mis-optimize to loop jumping.
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
#[repr(C)]
|
||||
pub enum Expr {
|
||||
Sum,
|
||||
// must have more than usize data
|
||||
Sub(usize, u8),
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn issue_114312(expr: Expr) {
|
||||
// CHECK-LABEL: @issue_114312(
|
||||
// CHECK-NOT: readonly
|
||||
// CHECK-SAME: byval
|
||||
// CHECK-NEXT: start:
|
||||
// CHECK-NEXT: ret void
|
||||
match expr {
|
||||
Expr::Sum => {}
|
||||
Expr::Sub(_, _) => issue_114312(Expr::Sum),
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user