[Tests] Switch a few statepoint tests to using operand bundles
authorPhilip Reames <listmail@philipreames.com>
Thu, 28 May 2020 21:17:00 +0000 (14:17 -0700)
committerPhilip Reames <listmail@philipreames.com>
Thu, 28 May 2020 21:36:05 +0000 (14:36 -0700)
We've started (D80598) the process of migrating away from the inline operand lists in statepoints to using explicit operand bundles.  Update a few tests to reflect the new preference.  More to come, these were simply the ones outside any obvious grouping.

llvm/test/Analysis/CallGraph/non-leaf-intrinsics.ll
llvm/test/Analysis/LazyCallGraph/non-leaf-intrinsics.ll
llvm/test/Transforms/InstCombine/token.ll
llvm/test/Transforms/RewriteStatepointsForGC/basics.ll
llvm/test/Transforms/Util/strip-gc-relocates.ll

index 5caecf7e2244db2b916721090c697044fd01e5a7..31c4260723ceb059057e239f4e64148410de5811 100644 (file)
@@ -10,7 +10,7 @@ define private void @f() {
 define void @calls_statepoint(i8 addrspace(1)* %arg) gc "statepoint-example" {
 entry:
   %cast = bitcast i8 addrspace(1)* %arg to i64 addrspace(1)*
-  %safepoint_token = call token (i64, i32, void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 0, i32 0, void ()* @f, i32 0, i32 0, i32 0, i32 5, i32 0, i32 0, i32 0, i32 10, i32 0, i8 addrspace(1)* %arg, i64 addrspace(1)* %cast, i8 addrspace(1)* %arg, i8 addrspace(1)* %arg)
+  %safepoint_token = call token (i64, i32, void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 0, i32 0, void ()* @f, i32 0, i32 0, i32 0, i32 0, i8 addrspace(1)* %arg, i64 addrspace(1)* %cast, i8 addrspace(1)* %arg, i8 addrspace(1)* %arg) ["deopt" (i32 0, i32 0, i32 0, i32 10, i32 0)]
   ret void
 }
 
index f5dc72ff9e97eecb4216ff7386fdc3d8508018ef..7bc585190397fec162f8c5c586a82977a719c071 100644 (file)
@@ -12,7 +12,7 @@ define void @calls_statepoint(i8 addrspace(1)* %arg) gc "statepoint-example" {
 ; CHECK-NEXT:  -> f
 entry:
   %cast = bitcast i8 addrspace(1)* %arg to i64 addrspace(1)*
-  %safepoint_token = call token (i64, i32, void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 0, i32 0, void ()* @f, i32 0, i32 0, i32 0, i32 5, i32 0, i32 0, i32 0, i32 10, i32 0, i8 addrspace(1)* %arg, i64 addrspace(1)* %cast, i8 addrspace(1)* %arg, i8 addrspace(1)* %arg)
+  %safepoint_token = call token (i64, i32, void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 0, i32 0, void ()* @f, i32 0, i32 0, i32 0, i32 0, i8 addrspace(1)* %arg, i64 addrspace(1)* %cast, i8 addrspace(1)* %arg, i8 addrspace(1)* %arg) ["deopt" (i32 0, i32 0, i32 0, i32 10, i32 0)]
   ret void
 }
 
index f96b85b4f2257f658b1199eb9984c431342333c1..a0e5bb9a536292cc8230c49c03ff86f3e0bc034f 100644 (file)
@@ -93,13 +93,13 @@ bb:
   unreachable
 
 unreachable:
-  call token (i64, i32, void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 0, i32 0, void ()* @foo, i32 0, i32 0, i32 0, i32 5, i32 0, i32 -1, i32 0, i32 0, i32 0)
+  call token (i64, i32, void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 0, i32 0, void ()* @foo, i32 0, i32 0, i32 0, i32 0) ["deopt" (i32 0, i32 -1, i32 0, i32 0, i32 0)]
   ret void
 }
 
 ; CHECK-LABEL: define void @test4(
 ; CHECK: unreachable:
-; CHECK:   call token (i64, i32, void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 0, i32 0, void ()* @foo, i32 0, i32 0, i32 0, i32 5, i32 0, i32 -1, i32 0, i32 0, i32 0)
+; CHECK:   call token (i64, i32, void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 0, i32 0, void ()* @foo, i32 0, i32 0, i32 0, i32 0) [ "deopt"(i32 0, i32 -1, i32 0, i32 0, i32 0) ]
 ; CHECK:   ret void
 
 
index 9b611079114eabd990b277efea6171bb4c20c741..6c90f529de463379560ca8b2ffbf5ffd16c75623 100644 (file)
@@ -82,7 +82,7 @@ entry:
 ; CHECK-LABEL: entry:
 ; CHECK-NEXT: gc.statepoint
 ; CHECK-NOT: %obj.relocated = call coldcc i8 addrspace(1)*
-  %0 = call token (i64, i32, void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 0, i32 0, void ()* @foo, i32 0, i32 0, i32 0, i32 5, i32 0, i32 -1, i32 0, i32 0, i32 0)
+  %0 = call token (i64, i32, void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 0, i32 0, void ()* @foo, i32 0, i32 0, i32 0, i32 0) ["deopt" (i32 0, i32 -1, i32 0, i32 0, i32 0)]
   ret i8 addrspace(1)* %obj
 }
 
