Files
swift-mirror/test/SILOptimizer/pruned_liveness_boundary.sil
Nate Chandler e9ab3b4b53 [Test] Refactored SIL "unit" tests.
Renamed UnitTest to FunctionTest.

FunctionTests are now instantiated once as global objects--with their
names and the code they are to run--at which time they are stored by
name in a global registry.

Moved the types to the SIL library.

Together, these changes enable defining unit tests in the source file
containing the code to be tested.
2023-07-04 11:52:11 -07:00

23 lines
983 B
Plaintext

// RUN: %target-sil-opt -test-runner %s 2>&1 | %FileCheck %s
// CHECK: begin running test 1 of {{[^,]+}} on last_uses_merge_points: dump-function
// CHECK: [[REGISTER_3:%[^,]+]] = tuple ()
// CHECK: return [[REGISTER_3]]
// CHECK: end running test 1 of {{[^,]+}} on last_uses_merge_points: dump-function
// CHECK: begin running test 2 of {{[^,]+}} on last_uses_merge_points: pruned-liveness-boundary-with-list-of-last-users-insertion-points
// CHECK: [[REGISTER_3]] = tuple ()
// CHECK: end running test 2 of {{[^,]+}} on last_uses_merge_points: pruned-liveness-boundary-with-list-of-last-users-insertion-points
sil [ossa] @last_uses_merge_points : $@convention(thin) () -> () {
entry:
test_specification "dump-function"
test_specification "pruned-liveness-boundary-with-list-of-last-users-insertion-points @block[1].instruction[0] @block[2].instruction[0]"
cond_br undef, left, right
left:
br bottom
right:
br bottom
bottom:
%retval = tuple ()
return %retval : $()
}