Skip to content

Commit 2cd2d9e

Browse files
committed
Fix mandatory_inlining_ownership test for 32-bit.
1 parent 4bba768 commit 2cd2d9e

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

test/SILOptimizer/mandatory_inlining_ownership.sil

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,74 +6,74 @@ import Builtin
66
import Swift
77

88
class C {
9-
var i = 0
9+
var i: Builtin.Int64
10+
init(i: Builtin.Int64) { self.i = i }
1011
}
1112

12-
sil [transparent] @calleeWithGuaranteed : $@convention(thin) (@guaranteed C) -> Int {
13+
sil [transparent] @calleeWithGuaranteed : $@convention(thin) (@guaranteed C) -> Builtin.Int64 {
1314
bb(%0 : @guaranteed $C):
1415
%1 = ref_element_addr %0 : $C, #C.i
15-
%2 = load [trivial] %1 : $*Int
16-
return %2 : $Int
16+
%2 = load [trivial] %1 : $*Builtin.Int64
17+
return %2 : $Builtin.Int64
1718
}
1819

19-
// CHECK-LABEL: sil @callerWithOwned : $@convention(thin) (@owned C) -> Int {
20+
// CHECK-LABEL: sil @callerWithOwned : $@convention(thin) (@owned C) -> Builtin.Int64 {
2021
// CHECK: bb0(%0 : @owned $C):
2122
// CHECK: [[BORROW:%.*]] = begin_borrow %0 : $C
2223
// CHECK: [[ADDR:%.*]] = ref_element_addr [[BORROW]] : $C, #C.i
23-
// CHECK: [[VAL:%.*]] = load [trivial] [[ADDR]] : $*Int
24+
// CHECK: [[VAL:%.*]] = load [trivial] [[ADDR]] : $*Builtin.Int64
2425
// CHECK: end_borrow [[BORROW]] from %0 : $C, $C
2526
// CHECK: destroy_value %0 : $C
26-
// CHECK: return [[VAL]] : $Int
27+
// CHECK: return [[VAL]] : $Builtin.Int64
2728
// CHECK-LABEL: } // end sil function 'callerWithOwned'
28-
sil @callerWithOwned : $@convention(thin) (@owned C) -> Int {
29+
sil @callerWithOwned : $@convention(thin) (@owned C) -> Builtin.Int64 {
2930
bb(%0 : @owned $C):
30-
%fn = function_ref @calleeWithGuaranteed : $@convention(thin) (@guaranteed C) -> Int
31-
%call = apply %fn(%0) : $@convention(thin) (@guaranteed C) -> Int
31+
%fn = function_ref @calleeWithGuaranteed : $@convention(thin) (@guaranteed C) -> Builtin.Int64
32+
%call = apply %fn(%0) : $@convention(thin) (@guaranteed C) -> Builtin.Int64
3233
destroy_value %0 : $C
33-
return %call : $Int
34+
return %call : $Builtin.Int64
3435
}
3536

3637
struct MyError : Error {}
3738

38-
sil [transparent] @calleeWithGuaranteedThrows : $@convention(thin) (@guaranteed C) -> (Int, @error Error) {
39+
sil [transparent] @calleeWithGuaranteedThrows : $@convention(thin) (@guaranteed C) -> (Builtin.Int64, @error Error) {
3940
bb(%0 : @guaranteed $C):
4041
%1 = ref_element_addr %0 : $C, #C.i
41-
%2 = load [trivial] %1 : $*Int
42+
%2 = load [trivial] %1 : $*Builtin.Int64
4243
%3 = integer_literal $Builtin.Int64, 0
43-
%4 = struct_extract %2 : $Int, #Int._value
44-
%5 = builtin "cmp_eq_Int64"(%3 : $Builtin.Int64, %4 : $Builtin.Int64) : $Builtin.Int1
44+
%5 = builtin "cmp_eq_Int64"(%2 : $Builtin.Int64, %3 : $Builtin.Int64) : $Builtin.Int1
4545
cond_br %5, bb1, bb2
4646

4747
bb1:
4848
%6 = alloc_existential_box $Error, $MyError
4949
throw %6 : $Error
5050

5151
bb2:
52-
return %2 : $Int
52+
return %2 : $Builtin.Int64
5353
}
5454

55-
// CHECK-LABEL: sil @callerWithThrow : $@convention(thin) (@owned C) -> (Int, @error Error) {
55+
// CHECK-LABEL: sil @callerWithThrow : $@convention(thin) (@owned C) -> (Builtin.Int64, @error Error) {
5656
// CHECK: bb0(%0 : @owned $C):
5757
// CHECK: [[BORROW:%.*]] = begin_borrow %0 : $C
5858
// CHECK: [[ADDR:%.*]] = ref_element_addr [[BORROW]] : $C, #C.i
59-
// CHECK: [[VAL:%.*]] = load [trivial] [[ADDR]] : $*Int
60-
// CHECK: bb{{.*}}([[RET:%.*]] : @trivial $Int):
59+
// CHECK: [[VAL:%.*]] = load [trivial] [[ADDR]] : $*Builtin.Int64
60+
// CHECK: bb{{.*}}([[RET:%.*]] : @trivial $Builtin.Int64):
6161
// CHECK: end_borrow [[BORROW]] from %0 : $C, $C
6262
// CHECK: destroy_value %0 : $C
63-
// CHECK: return [[RET]] : $Int
63+
// CHECK: return [[RET]] : $Builtin.Int64
6464
// CHECK: bb{{.*}}([[ERR:%.*]] : @owned $Error):
6565
// CHECK: end_borrow [[BORROW]] from %0 : $C, $C
6666
// CHECK: destroy_value %0 : $C
6767
// CHECK: throw [[ERR]] : $Error
6868
// CHECK-LABEL: } // end sil function 'callerWithThrow'
69-
sil @callerWithThrow : $@convention(thin) (@owned C) -> (Int, @error Error) {
69+
sil @callerWithThrow : $@convention(thin) (@owned C) -> (Builtin.Int64, @error Error) {
7070
bb(%0 : @owned $C):
71-
%fn = function_ref @calleeWithGuaranteedThrows : $@convention(thin) (@guaranteed C) -> (Int, @error Error)
72-
try_apply %fn(%0) : $@convention(thin) (@guaranteed C) -> (Int, @error Error), normal bb1, error bb2
71+
%fn = function_ref @calleeWithGuaranteedThrows : $@convention(thin) (@guaranteed C) -> (Builtin.Int64, @error Error)
72+
try_apply %fn(%0) : $@convention(thin) (@guaranteed C) -> (Builtin.Int64, @error Error), normal bb1, error bb2
7373

74-
bb1(%4 : @trivial $Int):
74+
bb1(%4 : @trivial $Builtin.Int64):
7575
destroy_value %0 : $C
76-
return %4 : $Int
76+
return %4 : $Builtin.Int64
7777

7878
bb2(%5 : @owned $Error):
7979
destroy_value %0 : $C

0 commit comments

Comments
 (0)