1
;Check 5.5 Parameter Passing --> Stage C --> C.1.cp statement for VA functions.
2
;Note: There are no VFP CPRCs in a variadic procedure.
3
;Check that after %C was sent to stack, we set Next Core Register Number to R4.
5
;This test is simplified IR version of
6
;test-suite/SingleSource/UnitTests/2002-05-02-ManyArguments.c
8
;RUN: llc -mtriple=thumbv7-linux-gnueabihf -float-abi=hard < %s | FileCheck %s
10
@.str = private unnamed_addr constant [13 x i8] c"%d %d %f %i\0A\00", align 1
13
define void @printfn(i32 %a, i16 signext %b, double %C, i8 signext %E) {
15
%conv = sext i16 %b to i32
16
%conv1 = sext i8 %E to i32
17
%call = tail call i32 (i8*, ...)* @printf(
18
i8* getelementptr inbounds ([13 x i8]* @.str, i32 0, i32 0), ; --> R0
21
double %C, ; --> SP, NCRN := R4
22
;CHECK: str r2, [sp, #8]
23
i32 %conv1) ; --> SP+8
27
declare i32 @printf(i8* nocapture, ...)