We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 62ca87f commit c12c084Copy full SHA for c12c084
tests/codegen/issues/issue-114312.rs
@@ -0,0 +1,27 @@
1
+// compile-flags: -O
2
+// min-llvm-version: 17
3
+// only-x86_64-unknown-linux-gnu
4
+
5
+// We want to check that this function does not mis-optimize to loop jumping.
6
7
+#![crate_type = "lib"]
8
9
+#[repr(C)]
10
+pub enum Expr {
11
+ Sum,
12
+ // must have more than usize data
13
+ Sub(usize, u8),
14
+}
15
16
+#[no_mangle]
17
+pub extern "C" fn issue_114312(expr: Expr) {
18
+ // CHECK-LABEL: @issue_114312(
19
+ // CHECK-NOT: readonly
20
+ // CHECK-SAME: byval
21
+ // CHECK-NEXT: start:
22
+ // CHECK-NEXT: ret void
23
+ match expr {
24
+ Expr::Sum => {}
25
+ Expr::Sub(_, _) => issue_114312(Expr::Sum),
26
+ }
27
0 commit comments