index 359de7b3efe78428af7e2f3d38602f4be4cb47da..45f71117af0af1a0131ddf41f8f08ae14d3318ed 100644 (file)
@@ -17,8 +17,8 @@ entry:
 ; CHECK: gc.statepoint
 ; CHECK-NOT: gc.relocate
 ; CHECK: ret i32 addrspace(1)* %arg
-  %statepoint_token = call token (i64, i32, void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 2882400000, i32 0, void ()* @g, i32 0, i32 0, i32 0, i32 1, i32 100, i32 addrspace(1)* %arg)
-  %arg.relocated = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %statepoint_token, i32 8, i32 8) ; (%arg, %arg)
+  %statepoint_token = call token (i64, i32, void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 2882400000, i32 0, void ()* @g, i32 0, i32 0, i32 0, i32 0, i32 addrspace(1)* %arg) ["deopt" (i32 100)]
+  %arg.relocated = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %statepoint_token, i32 7, i32 7) ; (%arg, %arg)
   %arg.relocated.casted = bitcast i8 addrspace(1)* %arg.relocated to i32 addrspace(1)*
   ret i32 addrspace(1)* %arg.relocated.casted
 }
@@ -58,18 +58,18 @@ define i32 addrspace(1)* @test3(i32 addrspace(1)* %arg) gc "statepoint-example"
 ; CHECK-LABEL: unwind_dest:
 ; CHECK-NOT: gc.relocate
 entry:
-  %statepoint_token = invoke token (i64, i32, void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 2882400000, i32 0, void ()* @g, i32 0, i32 0, i32 0, i32 1, i32 100, i32 addrspace(1)* %arg)
+  %statepoint_token = invoke token (i64, i32, void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 2882400000, i32 0, void ()* @g, i32 0, i32 0, i32 0, i32 0, i32 addrspace(1)* %arg) ["deopt" (i32 100)]
           to label %normal_dest unwind label %unwind_dest
 
 normal_dest:                                      ; preds = %entry
-  %arg.relocated1 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %statepoint_token, i32 8, i32 8) ; (%arg, %arg)
+  %arg.relocated1 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %statepoint_token, i32 7, i32 7) ; (%arg, %arg)
   %arg.relocated1.casted = bitcast i8 addrspace(1)* %arg.relocated1 to i32 addrspace(1)*
   ret i32 addrspace(1)* %arg.relocated1.casted
 
 unwind_dest:                                      ; preds = %entry
   %lpad = landingpad token
           cleanup
-  %arg.relocated = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %lpad, i32 8, i32 8) ; (%arg, %arg)
+  %arg.relocated = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %lpad, i32 7, i32 7) ; (%arg, %arg)
   %arg.relocated.casted = bitcast i8 addrspace(1)* %arg.relocated to i32 addrspace(1)*
   resume token undef
 }
@@ -110,8 +110,8 @@ entry:
 ; CHECK-LABEL: test5
 ; CHECK: gc.statepoint
 ; CHECK-NOT: gc.relocate
-  %statepoint_token = call token (i64, i32, void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 2882400000, i32 0, void ()* @g, i32 0, i32 0, i32 0, i32 1, i32 100, i32 addrspace(1)* %arg)
-  %arg.relocated = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %statepoint_token, i32 8, i32 8) ; (%arg, %arg)
+  %statepoint_token = call token (i64, i32, void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 2882400000, i32 0, void ()* @g, i32 0, i32 0, i32 0, i32 0, i32 addrspace(1)* %arg) ["deopt" (i32 100)]
+  %arg.relocated = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %statepoint_token, i32 7, i32 7) ; (%arg, %arg)
   ret i8 addrspace(1)* %arg.relocated
 }