about summary refs log tree commit diff
path: root/tests/codegen/enum
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2025-07-10 06:57:45 +0000
committerGitHub <noreply@github.com>2025-07-10 06:57:45 +0000
commit317f59dfebb3ca584c4ab7c137208bbb23601eb2 (patch)
tree4475de7055ec501bfa7d9789536894ddafe1dc6b /tests/codegen/enum
parenta09cf9cc5a7fd4e2e19d937ef03bfeec34993a49 (diff)
parent17b240e04f8d14e5563b6afb2ed3b842f87d1c78 (diff)
downloadrust-317f59dfebb3ca584c4ab7c137208bbb23601eb2.tar.gz
rust-317f59dfebb3ca584c4ab7c137208bbb23601eb2.zip
Merge pull request #4458 from rust-lang/rustup-2025-07-10
Automatic Rustup
Diffstat (limited to 'tests/codegen/enum')
-rw-r--r--tests/codegen/enum/enum-aggregate.rs15
-rw-r--r--tests/codegen/enum/enum-match.rs2
2 files changed, 7 insertions, 10 deletions
diff --git a/tests/codegen/enum/enum-aggregate.rs b/tests/codegen/enum/enum-aggregate.rs
index b6a9b8dd814..0161e5f3fa1 100644
--- a/tests/codegen/enum/enum-aggregate.rs
+++ b/tests/codegen/enum/enum-aggregate.rs
@@ -112,17 +112,14 @@ fn make_uninhabited_err_indirectly(n: Never) -> Result<u32, Never> {
 
 #[no_mangle]
 fn make_fully_uninhabited_result(v: u32, n: Never) -> Result<(u32, Never), (Never, u32)> {
-    // We don't try to do this in SSA form since the whole type is uninhabited.
+    // Actually reaching this would be UB, so we don't actually build a result.
 
     // CHECK-LABEL: { i32, i32 } @make_fully_uninhabited_result(i32 %v)
-    // CHECK: %[[ALLOC_V:.+]] = alloca [4 x i8]
-    // CHECK: %[[RET:.+]] = alloca [8 x i8]
-    // CHECK: store i32 %v, ptr %[[ALLOC_V]]
-    // CHECK: %[[TEMP_V:.+]] = load i32, ptr %[[ALLOC_V]]
-    // CHECK: %[[INNER:.+]] = getelementptr inbounds i8, ptr %[[RET]]
-    // CHECK: store i32 %[[TEMP_V]], ptr %[[INNER]]
-    // CHECK: call void @llvm.trap()
-    // CHECK: unreachable
+    // CHECK-NEXT: start:
+    // CHECK-NEXT: call void @llvm.trap()
+    // CHECK-NEXT: call void @llvm.trap()
+    // CHECK-NEXT: call void @llvm.trap()
+    // CHECK-NEXT: unreachable
     Ok((v, n))
 }
 
diff --git a/tests/codegen/enum/enum-match.rs b/tests/codegen/enum/enum-match.rs
index 6da6ad1f078..98635008d06 100644
--- a/tests/codegen/enum/enum-match.rs
+++ b/tests/codegen/enum/enum-match.rs
@@ -98,7 +98,7 @@ pub enum Enum2 {
     E,
 }
 
-// CHECK-LABEL: define{{( dso_local)?}} noundef{{( range\(i8 [0-9]+, [0-9]+\))?}} i8 @match2(i8{{.+}}%0)
+// CHECK-LABEL: define{{( dso_local)?}} noundef{{( range\(i8 [0-9]+, -?[0-9]+\))?}} i8 @match2(i8{{.+}}%0)
 // CHECK-NEXT: start:
 // CHECK-NEXT: %[[REL_VAR:.+]] = add i8 %0, 2
 // CHECK-NEXT: %[[REL_VAR_WIDE:.+]] = zext i8 %[[REL_VAR]] to i64