Skip to content

Commit 2145e30

Browse files
[test][IRGen] Add CHECK-wasm32 cases
1 parent e26ed9a commit 2145e30

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

test/IRGen/errors.sil

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ entry:
2525
// CHECK-LABEL-aarch64: define{{( dllexport)?}}{{( protected)?}} swiftcc void @does_throw(ptr swiftself %0, ptr swifterror %1) {{.*}} {
2626
// CHECK-LABEL-arm64_32: define{{( dllexport)?}}{{( protected)?}} swiftcc void @does_throw(ptr swiftself %0, ptr swifterror %1) {{.*}} {
2727
// CHECK-LABEL-arm64e: define{{( dllexport)?}}{{( protected)?}} swiftcc void @does_throw(ptr swiftself %0, ptr swifterror %1) {{.*}} {
28+
// CHECK-LABEL-wasm32: define swiftcc void @does_throw(ptr swiftself %0, ptr swifterror %1) {{.*}} {
2829
sil @does_throw : $@convention(thin) () -> @error Error {
2930
// CHECK: [[T0:%.*]] = call swiftcc ptr @create_error()
3031
%0 = function_ref @create_error : $@convention(thin) () -> @owned Error
@@ -49,6 +50,7 @@ sil @does_throw : $@convention(thin) () -> @error Error {
4950
// CHECK-LABEL-aarch64: define{{( dllexport)?}}{{( protected)?}} swiftcc void @doesnt_throw(ptr swiftself %0, ptr swifterror %1) {{.*}} {
5051
// CHECK-LABEL-arm64e: define{{( dllexport)?}}{{( protected)?}} swiftcc void @doesnt_throw(ptr swiftself %0, ptr swifterror %1) {{.*}} {
5152
// CHECK-LABEL-arm64_32: define{{( dllexport)?}}{{( protected)?}} swiftcc void @doesnt_throw(ptr swiftself %0, ptr swifterror %1) {{.*}} {
53+
// CHECK-LABEL-wasm32: define swiftcc void @doesnt_throw(ptr swiftself %0, ptr swifterror %1) {{.*}} {
5254
sil @doesnt_throw : $@convention(thin) () -> @error Error {
5355
// We don't have to do anything here because the caller always
5456
// zeroes the error slot before a call.
@@ -74,6 +76,7 @@ entry(%0 : $AnyObject):
7476
// CHECK-aarch64: [[ERRORSLOT:%.*]] = alloca [[SWIFTERROR:.*]] ptr, align
7577
// CHECK-arm64_32: [[ERRORSLOT:%.*]] = alloca [[SWIFTERROR:.*]] ptr, align
7678
// CHECK-powerpc64le: [[ERRORSLOT:%.*]] = alloca [[SWIFTERROR:.*]] ptr, align
79+
// CHECK-wasm32: [[ERRORSLOT:%.*]] = alloca [[SWIFTERROR:.*]] ptr, align
7780
// CHECK-NEXT: store ptr null, ptr [[ERRORSLOT]], align
7881

7982
// CHECK-objc-NEXT: [[RESULT:%.*]] = call swiftcc ptr @try_apply_helper(ptr %0, ptr swiftself undef, ptr noalias nocapture [[SWIFTERROR]]{{( )?}}dereferenceable({{.}}) [[ERRORSLOT]])

test/IRGen/objc_simd.sil

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ func forceStuff(x: float4, y: float3) -> (Float, Float, Float, Float) {
2626
// powerpc64-LABEL: define{{( dllexport)?}}{{( protected)?}} <4 x float> @simd_c_args(<4 x float> %0)
2727
// powerpc64le-LABEL: define{{( dllexport)?}}{{( protected)?}} <4 x float> @simd_c_args(<4 x float> %0)
2828
// s390x-LABEL: define{{( dllexport)?}}{{( protected)?}} <4 x float> @simd_c_args(<4 x float> %0)
29+
// wasm32-LABEL: define{{( dllexport)?}}{{( protected)?}} <4 x float> @simd_c_args(<4 x float> %0)
2930
sil @simd_c_args : $@convention(c) (float4) -> float4 {
3031
entry(%x : $float4):
3132
return %x : $float4
@@ -47,6 +48,7 @@ entry(%x : $float4):
4748
// powerpc64-LABEL: define{{( dllexport)?}}{{( protected)?}} <3 x float> @simd_c_args_float3(<3 x float> %0)
4849
// powerpc64le-LABEL: define{{( dllexport)?}}{{( protected)?}} <3 x float> @simd_c_args_float3(<3 x float> %0)
4950
// s390x-LABEL: define{{( dllexport)?}}{{( protected)?}} <3 x float> @simd_c_args_float3(<3 x float> %0)
51+
// wasm32-LABEL: define{{( dllexport)?}}{{( protected)?}} <3 x float> @simd_c_args_float3(<3 x float> %0)
5052
sil @simd_c_args_float3 : $@convention(c) (float3) -> float3 {
5153
entry(%x : $float3):
5254
// x86_64: [[COERCE:%.*]] = alloca <3 x float>, align 16
@@ -66,6 +68,7 @@ entry(%x : $float3):
6668
// powerpc64-LABEL: define{{( dllexport)?}}{{( protected)?}} void @simd_native_args(ptr noalias nocapture sret({{.*}}) %0, ptr noalias nocapture dereferenceable({{.*}}) %1)
6769
// powerpc64le-LABEL: define{{( dllexport)?}}{{( protected)?}} swiftcc { float, float, float, float } @simd_native_args(float %0, float %1, float %2, float %3)
6870
// s390x-LABEL: define{{( dllexport)?}}{{( protected)?}} swiftcc { float, float, float, float } @simd_native_args(float %0, float %1, float %2, float %3)
71+
// wasm32-LABEL: define{{( dllexport)?}}{{( protected)?}} swiftcc { float, float, float, float } @simd_native_args(float %0, float %1, float %2, float %3)
6972
sil @simd_native_args : $@convention(thin) (float4) -> float4 {
7073
entry(%x : $float4):
7174
%f = function_ref @simd_c_args : $@convention(c) (float4) -> float4
@@ -84,6 +87,7 @@ entry(%x : $float4):
8487
// powerpc64-LABEL: define{{( dllexport)?}}{{( protected)?}} swiftcc { float, float, float } @simd_native_args_float3(float %0, float %1, float %2)
8588
// powerpc64le-LABEL: define{{( dllexport)?}}{{( protected)?}} swiftcc { float, float, float } @simd_native_args_float3(float %0, float %1, float %2)
8689
// s390x-LABEL: define{{( dllexport)?}}{{( protected)?}} swiftcc { float, float, float } @simd_native_args_float3(float %0, float %1, float %2)
90+
// wasm32-LABEL: define{{( dllexport)?}}{{( protected)?}} swiftcc { float, float, float } @simd_native_args_float3(float %0, float %1, float %2)
8791
sil @simd_native_args_float3 : $@convention(thin) (float3) -> float3 {
8892
entry(%x : $float3):
8993
%f = function_ref @simd_c_args_float3 : $@convention(c) (float3) -> float3

0 commit comments

Comments
 (0)