1 ; Verify that i32 argument/return values are extended to i64
3 ; RUN: llc -verify-machineinstrs < %s | FileCheck %s
4 target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:128:128-v128:128:128-n32:64"
5 target triple = "powerpc64-unknown-linux-gnu"
7 @si = common global i32 0, align 4
8 @ui = common global i32 0, align 4
10 declare void @arg_si(i32 signext)
11 declare void @arg_ui(i32 zeroext)
13 declare signext i32 @ret_si()
14 declare zeroext i32 @ret_ui()
16 define void @pass_arg_si() nounwind {
18 %0 = load i32, i32* @si, align 4
19 tail call void @arg_si(i32 signext %0) nounwind
26 define void @pass_arg_ui() nounwind {
28 %0 = load i32, i32* @ui, align 4
29 tail call void @arg_ui(i32 zeroext %0) nounwind
36 define i64 @use_arg_si(i32 signext %x) nounwind readnone {
38 %conv = sext i32 %x to i64
45 define i64 @use_arg_ui(i32 zeroext %x) nounwind readnone {
47 %conv = zext i32 %x to i64
54 define signext i32 @pass_ret_si() nounwind readonly {
56 %0 = load i32, i32* @si, align 4
63 define zeroext i32 @pass_ret_ui() nounwind readonly {
65 %0 = load i32, i32* @ui, align 4
72 define i64 @use_ret_si() nounwind {
74 %call = tail call signext i32 @ret_si() nounwind
75 %conv = sext i32 %call to i64
80 ; This is to verify the return register (3) set up by the ret_si
81 ; call is passed on unmodified as return value of use_ret_si.
85 define i64 @use_ret_ui() nounwind {
87 %call = tail call zeroext i32 @ret_ui() nounwind
88 %conv = zext i32 %call to i64
93 ; This is to verify the return register (3) set up by the ret_ui
94 ; call is passed on unmodified as return value of use_ret_ui.