Skip to content

Commit 4fb2310

Browse files
committed
test: Fix IRGen/c_layout.sil to work on powerpc64{le}
1 parent 421d099 commit 4fb2310

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

test/IRGen/c_layout.sil

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,38 @@ bb0:
205205
// CHECK-arm64-LABEL: declare i32 @ints(i32)
206206
// CHECK-arm64-LABEL: declare i32 @unsigneds(i32)
207207

208+
// CHECK-powerpc64-LABEL: define{{( protected)?}} void @testIntegerExtension
209+
// CHECK-powerpc64: call zeroext i8 @chareth(i8 zeroext %0)
210+
// CHECK-powerpc64: call zeroext i8 @signedChareth(i8 zeroext %1)
211+
// CHECK-powerpc64: call zeroext i8 @unsignedChareth(i8 zeroext %2)
212+
// CHECK-powerpc64: call signext i16 @eatMyShorts(i16 signext %3)
213+
// CHECK-powerpc64: call zeroext i16 @eatMyUnsignedShorts(i16 zeroext %4)
214+
// CHECK-powerpc64: call signext i32 @ints(i32 signext %5)
215+
// CHECK-powerpc64: call zeroext i32 @unsigneds(i32 zeroext %6)
216+
// CHECK-powerpc64-LABEL: declare zeroext i8 @chareth(i8 zeroext)
217+
// CHECK-powerpc64-LABEL: declare zeroext i8 @signedChareth(i8 zeroext)
218+
// CHECK-powerpc64-LABEL: declare zeroext i8 @unsignedChareth(i8 zeroext)
219+
// CHECK-powerpc64-LABEL: declare signext i16 @eatMyShorts(i16 signext)
220+
// CHECK-powerpc64-LABEL: declare zeroext i16 @eatMyUnsignedShorts(i16 zeroext)
221+
// CHECK-powerpc64-LABEL: declare signext i32 @ints(i32 signext)
222+
// CHECK-powerpc64-LABEL: declare zeroext i32 @unsigneds(i32 zeroext)
223+
224+
// CHECK-powerpc64le-LABEL: define{{( protected)?}} void @testIntegerExtension
225+
// CHECK-powerpc64le: call zeroext i8 @chareth(i8 zeroext %0)
226+
// CHECK-powerpc64le: call zeroext i8 @signedChareth(i8 zeroext %1)
227+
// CHECK-powerpc64le: call zeroext i8 @unsignedChareth(i8 zeroext %2)
228+
// CHECK-powerpc64le: call signext i16 @eatMyShorts(i16 signext %3)
229+
// CHECK-powerpc64le: call zeroext i16 @eatMyUnsignedShorts(i16 zeroext %4)
230+
// CHECK-powerpc64le: call signext i32 @ints(i32 signext %5)
231+
// CHECK-powerpc64le: call zeroext i32 @unsigneds(i32 zeroext %6)
232+
// CHECK-powerpc64le-LABEL: declare zeroext i8 @chareth(i8 zeroext)
233+
// CHECK-powerpc64le-LABEL: declare zeroext i8 @signedChareth(i8 zeroext)
234+
// CHECK-powerpc64le-LABEL: declare zeroext i8 @unsignedChareth(i8 zeroext)
235+
// CHECK-powerpc64le-LABEL: declare signext i16 @eatMyShorts(i16 signext)
236+
// CHECK-powerpc64le-LABEL: declare zeroext i16 @eatMyUnsignedShorts(i16 zeroext)
237+
// CHECK-powerpc64le-LABEL: declare signext i32 @ints(i32 signext)
238+
// CHECK-powerpc64le-LABEL: declare zeroext i32 @unsigneds(i32 zeroext)
239+
208240
sil @testIntegerExtension : $@convention(thin) (CChar, CSignedChar, CUnsignedChar, CShort, CUnsignedShort, CInt, CUnsignedInt) -> () {
209241
entry(%a : $CChar, %b : $CSignedChar, %c : $CUnsignedChar, %d : $CShort, %e : $CUnsignedShort, %f : $CInt, %g : $CUnsignedInt):
210242
%h = function_ref @chareth : $@convention(c) (CChar) -> CChar

0 commit comments

Comments
 (0)