blob: a54a499cf19144f3f03dad8a397cf932c0016426 [file] [log] [blame]
Rafael Espindola72d13ff2010-06-26 18:22:20 +00001; RUN: llc < %s -mtriple=armv7-none-linux-gnueabi | FileCheck %s
2; Test that we correctly align elements when using va_arg
3
4; CHECK: add r0, r0, #7
5; CHECK: bfc r0, #0, #3
6
7define i64 @f8(i32 %i, ...) nounwind optsize {
8entry:
9 %g = alloca i8*, align 4
10 %g1 = bitcast i8** %g to i8*
11 call void @llvm.va_start(i8* %g1)
12 %0 = va_arg i8** %g, i64
13 call void @llvm.va_end(i8* %g1)
14 ret i64 %0
15}
16
17declare void @llvm.va_start(i8*) nounwind
18
19declare void @llvm.va_end(i8*) nounwind