1// RUN: %clang_cc1 -triple powerpc64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s -check-prefix=ALL -check-prefix=NORMAL 2// RUN: %clang_cc1 -triple powerpc64-unknown-linux-gnu -emit-llvm -o - -target-abi elfv1-qpx %s | FileCheck %s -check-prefix=ALL -check-prefix=QPX 3 4typedef float v4sf __attribute__((vector_size(16))); 5typedef double v4df __attribute__((vector_size(32))); 6 7struct ssf { v4sf v; }; 8struct sdf { v4df v; }; 9 10struct ssf2 { v4sf v[2]; }; 11struct sdf2 { v4df v[2]; }; 12 13v4sf foo1(struct ssf a, v4sf b, struct ssf2 c) { 14 return a.v + b; 15} 16 17// ALL-LABEL: define <4 x float> @foo1(<4 x float> inreg %a.coerce, <4 x float> %b, [2 x i128] %c.coerce) 18// ALL: ret <4 x float> 19 20v4df foo2(struct sdf a, v4df b, struct sdf2 c) { 21 return a.v + b; 22} 23 24// QPX-LABEL: define <4 x double> @foo2(<4 x double> inreg %a.coerce, <4 x double> %b, [2 x i256] %c.coerce) 25// QPX: ret <4 x double> 26 27// NORMAL-LABEL: define void @foo2(<4 x double>* noalias sret %agg.result, [2 x i128] %a.coerce, <4 x double>*, [4 x i128] %c.coerce) 28// NORMAL: ret void 29 30