diff options
| author | Eduard-Mihai Burtescu <eddyb@lyken.rs> | 2021-05-06 17:37:19 +0300 |
|---|---|---|
| committer | Eduard-Mihai Burtescu <eddyb@lyken.rs> | 2021-05-17 00:04:09 +0300 |
| commit | 402e9efc56fb21464a0cddf9aeab57c7512cf71d (patch) | |
| tree | 3a5b0eb4df206123dcfdbd1564cda65a2cda014d /src/test/codegen | |
| parent | 7dc9ff5c629753b6930ecfe9a0446538b8e25fb7 (diff) | |
rustc_codegen_ssa: only create backend `BasicBlock`s as-needed.
Diffstat (limited to 'src/test/codegen')
| -rw-r--r-- | src/test/codegen/drop.rs | 9 | ||||
| -rw-r--r-- | src/test/codegen/match.rs | 6 |
2 files changed, 9 insertions, 6 deletions
diff --git a/src/test/codegen/drop.rs b/src/test/codegen/drop.rs index b35d5c83552..543b81b0b62 100644 --- a/src/test/codegen/drop.rs +++ b/src/test/codegen/drop.rs @@ -23,13 +23,16 @@ pub fn droppy() { // FIXME(eddyb) the `void @` forces a match on the instruction, instead of the // comment, that's `; call core::ptr::drop_in_place::<drop::SomeUniqueName>` // for the `v0` mangling, should switch to matching on that once `legacy` is gone. -// CHECK-NOT: call void @{{.*}}drop_in_place{{.*}}SomeUniqueName -// CHECK: invoke void @{{.*}}drop_in_place{{.*}}SomeUniqueName -// CHECK: invoke void @{{.*}}drop_in_place{{.*}}SomeUniqueName // CHECK-NOT: invoke void @{{.*}}drop_in_place{{.*}}SomeUniqueName // CHECK: call void @{{.*}}drop_in_place{{.*}}SomeUniqueName // CHECK: call void @{{.*}}drop_in_place{{.*}}SomeUniqueName +// CHECK-NOT: call void @{{.*}}drop_in_place{{.*}}SomeUniqueName +// CHECK: invoke void @{{.*}}drop_in_place{{.*}}SomeUniqueName +// CHECK-NOT: invoke void @{{.*}}drop_in_place{{.*}}SomeUniqueName // CHECK: call void @{{.*}}drop_in_place{{.*}}SomeUniqueName +// CHECK-NOT: call void @{{.*}}drop_in_place{{.*}}SomeUniqueName +// CHECK: invoke void @{{.*}}drop_in_place{{.*}}SomeUniqueName +// CHECK-NOT: invoke void @{{.*}}drop_in_place{{.*}}SomeUniqueName // CHECK: call void @{{.*}}drop_in_place{{.*}}SomeUniqueName // CHECK-NOT: {{(call|invoke) void @.*}}drop_in_place{{.*}}SomeUniqueName // The next line checks for the } that ends the function definition diff --git a/src/test/codegen/match.rs b/src/test/codegen/match.rs index b5ee5ba2394..d0c0202052e 100644 --- a/src/test/codegen/match.rs +++ b/src/test/codegen/match.rs @@ -14,14 +14,14 @@ pub fn exhaustive_match(e: E) -> u8 { // CHECK-NEXT: i[[TY:[0-9]+]] [[DISCR:[0-9]+]], label %[[A:[a-zA-Z0-9_]+]] // CHECK-NEXT: i[[TY:[0-9]+]] [[DISCR:[0-9]+]], label %[[B:[a-zA-Z0-9_]+]] // CHECK-NEXT: ] -// CHECK: [[B]]: -// CHECK-NEXT: store i8 1, i8* %1, align 1 -// CHECK-NEXT: br label %[[EXIT:[a-zA-Z0-9_]+]] // CHECK: [[OTHERWISE]]: // CHECK-NEXT: unreachable // CHECK: [[A]]: // CHECK-NEXT: store i8 0, i8* %1, align 1 // CHECK-NEXT: br label %[[EXIT:[a-zA-Z0-9_]+]] +// CHECK: [[B]]: +// CHECK-NEXT: store i8 1, i8* %1, align 1 +// CHECK-NEXT: br label %[[EXIT:[a-zA-Z0-9_]+]] match e { E::A => 0, E::B => 1, |
