Skip to content

Commit c8b944c

Browse files
committed
[Coroutines] reduced the IR tests a bit more by reducing unneccesary declarations
1 parent ffe4587 commit c8b944c

File tree

5 files changed

+0
-154
lines changed

5 files changed

+0
-154
lines changed

llvm/test/Transforms/Coroutines/pr148035_inst_does_not_dominate.ll

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
; crashed before fix because of the validation mismatch of Instruction does not dominate all uses!
33
; RUN: opt < %s -passes='coro-split' -S 2>&1 | FileCheck %s --implicit-check-not="Instruction does not dominate all uses!"
44
; RUN: opt < %s -passes='default<Os>,coro-split' -S 2>&1 | FileCheck %s --implicit-check-not="Instruction does not dominate all uses!"
5-
target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
6-
target triple = "x86_64-pc-windows-msvc19.38.33135"
75

86
; Function Attrs: presplitcoroutine
97
define i8 @"?resuming_on_new_thread@@YA?AUtask@@Vunique_ptr@@@Z"(ptr %0) #0 personality ptr null {
@@ -40,36 +38,7 @@ common.ret: ; preds = %12, %10, %2
4038
cleanupret from %15 unwind to caller
4139
}
4240

43-
; Function Attrs: nounwind memory(none)
44-
declare void @llvm.seh.scope.begin() #1
45-
46-
; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: read)
47-
declare token @llvm.coro.id(i32, ptr readnone, ptr nocapture readonly, ptr) #2
48-
49-
; Function Attrs: nounwind
50-
declare ptr @llvm.coro.begin(token, ptr writeonly) #3
51-
52-
; Function Attrs: nomerge nounwind
53-
declare token @llvm.coro.save(ptr) #4
54-
55-
; Function Attrs: nounwind
56-
declare i8 @llvm.coro.suspend(token, i1) #3
57-
58-
; Function Attrs: nounwind willreturn memory(write)
59-
declare void @llvm.seh.try.begin() #5
60-
61-
; Function Attrs: nounwind memory(none)
62-
declare void @llvm.seh.scope.end() #1
63-
64-
; uselistorder directives
65-
uselistorder ptr null, { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 }
66-
6741
attributes #0 = { presplitcoroutine }
68-
attributes #1 = { nounwind memory(none) }
69-
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: read) }
70-
attributes #3 = { nounwind }
71-
attributes #4 = { nomerge nounwind }
72-
attributes #5 = { nounwind willreturn memory(write) }
7342

7443
!llvm.module.flags = !{!0}
7544

llvm/test/Transforms/Coroutines/pr148035_inst_does_not_dominate_2.ll

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
; crashed before fix because of the validation mismatch of Instruction does not dominate all uses!
33
; RUN: opt < %s -passes='coro-split' -S 2>&1 | FileCheck %s --implicit-check-not="Instruction does not dominate all uses!"
44
; RUN: opt < %s -passes='default<Os>,coro-split' -S 2>&1 | FileCheck %s --implicit-check-not="Instruction does not dominate all uses!"
5-
target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
6-
target triple = "x86_64-pc-windows-msvc19.38.33135"
75

86
; Function Attrs: presplitcoroutine
97
define i8 @"?resuming_on_new_thread@@YA?AUtask@@Vunique_ptr@@@Z"(ptr %0) #0 personality ptr null {
@@ -40,36 +38,7 @@ common.ret: ; preds = %12, %10, %2
4038
br label %common.ret
4139
}
4240

43-
; Function Attrs: nounwind memory(none)
44-
declare void @llvm.seh.scope.begin() #1
45-
46-
; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: read)
47-
declare token @llvm.coro.id(i32, ptr readnone, ptr nocapture readonly, ptr) #2
48-
49-
; Function Attrs: nounwind
50-
declare ptr @llvm.coro.begin(token, ptr writeonly) #3
51-
52-
; Function Attrs: nomerge nounwind
53-
declare token @llvm.coro.save(ptr) #4
54-
55-
; Function Attrs: nounwind
56-
declare i8 @llvm.coro.suspend(token, i1) #3
57-
58-
; Function Attrs: nounwind willreturn memory(write)
59-
declare void @llvm.seh.try.begin() #5
60-
61-
; Function Attrs: nounwind memory(none)
62-
declare void @llvm.seh.scope.end() #1
63-
64-
; uselistorder directives
65-
uselistorder ptr null, { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 }
66-
6741
attributes #0 = { presplitcoroutine }
68-
attributes #1 = { nounwind memory(none) }
69-
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: read) }
70-
attributes #3 = { nounwind }
71-
attributes #4 = { nomerge nounwind }
72-
attributes #5 = { nounwind willreturn memory(write) }
7342

7443
!llvm.module.flags = !{!0}
7544

llvm/test/Transforms/Coroutines/pr148035_not_implemented_terminator_for_pred.ll

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
; crashed after first phase of fix because the terminator cleanupret was not implemented on predecessor fixer at the time
33
; RUN: opt < %s -passes='coro-split' -S
44
; RUN: opt < %s -passes='default<Os>,coro-split' -S
5-
target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
6-
target triple = "x86_64-pc-windows-msvc19.38.33135"
75

86
; Function Attrs: presplitcoroutine
97
define i8 @"?resuming_on_new_thread@@YA?AUtask@@V?$unique_ptr@HU?$default_delete@H@std@@@std@@0@Z"(ptr %0) #0 personality ptr null {
@@ -46,33 +44,7 @@ define i8 @"?resuming_on_new_thread@@YA?AUtask@@V?$unique_ptr@HU?$default_delete
4644
cleanupret from %18 unwind to caller
4745
}
4846

