Skip to content

Commit e26ed9a

Browse files
[test][IRGen] Add wasm32 support in c_layout.sil
1 parent bf45c55 commit e26ed9a

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

test/IRGen/c_layout.sil

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,22 @@ bb0:
337337
// CHECK-s390x-LABEL: declare{{( dllimport)?}} signext i32 @ints(i32 signext)
338338
// CHECK-s390x-LABEL: declare{{( dllimport)?}} zeroext i32 @unsigneds(i32 zeroext)
339339

340+
// CHECK-wasm32-LABEL: define swiftcc void @testIntegerExtension(i8 %0, i8 %1, i8 %2, i16 %3, i16 %4, i32 %5, i32 %6) #0 {
341+
// CHECK-wasm32: call signext i8 @chareth(i8 signext %0)
342+
// CHECK-wasm32: call signext i8 @signedChareth(i8 signext %1)
343+
// CHECK-wasm32: call zeroext i8 @unsignedChareth(i8 zeroext %2)
344+
// CHECK-wasm32: call signext i16 @eatMyShorts(i16 signext %3)
345+
// CHECK-wasm32: call zeroext i16 @eatMyUnsignedShorts(i16 zeroext %4)
346+
// CHECK-wasm32: call i32 @ints(i32 %5)
347+
// CHECK-wasm32: call i32 @unsigneds(i32 %6)
348+
// CHECK-wasm32-LABEL: declare signext i8 @chareth(i8 signext) #0
349+
// CHECK-wasm32-LABEL: declare signext i8 @signedChareth(i8 signext) #0
350+
// CHECK-wasm32-LABEL: declare zeroext i8 @unsignedChareth(i8 zeroext) #0
351+
// CHECK-wasm32-LABEL: declare signext i16 @eatMyShorts(i16 signext) #0
352+
// CHECK-wasm32-LABEL: declare zeroext i16 @eatMyUnsignedShorts(i16 zeroext) #0
353+
// CHECK-wasm32-LABEL: declare i32 @ints(i32) #0
354+
// CHECK-wasm32-LABEL: declare i32 @unsigneds(i32) #0
355+
340356
sil @testIntegerExtension : $@convention(thin) (CChar, CSignedChar, CUnsignedChar, CShort, CUnsignedShort, CInt, CUnsignedInt) -> () {
341357
entry(%a : $CChar, %b : $CSignedChar, %c : $CUnsignedChar, %d : $CShort, %e : $CUnsignedShort, %f : $CInt, %g : $CUnsignedInt):
342358
%h = function_ref @chareth : $@convention(c) (CChar) -> CChar

0 commit comments

Comments
 (0)