Skip to content

Commit dfad7b3

Browse files
[test] Fix IRGen/yield_result.sil for 32-bit platforms
Follow-up to 8b7a75c for 32-bit platforms.
1 parent 650e90a commit dfad7b3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/IRGen/yield_result.sil

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend -emit-irgen %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize
1+
// RUN: %target-swift-frontend -emit-irgen %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize -DINT=i%target-ptrsize
22

33
import Builtin
44

@@ -103,7 +103,7 @@ bb0(%outt : $*T, %t : $*T):
103103
// CHECK: br i1 [[IS_UNWIND]], label %[[UNWIND_BB:.*]], label %[[RESUME_BB:.*]]
104104

105105
// CHECK:[[RESUME_BB]]:
106-
// CHECK: [[VW_PTR:%.*]] = getelementptr inbounds ptr, ptr [[TYPE]], i64 -1
106+
// CHECK: [[VW_PTR:%.*]] = getelementptr inbounds ptr, ptr [[TYPE]], [[INT]] -1
107107
// CHECK: [[VW:%.*]] = load ptr, ptr [[VW_PTR]]
108108
// CHECK: [[ASSIGN_PTR:%.*]] = getelementptr inbounds ptr, ptr [[VW]], i32 3
109109
// CHECK: [[ASSIGN:%.*]] = load ptr, ptr [[ASSIGN_PTR]]
@@ -126,15 +126,15 @@ sil [ossa] @test_coro_ret_indirect : $(Builtin.Int64) -> () {
126126
bb0(%0 : $Builtin.Int64):
127127
// CHECK: [[ARG_COPY:%.*]] = alloca i64
128128
// CHECK: [[INDIRECT_RET:%.*]] = alloca i64
129-
// CHECK: [[FRAME:%.*]] = alloca [32 x i8]
129+
// CHECK: [[FRAME:%.*]] = alloca [[[BUFFER_SIZE]] x i8]
130130
%coro = function_ref @coro_ret_indirect : $@yield_once @convention(thin) <T> (@in T) -> (@yields @in T, @out T)
131131
%temp = alloc_stack $Builtin.Int64
132132
store %0 to [trivial] %temp : $*Builtin.Int64
133133

134134
%out = alloc_stack $Builtin.Int64
135135

136136
// CHECK: store i64 [[ARG]], ptr [[ARG_COPY]]
137-
// CHECK: [[CTX:%.*]] = getelementptr inbounds [32 x i8], ptr [[FRAME]], i32 0, i32 0
137+
// CHECK: [[CTX:%.*]] = getelementptr inbounds [[[BUFFER_SIZE]] x i8], ptr [[FRAME]], i32 0, i32 0
138138
// CHECK: [[CORO:%.*]] = call ptr @llvm.coro.prepare.retcon(ptr @coro_ret_indirect)
139139
// CHECK: [[FRAME:%.*]] = call swiftcc { ptr, ptr } [[CORO]](ptr{{.*}} [[CTX]], ptr [[INDIRECT_RET]], ptr noalias [[ARG_COPY]], ptr getelementptr inbounds (%swift.full_existential_type, ptr @{{.*}}
140140

0 commit comments

Comments
 (0)