diff options
Diffstat (limited to 'tests/codegen/enum')
| -rw-r--r-- | tests/codegen/enum/enum-aggregate.rs | 15 | ||||
| -rw-r--r-- | tests/codegen/enum/enum-match.rs | 2 |
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 |
