1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 02:33:06 +01:00

[Coroutines] Remove all legacy test command

With new pm becomes the default, the old-style test command becomes exactly the same as the new test command, i.e. the two commands are now redundant.
We should just delete the old command. (unless someone wants to add enable-new-pm=0 to all old commands.

Differential Revision: https://reviews.llvm.org/D104895
This commit is contained in:
Xun Li 2021-06-25 09:46:55 -07:00
parent 4d07cbe876
commit 804aeeb5ec
82 changed files with 18 additions and 119 deletions

View File

@ -1,6 +1,5 @@
; Need to move users of allocas that were moved into the coroutine frame after
; coro.begin.
; RUN: opt < %s -coro-split -S | FileCheck %s
; RUN: opt < %s -passes=coro-split -S | FileCheck %s
define nonnull i8* @f(i32 %n) "coroutine.presplit"="1" {

View File

@ -1,6 +1,5 @@
; Check that we can handle the case when both alloc function and
; the user body consume the same argument.
; RUN: opt < %s -coro-split -S | FileCheck %s
; RUN: opt < %s -passes=coro-split -S | FileCheck %s
; using copy of this (as it would happen under -O0)

View File

@ -1,6 +1,5 @@
; Check that we can handle the case when both alloc function and
; the user body consume the same argument.
; RUN: opt < %s -coro-split -S | FileCheck %s
; RUN: opt < %s -passes=coro-split -S | FileCheck %s
; using this directly (as it would happen under -O2)

View File

@ -1,6 +1,5 @@
; Tests that CoroSplit can succesfully determine allocas should live on the frame
; if their aliases are used across suspension points through PHINode.
; RUN: opt < %s -coro-split -S | FileCheck %s
; RUN: opt < %s -passes=coro-split -S | FileCheck %s
define i8* @f(i1 %n) "coroutine.presplit"="1" {

View File

@ -1,6 +1,5 @@
; Tests that if an alloca is escaped through storing the address,
; the alloac will be put on the frame.
; RUN: opt < %s -coro-split -S | FileCheck %s
; RUN: opt < %s -passes=coro-split -S | FileCheck %s
define i8* @f() "coroutine.presplit"="1" {

View File

@ -1,5 +1,4 @@
; Tests that allocas escaped through function calls will live on the frame.
; RUN: opt < %s -coro-split -S | FileCheck %s
; RUN: opt < %s -passes=coro-split -S | FileCheck %s
define i8* @f() "coroutine.presplit"="1" {

View File

@ -1,6 +1,5 @@
; Tests that CoroSplit can succesfully determine allocas should live on the frame
; if their aliases are used across suspension points through PHINode.
; RUN: opt < %s -coro-split -S | FileCheck %s
; RUN: opt < %s -passes=coro-split -S | FileCheck %s
define i8* @f(i1 %n) "coroutine.presplit"="1" {

View File

@ -1,6 +1,5 @@
; Tests that allocas after coro.begin are properly that do not need to
; live on the frame are properly moved to the .resume function.
; RUN: opt < %s -coro-split -S | FileCheck %s
; RUN: opt < %s -passes=coro-split -S | FileCheck %s
define i8* @f() "coroutine.presplit"="1" {

View File

@ -1,6 +1,5 @@
; Test that in some simple cases allocas will not live on the frame even
; though their pointers are stored.
; RUN: opt < %s -coro-split -S | FileCheck %s
; RUN: opt < %s -passes=coro-split -S | FileCheck %s
%handle = type { i8* }

View File

@ -1,6 +1,5 @@
; Tests that CoroSplit can succesfully determine allocas should live on the frame
; if their aliases are used across suspension points through PHINode.
; RUN: opt < %s -coro-split -S | FileCheck %s
; RUN: opt < %s -passes=coro-split -S | FileCheck %s
define i8* @f(i1 %n) "coroutine.presplit"="1" {

View File

@ -1,4 +1,3 @@
; RUN: opt < %s -coro-split -S | FileCheck %s
; RUN: opt < %s -passes=coro-split -S | FileCheck %s
%"struct.std::coroutine_handle" = type { i8* }

View File

@ -1,4 +1,3 @@
; RUN: opt < %s -enable-coroutines -O2 -S | FileCheck --check-prefixes=CHECK %s
; RUN: opt < %s -enable-coroutines -passes='default<O2>' -S | FileCheck --check-prefixes=CHECK %s
target datalayout = "p:64:64:64"

View File

@ -1,4 +1,3 @@
; RUN: opt < %s -enable-coroutines -O2 -S | FileCheck --check-prefixes=CHECK %s
; RUN: opt < %s -enable-coroutines -passes='default<O2>' -S | FileCheck --check-prefixes=CHECK %s
target datalayout = "p:64:64:64"

View File

@ -1,6 +1,5 @@
; Tests the PHI nodes in cleanuppads for catchswitch instructions are correctly
; split up.
; RUN: opt < %s -coro-split -S | FileCheck %s
; RUN: opt < %s -passes=coro-split -S | FileCheck %s
declare i32 @__CxxFrameHandler3(...)

View File

@ -1,5 +1,4 @@
; Verifies that we can insert the spill for a PHI preceding the catchswitch
; RUN: opt < %s -coro-split -S | FileCheck %s
; RUN: opt < %s -passes=coro-split -S | FileCheck %s
target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"

View File

@ -1,5 +1,4 @@
; Make sure that all library helper coro intrinsics are lowered.
; RUN: opt < %s -O0 -enable-coroutines -S | FileCheck %s
; RUN: opt < %s -passes='default<O0>' -enable-coroutines -S | FileCheck %s
; CHECK-LABEL: @uses_library_support_coro_intrinsics(

View File

@ -1,4 +1,4 @@
; RUN: opt < %s -coro-early -coro-split -reuse-storage-in-coroutine-frame -coro-split -sroa -S | FileCheck %s
; RUN: opt < %s -passes='function(coro-early),cgscc(coro-split,coro-split),function(sroa)' --reuse-storage-in-coroutine-frame -S | FileCheck %s
; Checks whether the dbg.declare for `__promise` remains valid under O2.

View File

@ -1,4 +1,4 @@
; RUN: opt < %s -coro-early -coro-split -coro-split -S | FileCheck %s
; RUN: opt < %s -passes='function(coro-early),cgscc(coro-split,coro-split)' -S | FileCheck %s
; Checks whether the dbg.declare for `__coro_frame` are created.

View File

@ -1,5 +1,5 @@
; Tests whether resume function would remain dbg.value infomation if corresponding values are not used in the frame.
; RUN: opt < %s -coro-early -coro-split -coro-split -S | FileCheck %s
; RUN: opt < %s -passes='function(coro-early),cgscc(coro-split,coro-split)' -S | FileCheck %s
;
; This file is based on coro-debug-frame-variable.ll.
; CHECK: define internal fastcc void @f.resume(%f.Frame* noalias nonnull align 16 dereferenceable(80) %FramePtr) !dbg ![[RESUME_FN_DBG_NUM:[0-9]+]]

View File

@ -1,5 +1,5 @@
; Tests whether resume function would remain dbg.value infomation.
; RUN: opt < %s -coro-early -coro-split -coro-split -S | FileCheck %s
; RUN: opt < %s -passes='function(coro-early),cgscc(coro-split,coro-split)' -S | FileCheck %s
;
; This file is based on coro-debug-frame-variable.ll.
; CHECK: define internal fastcc void @f.resume(%f.Frame* noalias nonnull align 16 dereferenceable(80) %FramePtr) !dbg ![[RESUME_FN_DBG_NUM:[0-9]+]]

View File

@ -1,4 +1,3 @@
; RUN: opt < %s -O0 -enable-coroutines -S | FileCheck %s
; RUN: opt < %s -passes='default<O0>' -enable-coroutines -S | FileCheck %s
; Define a function 'f' that resembles the Clang frontend's output for the

View File

@ -1,5 +1,4 @@
; Tests that debug information is sane after coro-split
; RUN: opt < %s -coro-split -S | FileCheck %s
; RUN: opt < %s -passes=coro-split -S | FileCheck %s
source_filename = "simple-repro.c"

View File

@ -1,6 +1,5 @@
; Tests that CoroEarly pass correctly lowers coro.resume, coro.destroy
; and other intrinsics managed by this pass.
; RUN: opt < %s -S -coro-early | FileCheck %s
; RUN: opt < %s -S -passes=coro-early | FileCheck %s
; CHECK: %NoopCoro.Frame = type { void (%NoopCoro.Frame*)*, void (%NoopCoro.Frame*)* }

View File

@ -1,5 +1,4 @@
; Check that we can handle edge splits leading into a landingpad
; RUN: opt < %s -coro-split -S | FileCheck %s
; RUN: opt < %s -passes=coro-split -S | FileCheck %s
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"

View File

@ -1,5 +1,4 @@
; Check that we can handle edge splits leading into a landingpad
; RUN: opt < %s -coro-split -S | FileCheck %s
; RUN: opt < %s -passes=coro-split -S | FileCheck %s
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"

View File

@ -1,5 +1,4 @@
; Check that we can handle edge splits leading into a landingpad
; RUN: opt < %s -coro-split -S | FileCheck %s
; RUN: opt < %s -passes=coro-split -S | FileCheck %s
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"

View File

@ -2,8 +2,6 @@
; Only run with new pass manager since old pass manager's alias analysis isn't
; powerful enough to tell that the tailcall's arguments don't alias the frame.
;
; RUN: opt < %s -coro-elide -S | FileCheck %s
; RUN: opt < %s -disable-basic-aa -coro-elide -S | FileCheck %s -check-prefix=NOAA
; RUN: opt < %s -passes='coro-elide' -S | FileCheck %s
; RUN: opt < %s -aa-pipeline= -passes='coro-elide' -S | FileCheck %s -check-prefix=NOAA

View File

@ -1,6 +1,5 @@
; Tests that the coro.destroy and coro.resume are devirtualized where possible,
; SCC pipeline restarts and inlines the direct calls.
; RUN: opt < %s -S -inline -coro-elide -dce -enable-new-pm=0 | FileCheck %s
; RUN: opt < %s -S \
; RUN: -passes='cgscc(repeat<2>(inline,function(coro-elide,dce)))' \
; RUN: | FileCheck %s

View File

@ -1,5 +1,4 @@
; Check that we can handle spills of array allocas
; RUN: opt < %s -coro-split -S | FileCheck %s
; RUN: opt < %s -passes=coro-split -S | FileCheck %s
declare void @consume.double.ptr(double*)

View File

@ -1,5 +1,4 @@
; Check that we can handle spills of array allocas
; RUN: opt < %s -coro-split -reuse-storage-in-coroutine-frame -S | FileCheck %s
; RUN: opt < %s -passes=coro-split -reuse-storage-in-coroutine-frame -S | FileCheck %s
%struct.big_structure = type { [500 x i8] }
@ -76,4 +75,4 @@ declare double @print(double)
declare void @free(i8*)
declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture)
declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture)
declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture)

View File

@ -1,6 +1,5 @@
; Tests that variables in a Corotuine whose lifetime range is not overlapping each other
; re-use the same slot in Coroutine frame.
; RUN: opt < %s -coro-split -reuse-storage-in-coroutine-frame -S | FileCheck %s
; RUN: opt < %s -passes=coro-split -reuse-storage-in-coroutine-frame -S | FileCheck %s
%"struct.task::promise_type" = type { i8 }
%struct.awaitable = type { i8 }

View File

@ -1,6 +1,5 @@
; Tests that variables of different type in a Corotuine whose lifetime range is not overlapping each other
; re-use the same slot in Coroutine frame.
; RUN: opt < %s -coro-split -reuse-storage-in-coroutine-frame -S | FileCheck %s
; RUN: opt < %s -passes=coro-split -reuse-storage-in-coroutine-frame -S | FileCheck %s
%"struct.task::promise_type" = type { i8 }
%struct.awaitable = type { i8 }

View File

@ -1,5 +1,4 @@
; Check that we should not reuse alloca sotrage in O0.
; RUN: opt < %s -coro-split -S | FileCheck %s
; RUN: opt < %s -passes=coro-split -S | FileCheck %s
%struct.big_structure = type { [500 x i8] }
@ -76,4 +75,4 @@ declare double @print(double)
declare void @free(i8*)
declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture)
declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture)
declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture)

View File

@ -1,6 +1,5 @@
; Tests that variables of different type with incompatible alignment in a Corotuine whose lifetime
; range is not overlapping each other should not re-use the same slot in Coroutine frame.
; RUN: opt < %s -coro-split -reuse-storage-in-coroutine-frame -S | FileCheck %s
; RUN: opt < %s -passes=coro-split -reuse-storage-in-coroutine-frame -S | FileCheck %s
%"struct.task::promise_type" = type { i8 }
%struct.awaitable = type { i8 }

View File

@ -1,6 +1,5 @@
; Tests that variables of different type with incompatible alignment in a Corotuine whose
; lifetime range is not overlapping each other re-use the same slot in CorotuineFrame.
; RUN: opt < %s -coro-split -reuse-storage-in-coroutine-frame -S | FileCheck %s
; RUN: opt < %s -passes=coro-split -reuse-storage-in-coroutine-frame -S | FileCheck %s
%"struct.task::promise_type" = type { i8 }
%struct.awaitable = type { i8 }

View File

@ -1,5 +1,4 @@
; Check that coro-split doesn't choke on intrinsics in unreachable blocks
; RUN: opt < %s -coro-split -S
; RUN: opt < %s -passes=coro-split -S
define i8* @f(i1 %arg) "coroutine.presplit"="1" personality i32 0 {

View File

@ -1,5 +1,4 @@
; Check that we can handle spills of the result of the invoke instruction
; RUN: opt < %s -coro-split -S | FileCheck %s
; RUN: opt < %s -passes=coro-split -S | FileCheck %s
define i8* @f(i64 %this) "coroutine.presplit"="1" personality i32 0 {

View File

@ -1,7 +1,6 @@
; Tests that the dynamic allocation and deallocation of the coroutine frame is
; elided and any tail calls referencing the coroutine frame has the tail
; call attribute removed.
; RUN: opt < %s -S -inline -coro-elide -instsimplify -simplifycfg -simplifycfg-require-and-preserve-domtree=1 | FileCheck %s
; RUN: opt < %s -S \
; RUN: -passes='cgscc(inline,function(coro-elide,instsimplify,simplify-cfg))' \
; RUN: -aa-pipeline='basic-aa' | FileCheck %s

View File

@ -1,6 +1,4 @@
; RUN: opt < %s -always-inline -barrier -coro-split -S -enable-new-pm=0 | FileCheck %s
; RUN: opt < %s -passes='always-inline,cgscc(coro-split)' -S | FileCheck %s
; RUN: opt < %s -sample-profile-file=%S/Inputs/sample.text.prof -pgo-kind=pgo-sample-use-pipeline -sample-profile -coro-split -disable-inlining=true -S | FileCheck %s
; RUN: opt < %s -sample-profile-file=%S/Inputs/sample.text.prof -pgo-kind=pgo-sample-use-pipeline -passes='sample-profile,cgscc(coro-split)' -disable-inlining=true -S | FileCheck %s
; Function Attrs: alwaysinline ssp uwtable
@ -34,4 +32,4 @@ attributes #0 = { alwaysinline ssp uwtable "coroutine.presplit"="1" "use-sample-
!1 = !{i32 7, !"Dwarf Version", i32 4}
!2 = !{i32 2, !"Debug Info Version", i32 3}
!3 = !{i32 1, !"wchar_size", i32 4}
!4 = !{i32 7, !"PIC Level", i32 2}
!4 = !{i32 7, !"PIC Level", i32 2}

View File

@ -1,5 +1,4 @@
; Verifies that we materialize instruction across suspend points
; RUN: opt < %s -coro-split -S | FileCheck %s
; RUN: opt < %s -passes=coro-split -S | FileCheck %s
define i8* @f(i32 %n) "coroutine.presplit"="1" {

View File

@ -1,6 +1,5 @@
; Check that we will insert the correct padding if natural alignment of the
; spilled data does not match the alignment specified in alloca instruction.
; RUN: opt < %s -coro-split -S | FileCheck %s
; RUN: opt < %s -passes=coro-split -S | FileCheck %s
%PackedStruct = type <{ i64 }>

View File

@ -1,6 +1,5 @@
; Check that we create copy the data from the alloca into the coroutine
; frame slot if it was written to.
; RUN: opt < %s -coro-split -S | FileCheck %s
; RUN: opt < %s -passes=coro-split -S | FileCheck %s
define i8* @f() "coroutine.presplit"="1" {

View File

@ -1,5 +1,4 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt < %s -enable-coroutines -O2 -S | FileCheck %s
; RUN: opt < %s -enable-coroutines -passes='default<O2>' -S | FileCheck %s
target datalayout = "p:64:64:64"

View File

@ -1,4 +1,3 @@
; RUN: opt < %s -coro-split -S | FileCheck %s
; RUN: opt < %s -passes=coro-split -S | FileCheck %s
target datalayout = "p:64:64:64"

View File

@ -1,5 +1,4 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt < %s -enable-coroutines -O2 -S | FileCheck %s
; RUN: opt < %s -enable-coroutines -passes='default<O2>' -S | FileCheck %s
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"

View File

@ -1,4 +1,4 @@
; RUN: opt < %s -coro-split -coro-cleanup -S | FileCheck %s
; RUN: opt < %s -passes='cgscc(coro-split),function(coro-cleanup)' -S | FileCheck %s
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.12.0"

View File

@ -1,5 +1,4 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt < %s -enable-coroutines -O2 -S | FileCheck %s
; RUN: opt < %s -enable-coroutines -passes='default<O2>' -aa-pipeline=default -S | FileCheck %s
define i8* @f(i8* %buffer, i32 %n) {

View File

@ -1,4 +1,3 @@
; RUN: opt < %s -coro-split -coro-cleanup -S | FileCheck %s
; RUN: opt < %s -passes='coro-split,coro-cleanup' -S | FileCheck %s
define i8* @f(i8* %buffer, i32 %n) "coroutine.presplit"="1" {

View File

@ -1,4 +1,3 @@
; RUN: opt < %s -coro-early -coro-split -S | FileCheck %s
; RUN: opt < %s -passes='function(coro-early),cgscc(coro-split)' -S | FileCheck %s
target datalayout = "E-p:64:64"

View File

@ -1,6 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; First example from Doc/Coroutines.rst (two block loop) converted to retcon
; RUN: opt < %s -enable-coroutines -O2 -S | FileCheck %s
; RUN: opt < %s -enable-coroutines -passes='default<O2>' -S | FileCheck %s
define {i8*, i32} @f(i8* %buffer, i32 %n) {

View File

@ -1,6 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; First example from Doc/Coroutines.rst (two block loop) converted to retcon
; RUN: opt < %s -enable-coroutines -O2 -S -enable-new-pm=0 | FileCheck --check-prefixes=ALL,OLDPM %s
; RUN: opt < %s -enable-coroutines -passes='default<O2>' -S | FileCheck --check-prefixes=ALL,NEWPM %s
define i8* @f(i8* %buffer, i32 %n) {

View File

@ -1,5 +1,4 @@
; Verifies that we insert spills of PHI instruction _after) all PHI Nodes
; RUN: opt < %s -coro-split -S | FileCheck %s
; RUN: opt < %s -passes=coro-split -S | FileCheck %s
define i8* @f(i1 %n) "coroutine.presplit"="1" {

View File

@ -1,5 +1,4 @@
; Check that we can spills coro.begin from an inlined inner coroutine.
; RUN: opt < %s -coro-split -S | FileCheck %s
; RUN: opt < %s -passes=coro-split -S | FileCheck %s
%g.Frame = type { void (%g.Frame*)*, void (%g.Frame*)*, i32, i1, i32 }

View File

@ -1,5 +1,4 @@
; Verifies that phi and invoke definitions before CoroBegin are spilled properly.
; RUN: opt < %s -coro-split -S | FileCheck %s
; RUN: opt < %s -passes=coro-split -S | FileCheck %s
define i8* @f(i1 %n) "coroutine.presplit"="1" personality i32 0 {

View File

@ -1,5 +1,4 @@
; Check that promise object is reloaded from the correct index of the coro frame.
; RUN: opt < %s -coro-split -S | FileCheck %s
; RUN: opt < %s -passes=coro-split -S | FileCheck %s
%"class.task::promise_type" = type { [64 x i8] }

View File

@ -1,5 +1,4 @@
; Tests that coro-split pass splits the coroutine into f, f.resume and f.destroy
; RUN: opt < %s -coro-split -S | FileCheck %s
; RUN: opt < %s -passes=coro-split -S | FileCheck %s
define i8* @f() "coroutine.presplit"="1" {

View File

@ -1,5 +1,4 @@
; Tests that a coroutine is split, inlined into the caller and devirtualized.
; RUN: opt < %s -S -enable-coroutines -O2 | FileCheck %s
; RUN: opt < %s -S -enable-coroutines -passes='default<O2>' | FileCheck %s
define i8* @f() {

View File

@ -1,7 +1,6 @@
; Tests that coro-split can handle the case when a code after coro.suspend uses
; a value produces between coro.save and coro.suspend (%Result.i19)
; and checks whether stray coro.saves are properly removed
; RUN: opt < %s -coro-split -S | FileCheck %s
; RUN: opt < %s -passes=coro-split -S | FileCheck %s
%"struct.std::coroutine_handle" = type { i8* }

View File

@ -1,5 +1,4 @@
; Tests that coro-split passes initialized values to coroutine frame allocator.
; RUN: opt < %s -coro-split -S | FileCheck %s
; RUN: opt < %s -passes=coro-split -S | FileCheck %s
define i8* @f(i32 %argument) "coroutine.presplit"="1" {

View File

@ -1,6 +1,5 @@
; Make sure that coro-split correctly deals with debug information.
; The test here is simply that it does not result in bad IR that will crash opt.
; RUN: opt < %s -coro-split -disable-output
; RUN: opt < %s -passes=coro-split -disable-output
source_filename = "coro.c"
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"

View File

@ -1,6 +1,5 @@
; Tests that coro-split removes cleanup code after coro.end in resume functions
; and retains it in the start function.
; RUN: opt < %s -coro-split -S | FileCheck %s
; RUN: opt < %s -passes=coro-split -S | FileCheck %s
define i8* @f(i1 %val) "coroutine.presplit"="1" personality i32 3 {

View File

@ -1,6 +1,5 @@
; Tests that coro-split removes cleanup code after coro.end in resume functions
; and retains it in the start function.
; RUN: opt < %s -coro-split -S | FileCheck %s
; RUN: opt < %s -passes=coro-split -S | FileCheck %s
define i8* @f2(i1 %val) "coroutine.presplit"="1" personality i32 4 {

View File

@ -1,7 +1,6 @@
; Tests that coro-split can convert functions with hidden visibility.
; These may be generated by a frontend such as Clang, when inlining with
; '-fvisibility-inlines-hidden'.
; RUN: opt < %s -coro-split -S | FileCheck %s
; RUN: opt < %s -passes=coro-split -S | FileCheck %s
define hidden i8* @f() "coroutine.presplit"="1" {

View File

@ -1,6 +1,5 @@
; Tests that coro-split will convert coro.resume followed by a suspend to a
; musttail call.
; RUN: opt < %s -coro-split -S | FileCheck %s
; RUN: opt < %s -passes=coro-split -S | FileCheck %s
define void @f() #0 {

View File

@ -1,6 +1,5 @@
; Tests that coro-split will convert coro.resume followed by a suspend to a
; musttail call.
; RUN: opt < %s -coro-split -S | FileCheck %s
; RUN: opt < %s -passes=coro-split -S | FileCheck %s
define void @f() #0 {

View File

@ -1,6 +1,5 @@
; Tests that coro-split will convert coro.resume followed by a suspend to a
; musttail call.
; RUN: opt < %s -coro-split -S | FileCheck %s
; RUN: opt < %s -passes=coro-split -S | FileCheck %s
define void @fakeresume1(i8*) {

View File

@ -1,6 +1,5 @@
; Tests that coro-split will convert coro.resume followed by a suspend to a
; musttail call.
; RUN: opt < %s -coro-split -S | FileCheck %s
; RUN: opt < %s -passes=coro-split -S | FileCheck %s
define void @f() #0 {

View File

@ -1,6 +1,5 @@
; Tests that coro-split will optimize the lifetime.start maker of each local variable,
; sink them to the places after the suspend block.
; RUN: opt < %s -coro-split -S | FileCheck %s
; RUN: opt < %s -passes=coro-split -S | FileCheck %s
%"struct.std::coroutine_handle" = type { i8* }

View File

@ -1,6 +1,5 @@
; Tests that coro-split will optimize the lifetime.start maker of each local variable,
; sink them to the places after the suspend block.
; RUN: opt < %s -coro-split -S | FileCheck %s
; RUN: opt < %s -passes=coro-split -S | FileCheck %s
%"struct.std::coroutine_handle" = type { i8* }

View File

@ -1,6 +1,5 @@
; Corresponding to coro-split-sink-lifetime-01.ll. This file tests that whether the CoroFrame
; pass knows the operand of lifetime.start intrinsic may be GEP as well.
; RUN: opt < %s -coro-split -S | FileCheck %s
; RUN: opt < %s -passes=coro-split -S | FileCheck %s
%"struct.std::coroutine_handle" = type { i8* }

View File

@ -1,6 +1,5 @@
; Tests that coro-split will optimize the lifetime.start maker of each local variable,
; sink them to the places after the suspend block.
; RUN: opt < %s -coro-split -S | FileCheck %s
; RUN: opt < %s -passes=coro-split -S | FileCheck %s
%"struct.std::coroutine_handle" = type { i8* }

View File

@ -1,5 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt < %s -enable-coroutines -O2 -S | FileCheck %s
; RUN: opt < %s -enable-coroutines -passes='default<O2>' -S | FileCheck %s
target datalayout = "E-p:32:32"
define i8* @f(i8* %buffer, i32 %n, i8** swifterror %errorslot) {

View File

@ -1,5 +1,4 @@
; First example from Doc/Coroutines.rst (two block loop)
; RUN: opt < %s -enable-coroutines -O2 -preserve-alignment-assumptions-during-inlining=false -S | FileCheck %s
; RUN: opt < %s -enable-coroutines -aa-pipeline=basic-aa -passes='default<O2>' -preserve-alignment-assumptions-during-inlining=false -S | FileCheck %s
define i8* @f(i32 %n) {

View File

@ -1,5 +1,4 @@
; First example from Doc/Coroutines.rst (one block loop)
; RUN: opt < %s -O2 -enable-coroutines -preserve-alignment-assumptions-during-inlining=false -S | FileCheck %s
; RUN: opt < %s -aa-pipeline=basic-aa -passes='default<O2>' -enable-coroutines -preserve-alignment-assumptions-during-inlining=false -S | FileCheck %s
define i8* @f(i32 %n) {

View File

@ -1,5 +1,4 @@
; Second example from Doc/Coroutines.rst (custom alloc and free functions)
; RUN: opt < %s -O2 -enable-coroutines -S | FileCheck %s
; RUN: opt < %s -passes='default<O2>' -enable-coroutines -S | FileCheck %s
define i8* @f(i32 %n) {

View File

@ -1,5 +1,4 @@
; Third example from Doc/Coroutines.rst (two suspend points)
; RUN: opt < %s -O2 -enable-coroutines -S | FileCheck %s
; RUN: opt < %s -aa-pipeline=basic-aa -passes='default<O2>' -enable-coroutines -S | FileCheck %s
define i8* @f(i32 %n) {

View File

@ -1,5 +1,4 @@
; Fourth example from Doc/Coroutines.rst (coroutine promise)
; RUN: opt < %s -O2 -enable-coroutines -S | FileCheck %s
; RUN: opt < %s -passes='default<O2>' -enable-coroutines -S | FileCheck %s
define i8* @f(i32 %n) {

View File

@ -1,5 +1,4 @@
; Fifth example from Doc/Coroutines.rst (final suspend)
; RUN: opt < %s -O2 -enable-coroutines -preserve-alignment-assumptions-during-inlining=false -S | FileCheck %s
; RUN: opt < %s -aa-pipeline=basic-aa -passes='default<O2>' -enable-coroutines -preserve-alignment-assumptions-during-inlining=false -S | FileCheck %s
define i8* @f(i32 %n) {

View File

@ -1,5 +1,4 @@
; Test no suspend coroutines
; RUN: opt < %s -coro-split -S | FileCheck %s
; RUN: opt < %s -passes=coro-split -S | FileCheck %s
; Coroutine with no-suspends will turn into:

View File

@ -1,5 +1,4 @@
; Verify that we correctly handle suspend when the coro.end block contains phi
; RUN: opt < %s -O2 -enable-coroutines -S | FileCheck %s
; RUN: opt < %s -aa-pipeline=basic-aa -passes='default<O2>' -enable-coroutines -S | FileCheck %s
define i8* @f(i32 %n) {

View File

@ -1,9 +1,4 @@
; Verifies that the restart trigger that is used by legacy coroutine passes
; forces the legacy pass manager to restart IPO pipelines, thereby causing the
; same coroutine to be looked at by CoroSplit pass twice.
; REQUIRES: asserts
; RUN: opt < %s -S -O0 -enable-coroutines -debug-only=coro-split 2>&1 | FileCheck %s
; RUN: opt < %s -S -O1 -enable-coroutines -debug-only=coro-split 2>&1 | FileCheck %s
; The following tests use the new pass manager, and verify that the coroutine
; passes re-run the CGSCC pipeline.
; RUN: opt < %s -S -passes='default<O0>' -enable-coroutines -debug-only=coro-split 2>&1 | FileCheck %s

View File

@ -1,42 +1,22 @@
; Test that all coroutine passes run in the correct order at all optimization
; levels and -enable-coroutines adds coroutine passes to the pipeline.
;
; Legacy pass manager:
; RUN: opt < %s -disable-output -enable-coroutines -debug-pass=Arguments -O0 -enable-new-pm=0 2>&1 | FileCheck %s
; RUN: opt < %s -disable-output -enable-coroutines -debug-pass=Arguments -O1 -enable-new-pm=0 2>&1 | FileCheck %s
; RUN: opt < %s -disable-output -enable-coroutines -debug-pass=Arguments -O2 -enable-new-pm=0 2>&1 | FileCheck %s
; RUN: opt < %s -disable-output -enable-coroutines -debug-pass=Arguments -O3 -enable-new-pm=0 2>&1 | FileCheck %s
; RUN: opt < %s -disable-output -enable-coroutines -debug-pass=Arguments \
; RUN: -coro-early -coro-split -coro-elide -coro-cleanup -enable-new-pm=0 2>&1 | FileCheck %s
; RUN: opt < %s -disable-output -debug-pass=Arguments -enable-new-pm=0 2>&1 \
; RUN: | FileCheck %s -check-prefix=NOCORO
; New pass manager:
; RUN: opt < %s -disable-output -passes='default<O0>' -enable-coroutines \
; RUN: -debug-pass-manager 2>&1 | FileCheck %s -check-prefix=NEWPM
; RUN: -debug-pass-manager 2>&1 | FileCheck %s
; RUN: opt < %s -disable-output -passes='default<O1>' -enable-coroutines \
; RUN: -debug-pass-manager 2>&1 | FileCheck %s -check-prefix=NEWPM
; RUN: -debug-pass-manager 2>&1 | FileCheck %s
; RUN: opt < %s -disable-output -passes='default<O2>' -enable-coroutines \
; RUN: -debug-pass-manager 2>&1 | FileCheck %s -check-prefix=NEWPM
; RUN: -debug-pass-manager 2>&1 | FileCheck %s
; RUN: opt < %s -disable-output -passes='default<O3>' -enable-coroutines \
; RUN: -debug-pass-manager 2>&1 | FileCheck %s -check-prefix=NEWPM
; RUN: -debug-pass-manager 2>&1 | FileCheck %s
; RUN: opt < %s -disable-output -debug-pass-manager \
; RUN: -passes='function(coro-early),cgscc(coro-split),function(coro-elide,coro-cleanup)' 2>&1 \
; RUN: | FileCheck %s -check-prefix=NEWPM
; RUN: | FileCheck %s
; CHECK: coro-early
; CHECK: coro-split
; CHECK: coro-elide
; CHECK: coro-cleanup
; NOCORO-NOT: coro-early
; NOCORO-NOT: coro-split
; NOCORO-NOT: coro-elide
; NOCORO-NOT: coro-cleanup
; NEWPM: CoroEarlyPass
; NEWPM: CoroSplitPass
; NEWPM: CoroElidePass
; NEWPM: CoroCleanupPass
; CHECK: CoroEarlyPass
; CHECK: CoroSplitPass
; CHECK: CoroElidePass
; CHECK: CoroCleanupPass
define void @foo() {
ret void