arm-neon-types.c revision 0608f53744ccf88c4d21d6b500f6d23927533ac9
1// RUN: %clang_cc1 -triple thumbv7-apple-darwin10 -target-cpu cortex-a8 -fsyntax-only -Wvector-conversions -verify %s
2
3#include <arm_neon.h>
4
5// Radar 8228022: Should not report incompatible vector types.
6int32x2_t test(int32x2_t x) {
7  return vshr_n_s32(x, 31);
8}
9
10// ...but should warn when the types really do not match.
11float32x2_t test2(uint32x2_t x) {
12  return vcvt_n_f32_s32(x, 0); // expected-warning {{incompatible vector types}}
13}
14