1*f4a2713aSLionel Sambuc // REQUIRES: arm-registered-target
2*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -triple armv7 -target-feature +neon %s -emit-llvm -o /dev/null
3*f4a2713aSLionel Sambuc
4*f4a2713aSLionel Sambuc char bar();
5*f4a2713aSLionel Sambuc
t1(int x,char y)6*f4a2713aSLionel Sambuc void t1(int x, char y) {
7*f4a2713aSLionel Sambuc __asm__ volatile("mcr p15, 0, %1, c9, c12, 5;"
8*f4a2713aSLionel Sambuc "mrc p15, 0, %0, c9, c13, 2;"
9*f4a2713aSLionel Sambuc : "=r" (x)
10*f4a2713aSLionel Sambuc : "r" (bar())); // no warning
11*f4a2713aSLionel Sambuc __asm__ volatile("foo %0, %1"
12*f4a2713aSLionel Sambuc : "+r" (x),
13*f4a2713aSLionel Sambuc "+r" (y)
14*f4a2713aSLionel Sambuc :);
15*f4a2713aSLionel Sambuc __asm__ volatile("ldrb %0, [%1]" : "=r" (y) : "r" (x)); // no warning
16*f4a2713aSLionel Sambuc }
17*f4a2713aSLionel Sambuc
18*f4a2713aSLionel Sambuc // <rdar://problem/12284092>
19*f4a2713aSLionel Sambuc typedef __attribute__((neon_vector_type(2))) long long int64x2_t;
20*f4a2713aSLionel Sambuc typedef struct int64x2x4_t {
21*f4a2713aSLionel Sambuc int64x2_t val[4];
22*f4a2713aSLionel Sambuc } int64x2x4_t;
t2(const long long a[])23*f4a2713aSLionel Sambuc int64x2x4_t t2(const long long a[]) {
24*f4a2713aSLionel Sambuc int64x2x4_t r;
25*f4a2713aSLionel Sambuc __asm__("vldm %[a], { %q[r0], %q[r1], %q[r2], %q[r3] }"
26*f4a2713aSLionel Sambuc : [r0] "=r"(r.val[0]), // expected-warning {{value size does not match register size specified by the constraint and modifier}}
27*f4a2713aSLionel Sambuc [r1] "=r"(r.val[1]), // expected-warning {{value size does not match register size specified by the constraint and modifier}}
28*f4a2713aSLionel Sambuc [r2] "=r"(r.val[2]), // expected-warning {{value size does not match register size specified by the constraint and modifier}}
29*f4a2713aSLionel Sambuc [r3] "=r"(r.val[3]) // expected-warning {{value size does not match register size specified by the constraint and modifier}}
30*f4a2713aSLionel Sambuc : [a] "r"(a));
31*f4a2713aSLionel Sambuc return r;
32*f4a2713aSLionel Sambuc }
33