diff options
author | Justin Holewinski <justin.holewinski@gmail.com> | 2012-07-11 15:34:55 +0000 |
---|---|---|
committer | Justin Holewinski <justin.holewinski@gmail.com> | 2012-07-11 15:34:55 +0000 |
commit | 5fafdd9d1ddd982224db84699484d76000943c02 (patch) | |
tree | 7806b3946d0081ebd9db622e7d0f521bbc9350e7 /clang/test/CodeGen/nvptx-inlineasm.c | |
parent | f8b9809fab41b1ab5da7dd4815bb04b1ef7c7b69 (diff) | |
download | bcm5719-llvm-5fafdd9d1ddd982224db84699484d76000943c02.tar.gz bcm5719-llvm-5fafdd9d1ddd982224db84699484d76000943c02.zip |
Fix handling of curly braces in NVPTX inline asm
Fixes bug 13322
Patch by Dmitry Mikushin
llvm-svn: 160050
Diffstat (limited to 'clang/test/CodeGen/nvptx-inlineasm.c')
-rw-r--r-- | clang/test/CodeGen/nvptx-inlineasm.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/test/CodeGen/nvptx-inlineasm.c b/clang/test/CodeGen/nvptx-inlineasm.c new file mode 100644 index 00000000000..860b50ff585 --- /dev/null +++ b/clang/test/CodeGen/nvptx-inlineasm.c @@ -0,0 +1,15 @@ +// RUN: %clang_cc1 -triple nvptx-unknown-unknown -O3 -S -o - %s -emit-llvm | FileCheck %s +// RUN: %clang_cc1 -triple nvptx64-unknown-unknown -O3 -S -o - %s -emit-llvm | FileCheck %s + +int bar(int a) { + int result; + // CHECK: call i32 asm sideeffect "{ {{.*}} + asm __volatile__ ("{ \n\t" + ".reg .pred \t%%p1; \n\t" + ".reg .pred \t%%p2; \n\t" + "setp.ne.u32 \t%%p1, %1, 0; \n\t" + "vote.any.pred \t%%p2, %%p1; \n\t" + "selp.s32 \t%0, 1, 0, %%p2; \n\t" + "}" : "=r"(result) : "r"(a)); + return result; +} |