1 // RUN: %clang_cc1 -triple nvptx-unknown-unknown -O3 -S -o - %s -emit-llvm | FileCheck %s
2 // RUN: %clang_cc1 -triple nvptx64-unknown-unknown -O3 -S -o - %s -emit-llvm | FileCheck %s
4 void constraints(void) {
12 unsigned long long ull
;
16 // CHECK: i8 asm sideeffect "mov.b8 $0, $1;", "=c,c"
17 asm volatile ("mov.b8 %0, %1;" : "=c"(c
) : "c"(c
));
18 // CHECK: i8 asm sideeffect "mov.b8 $0, $1;", "=c,c"
19 asm volatile ("mov.b8 %0, %1;" : "=c"(uc
) : "c"(uc
));
21 // CHECK: i16 asm sideeffect "mov.b16 $0, $1;", "=h,h"
22 asm volatile ("mov.b16 %0, %1;" : "=h"(s
) : "h"(s
));
23 // CHECK: i16 asm sideeffect "mov.b16 $0, $1;", "=h,h"
24 asm volatile ("mov.b16 %0, %1;" : "=h"(us
) : "h"(us
));
26 // CHECK: i32 asm sideeffect "mov.b32 $0, $1;", "=r,r"
27 asm volatile ("mov.b32 %0, %1;" : "=r"(i
) : "r"(i
));
28 // CHECK: i32 asm sideeffect "mov.b32 $0, $1;", "=r,r"
29 asm volatile ("mov.b32 %0, %1;" : "=r"(ui
) : "r"(ui
));
31 // CHECK: i64 asm sideeffect "mov.b64 $0, $1;", "=l,l"
32 asm volatile ("mov.b64 %0, %1;" : "=l"(ll
) : "l"(ll
));
33 // CHECK: i64 asm sideeffect "mov.b64 $0, $1;", "=l,l"
34 asm volatile ("mov.b64 %0, %1;" : "=l"(ull
) : "l"(ull
));
36 // CHECK: float asm sideeffect "mov.b32 $0, $1;", "=f,f"
37 asm volatile ("mov.b32 %0, %1;" : "=f"(f
) : "f"(f
));
38 // CHECK: double asm sideeffect "mov.b64 $0, $1;", "=d,d"
39 asm volatile ("mov.b64 %0, %1;" : "=d"(d
) : "d"(d
));