Clang Project

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