Skip to content

tests: fix two tests for 32-bit architectures #63932

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions test/SILOptimizer/addr_escape_info.sil
Original file line number Diff line number Diff line change
Expand Up @@ -608,28 +608,28 @@ bb0:
}

sil @call_closure : $@convention(method) (@noescape @callee_guaranteed () -> ()) -> ()
sil @closure : $@convention(thin) (@inout_aliasable Int) -> ()
sil @closure : $@convention(thin) (@inout_aliasable Int64) -> ()

// CHECK-LABEL: Address escape information for test_closure_capturing_address:
// CHECK: value: %0 = alloc_stack $Int
// CHECK: value: %0 = alloc_stack $Int64
// CHECK-NEXT: ==> %7 = apply %6(%4) : $@convention(method) (@noescape @callee_guaranteed () -> ()) -> ()
// CHECK: End function test_closure_capturing_address
sil @test_closure_capturing_address : $@convention(thin) () -> Int {
sil @test_closure_capturing_address : $@convention(thin) () -> Int64 {
bb0:
%0 = alloc_stack $Int
%0 = alloc_stack $Int64
%1 = integer_literal $Builtin.Int64, 0
%2 = struct $Int (%1 : $Builtin.Int64)
%2 = struct $Int64 (%1 : $Builtin.Int64)

%3 = function_ref @closure : $@convention(thin) (@inout_aliasable Int) -> ()
%4 = partial_apply [callee_guaranteed] [on_stack] %3(%0) : $@convention(thin) (@inout_aliasable Int) -> ()
store %2 to %0 : $*Int
%3 = function_ref @closure : $@convention(thin) (@inout_aliasable Int64) -> ()
%4 = partial_apply [callee_guaranteed] [on_stack] %3(%0) : $@convention(thin) (@inout_aliasable Int64) -> ()
store %2 to %0 : $*Int64

%6 = function_ref @call_closure : $@convention(method) (@noescape @callee_guaranteed () -> ()) -> ()
%7 = apply %6(%4) : $@convention(method) (@noescape @callee_guaranteed () -> ()) -> ()
dealloc_stack %4 : $@noescape @callee_guaranteed () -> ()
fix_lifetime %0 : $*Int
%9 = load %0 : $*Int
dealloc_stack %0 : $*Int
return %9 : $Int
fix_lifetime %0 : $*Int64
%9 = load %0 : $*Int64
dealloc_stack %0 : $*Int64
return %9 : $Int64
}

20 changes: 10 additions & 10 deletions test/SILOptimizer/redundant_load_elim.sil
Original file line number Diff line number Diff line change
Expand Up @@ -1269,27 +1269,27 @@ bb1:
}

sil @call_closure : $@convention(method) (@noescape @callee_guaranteed () -> ()) -> ()
sil @closure : $@convention(thin) (@inout_aliasable Int) -> ()
sil @closure : $@convention(thin) (@inout_aliasable Int64) -> ()

// CHECK-LABEL: sil @test_closure_capturing_address :
// CHECK: [[L:%[0-9]+]] = load
// CHECK: return [[L]]
// CHECK-LABEL: } // end sil function 'test_closure_capturing_address'
sil @test_closure_capturing_address : $@convention(thin) () -> Int {
sil @test_closure_capturing_address : $@convention(thin) () -> Int64 {
bb0:
%0 = alloc_stack $Int
%0 = alloc_stack $Int64
%1 = integer_literal $Builtin.Int64, 0
%2 = struct $Int (%1 : $Builtin.Int64)
%2 = struct $Int64 (%1 : $Builtin.Int64)

%3 = function_ref @closure : $@convention(thin) (@inout_aliasable Int) -> ()
%4 = partial_apply [callee_guaranteed] [on_stack] %3(%0) : $@convention(thin) (@inout_aliasable Int) -> ()
store %2 to %0 : $*Int
%3 = function_ref @closure : $@convention(thin) (@inout_aliasable Int64) -> ()
%4 = partial_apply [callee_guaranteed] [on_stack] %3(%0) : $@convention(thin) (@inout_aliasable Int64) -> ()
store %2 to %0 : $*Int64

%6 = function_ref @call_closure : $@convention(method) (@noescape @callee_guaranteed () -> ()) -> ()
%7 = apply %6(%4) : $@convention(method) (@noescape @callee_guaranteed () -> ()) -> ()
dealloc_stack %4 : $@noescape @callee_guaranteed () -> ()
%9 = load %0 : $*Int
dealloc_stack %0 : $*Int
return %9 : $Int
%9 = load %0 : $*Int64
dealloc_stack %0 : $*Int64
return %9 : $Int64
}