[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / CodeGen / nvptx-inlineasm.c
blob860b50ff5852e498f2c0609f6692b20b7c525f40
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 int bar(int a) {
5 int result;
6 // CHECK: call i32 asm sideeffect "{ {{.*}}
7 asm __volatile__ ("{ \n\t"
8 ".reg .pred \t%%p1; \n\t"
9 ".reg .pred \t%%p2; \n\t"
10 "setp.ne.u32 \t%%p1, %1, 0; \n\t"
11 "vote.any.pred \t%%p2, %%p1; \n\t"
12 "selp.s32 \t%0, 1, 0, %%p2; \n\t"
13 "}" : "=r"(result) : "r"(a));
14 return result;