49-
; Function Attrs: nounwind memory(none)
50-
declare void @llvm.seh.scope.begin() #1
51-
52-
; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: read)
53-
declare token @llvm.coro.id(i32, ptr readnone, ptr readonly captures(none), ptr) #2
54-
55-
; Function Attrs: nounwind
56-
declare ptr @llvm.coro.begin(token, ptr writeonly) #3
57-
58-
; Function Attrs: nomerge nounwind
59-
declare token @llvm.coro.save(ptr) #4
60-
61-
; Function Attrs: nounwind
62-
declare i8 @llvm.coro.suspend(token, i1) #3
63-
64-
; Function Attrs: nounwind willreturn memory(write)
65-
declare void @llvm.seh.try.begin() #5
66-
67-
; Function Attrs: nounwind memory(none)
68-
declare void @llvm.seh.scope.end() #1
69-
7047
attributes #0 = { presplitcoroutine }
71-
attributes #1 = { nounwind memory(none) }
72-
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: read) }
73-
attributes #3 = { nounwind }
74-
attributes #4 = { nomerge nounwind }
75-
attributes #5 = { nounwind willreturn memory(write) }
7648

7749
!llvm.module.flags = !{!0}
7850

llvm/test/Transforms/Coroutines/pr148035_unwind_edges_not_having_same_dest.ll

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
; crashed before fix because of the validation mismatch of Unwind edges out of a funclet pad must have the same unwind dest
33
; RUN: opt < %s -passes='coro-split' -S 2>&1 | FileCheck %s --implicit-check-not="Unwind edges out of a funclet pad must have the same unwind dest"
44

5-
target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
6-
target triple = "x86_64-pc-windows-msvc19.38.33135"
7-
85
; Function Attrs: presplitcoroutine
96
define i8 @"?resuming_on_new_thread@@YA?AUtask@@AEAVjthread@std@@@Z"() #0 personality ptr null {
107
%1 = call token @llvm.coro.id(i32 0, ptr null, ptr null, ptr null)
@@ -38,36 +35,7 @@ common.ret: ; preds = %13, %7, %0
3835
br label %common.ret
3936
}
4037

41-
; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: read)
42-
declare token @llvm.coro.id(i32, ptr readnone, ptr nocapture readonly, ptr) #1
43-
44-
; Function Attrs: nounwind
45-
declare ptr @llvm.coro.begin(token, ptr writeonly) #2
46-
47-
; Function Attrs: nomerge nounwind
48-
declare token @llvm.coro.save(ptr) #3
49-
50-
; Function Attrs: nounwind
51-
declare i8 @llvm.coro.suspend(token, i1) #2
52-
53-
; Function Attrs: nounwind willreturn memory(write)
54-
declare void @llvm.seh.try.begin() #4
55-
56-
; Function Attrs: nounwind memory(none)
57-
declare void @llvm.seh.scope.end() #5
58-
59-
; Function Attrs: nounwind
60-
declare i1 @llvm.coro.end(ptr, i1, token) #2
61-
62-
; uselistorder directives
63-
uselistorder ptr null, { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0 }
64-
6538
attributes #0 = { presplitcoroutine }
66-
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: read) }
67-
attributes #2 = { nounwind }
68-
attributes #3 = { nomerge nounwind }
69-
attributes #4 = { nounwind willreturn memory(write) }
70-
attributes #5 = { nounwind memory(none) }
7139

7240
!llvm.module.flags = !{!0}
7341

llvm/test/Transforms/Coroutines/pr148035_unwind_edges_not_having_same_dest_2.ll

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
; crashed before fix because of the validation mismatch of Unwind edges out of a funclet pad must have the same unwind dest
33
; RUN: opt < %s -passes='coro-split' -S 2>&1 | FileCheck %s --implicit-check-not="Unwind edges out of a funclet pad must have the same unwind dest"
44

5-
target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
6-
target triple = "x86_64-pc-windows-msvc19.38.33135"
7-
85
; Function Attrs: presplitcoroutine
96
define i1 @"?resuming_on_new_thread@@YA?AUtask@@AEAVjthread@std@@@Z"() #0 personality ptr null {
107
%1 = call token @llvm.coro.id(i32 0, ptr null, ptr null, ptr null)
@@ -39,36 +36,7 @@ common.ret: ; preds = %11, %13, %7, %0
3936
br label %common.ret
4037
}
4138

42-
; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: read)
43-
declare token @llvm.coro.id(i32, ptr readnone, ptr nocapture readonly, ptr) #1
44-
45-
; Function Attrs: nounwind
46-
declare ptr @llvm.coro.begin(token, ptr writeonly) #2
47-
48-
; Function Attrs: nomerge nounwind
49-
declare token @llvm.coro.save(ptr) #3
50-
51-
; Function Attrs: nounwind
52-
declare i8 @llvm.coro.suspend(token, i1) #2
53-
54-
; Function Attrs: nounwind willreturn memory(write)
55-
declare void @llvm.seh.try.begin() #4
56-
57-
; Function Attrs: nounwind memory(none)
58-
declare void @llvm.seh.scope.end() #5
59-
60-
; Function Attrs: nounwind
61-
declare i1 @llvm.coro.end(ptr, i1, token) #2
62-
63-
; uselistorder directives
64-
uselistorder ptr null, { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0 }
65-
6639
attributes #0 = { presplitcoroutine }
67-
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: read) }
68-
attributes #2 = { nounwind }
69-
attributes #3 = { nomerge nounwind }
70-
attributes #4 = { nounwind willreturn memory(write) }
71-
attributes #5 = { nounwind memory(none) }
7240

7341
!llvm.module.flags = !{!0}
7442

0 commit comments

Comments
 (0)