[clang] 9ffd492 - [NFC][Coroutines] Fix two tests by removing hardcoded SSA value.

Yuanfang Chen via cfe-commits cfe-commits at lists.llvm.org
Sun May 9 19:06:49 PDT 2021


Author: Yuanfang Chen
Date: 2021-05-09T19:06:16-07:00
New Revision: 9ffd4924e8e1a056760256c4cd5ffde38ccdf010

URL: https://github.com/llvm/llvm-project/commit/9ffd4924e8e1a056760256c4cd5ffde38ccdf010
DIFF: https://github.com/llvm/llvm-project/commit/9ffd4924e8e1a056760256c4cd5ffde38ccdf010.diff

LOG: [NFC][Coroutines] Fix two tests by removing hardcoded SSA value.

Added: 
    

Modified: 
    clang/test/CodeGenCoroutines/coro-dest-slot.cpp
    clang/test/CodeGenCoroutines/coro-params.cpp

Removed: 
    


################################################################################
diff  --git a/clang/test/CodeGenCoroutines/coro-dest-slot.cpp b/clang/test/CodeGenCoroutines/coro-dest-slot.cpp
index 762fa1aede3c8..c7129df115261 100644
--- a/clang/test/CodeGenCoroutines/coro-dest-slot.cpp
+++ b/clang/test/CodeGenCoroutines/coro-dest-slot.cpp
@@ -25,7 +25,7 @@ extern "C" coro f(int) { co_return; }
 // CHECK: %[[CLEANUP_DEST0:.+]] = phi i32 [ 0, %[[INIT_READY]] ], [ 2, %[[INIT_CLEANUP]] ]
 
 // CHECK: %[[FINAL_SUSPEND:.+]] = call i8 @llvm.coro.suspend(
-// CHECK-NEXT: switch i8 %29, label %coro.ret [
+// CHECK-NEXT: switch i8 %{{.*}}, label %coro.ret [
 // CHECK-NEXT:   i8 0, label %[[FINAL_READY:.+]]
 // CHECK-NEXT:   i8 1, label %[[FINAL_CLEANUP:.+]]
 // CHECK-NEXT: ]

diff  --git a/clang/test/CodeGenCoroutines/coro-params.cpp b/clang/test/CodeGenCoroutines/coro-params.cpp
index 12332cd793c4f..28753d524df28 100644
--- a/clang/test/CodeGenCoroutines/coro-params.cpp
+++ b/clang/test/CodeGenCoroutines/coro-params.cpp
@@ -78,7 +78,7 @@ void f(int val, MoveOnly moParam, MoveAndCopy mcParam) {
   // CHECK-NEXT: invoke void @_ZNSt12experimental16coroutine_traitsIJvi8MoveOnly11MoveAndCopyEE12promise_typeC1Ev(
 
   // CHECK: call void @_ZN14suspend_always12await_resumeEv(
-  // CHECK: %[[IntParam:.+]] = load i32, i32* %val1
+  // CHECK: %[[IntParam:.+]] = load i32, i32* %{{.*}}
   // CHECK: %[[MoGep:.+]] = getelementptr inbounds %struct.MoveOnly, %struct.MoveOnly* %[[MoCopy]], i32 0, i32 0
   // CHECK: %[[MoVal:.+]] = load i32, i32* %[[MoGep]]
   // CHECK: %[[McGep:.+]] =  getelementptr inbounds %struct.MoveAndCopy, %struct.MoveAndCopy* %[[McCopy]], i32 0, i32 0
@@ -121,7 +121,7 @@ void dependent_params(T x, U, U y) {
   // CHECK-NEXT: bitcast %struct.B* %[[unnamed_copy]] to i8*
   // CHECK-NEXT: call void @llvm.lifetime.start.p0i8(
   // CHECK-NEXT: call void @_ZN1BC1EOS_(%struct.B* {{[^,]*}} %[[unnamed_copy]], %struct.B* nonnull align 4 dereferenceable(512) %0)
-  // CHECK-NEXT: %10 = bitcast %struct.B* %[[y_copy]] to i8*
+  // CHECK-NEXT: bitcast %struct.B* %[[y_copy]] to i8*
   // CHECK-NEXT: call void @llvm.lifetime.start.p0i8(
   // CHECK-NEXT: call void @_ZN1BC1EOS_(%struct.B* {{[^,]*}} %[[y_copy]], %struct.B* nonnull align 4 dereferenceable(512) %y)
   // CHECK-NEXT: bitcast %"struct.std::experimental::coroutine_traits<void, A, B, B>::promise_type"* %__promise to i8*


        


More information about the cfe-commits mailing list