Skip to content

Commit d80ecdf

Browse files
committed
[Coroutine] Rename coro-semmetric-transfer.cpp and possibly fix test failure
Some tests start to fail after https://reviews.llvm.org/D89066. It's because the size of pointers are different on different targets. Limit the target in the command so there is no confusion. Also noticed I had typo in the test name. Adding disable-llvm-passes option to make the test more stable as well. Differential Revision: https://reviews.llvm.org/D89269
1 parent 75ae846 commit d80ecdf

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

clang/test/CodeGenCoroutines/coro-semmetric-transfer.cpp renamed to clang/test/CodeGenCoroutines/coro-symmetric-transfer.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang -std=c++14 -fcoroutines-ts -emit-llvm -S -O1 %s -o - | FileCheck %s
1+
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fcoroutines-ts -std=c++14 -O1 -emit-llvm %s -o - -disable-llvm-passes | FileCheck %s
22

33
#include "Inputs/coroutine.h"
44

@@ -48,6 +48,10 @@ detached_task foo() {
4848
co_return;
4949
}
5050

51-
// check that the lifetime of the coroutine handle used to obtain the address ended right away.
52-
// CHECK: %{{.*}} = call i8* @{{.*address.*}}(%"struct.std::experimental::coroutines_v1::coroutine_handle.0"* nonnull %{{.*}})
53-
// CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull %{{.*}})
51+
// check that the lifetime of the coroutine handle used to obtain the address is contained within single basic block.
52+
// CHECK-LABEL: final.suspend:
53+
// CHECK: %[[PTR1:.+]] = bitcast %"struct.std::experimental::coroutines_v1::coroutine_handle.0"* %[[ADDR_TMP:.+]] to i8*
54+
// CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 8, i8* %[[PTR1]])
55+
// CHECK: call i8* @{{.*address.*}}(%"struct.std::experimental::coroutines_v1::coroutine_handle.0"* %[[ADDR_TMP]])
56+
// CHECK-NEXT: %[[PTR2:.+]] = bitcast %"struct.std::experimental::coroutines_v1::coroutine_handle.0"* %[[ADDR_TMP]] to i8*
57+
// CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 8, i8* %[[PTR2]])

0 commit comments

Comments
 (0)