xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGen/variadic-gpfp-x86.c (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o - | FileCheck %s
2*0a6a1f1dSLionel Sambuc 
3*0a6a1f1dSLionel Sambuc struct Bar {
4*0a6a1f1dSLionel Sambuc  float f1;
5*0a6a1f1dSLionel Sambuc  float f2;
6*0a6a1f1dSLionel Sambuc  unsigned u;
7*0a6a1f1dSLionel Sambuc };
8*0a6a1f1dSLionel Sambuc 
foo(__builtin_va_list ap)9*0a6a1f1dSLionel Sambuc struct Bar foo(__builtin_va_list ap) {
10*0a6a1f1dSLionel Sambuc   return __builtin_va_arg(ap, struct Bar);
11*0a6a1f1dSLionel Sambuc // CHECK: [[FPOP:%.*]] = getelementptr inbounds %struct.__va_list_tag* {{.*}}, i32 0, i32 1
12*0a6a1f1dSLionel Sambuc // CHECK: [[FPO:%.*]] = load i32* [[FPOP]]
13*0a6a1f1dSLionel Sambuc // CHECK: [[FPVEC:%.*]] = getelementptr i8* {{.*}}, i32 [[FPO]]
14*0a6a1f1dSLionel Sambuc // CHECK: bitcast i8* [[FPVEC]] to <2 x float>*
15*0a6a1f1dSLionel Sambuc }
16