xref: /minix3/external/bsd/llvm/dist/clang/test/Headers/altivec-intrin.c (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -triple powerpc64le-unknown-linux-gnu -target-cpu power8 \
2*0a6a1f1dSLionel Sambuc // RUN:     -faltivec -verify %s
3*0a6a1f1dSLionel Sambuc 
4*0a6a1f1dSLionel Sambuc // Test special behavior of Altivec intrinsics in this file.
5*0a6a1f1dSLionel Sambuc 
6*0a6a1f1dSLionel Sambuc #include <altivec.h>
7*0a6a1f1dSLionel Sambuc 
8*0a6a1f1dSLionel Sambuc __attribute__((__aligned__(16))) float x[20];
9*0a6a1f1dSLionel Sambuc 
main()10*0a6a1f1dSLionel Sambuc int main()
11*0a6a1f1dSLionel Sambuc {
12*0a6a1f1dSLionel Sambuc   vector unsigned char l = vec_lvsl (0, &x[1]); // expected-warning {{is deprecated: use assignment for unaligned little endian loads/stores}}
13*0a6a1f1dSLionel Sambuc   vector unsigned char r = vec_lvsr (0, &x[1]); // expected-warning {{is deprecated: use assignment for unaligned little endian loads/stores}}
14*0a6a1f1dSLionel Sambuc }
15*0a6a1f1dSLionel Sambuc // FIXME: As noted in ms-intrin.cpp, it would be nice if we didn't have to
16*0a6a1f1dSLionel Sambuc // hard-code the line number from altivec.h here.
17*0a6a1f1dSLionel Sambuc // expected-note@altivec.h:2389 {{deprecated here}}
18*0a6a1f1dSLionel Sambuc // expected-note@altivec.h:2524 {{deprecated here}}
19