summaryrefslogtreecommitdiffstats
path: root/test/CodeGen
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2012-03-15 23:12:51 +0000
committerEli Friedman <eli.friedman@gmail.com>2012-03-15 23:12:51 +0000
commita43ef3e0511dc48d98d61598163c9deddc09cb9c (patch)
tree106281859900054aaedc772d960893e83cedc643 /test/CodeGen
parent64f678eab13b5de9dcebf13d973fbc4731eb1bfd (diff)
When a variable has a specified asm name, but isn't using the register storage class, the asm name doesn't specify a register. PR12244.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152873 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r--test/CodeGen/asm-variable.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/CodeGen/asm-variable.c b/test/CodeGen/asm-variable.c
index a37132d16c..dc087bd9e2 100644
--- a/test/CodeGen/asm-variable.c
+++ b/test/CodeGen/asm-variable.c
@@ -57,3 +57,9 @@ unsigned long long foo2(unsigned long long addr, double a0,
}
// CHECK: call i64 asm "call *$1", "={rax},r,{xmm0},{xmm1},{xmm2},{xmm3},{xmm4},{xmm5},{xmm6},{xmm7},~{dirflag},~{fpsr},~{flags}
+
+int randomvar asm("randomvar");
+void foo3() {
+ asm("vartest %0" : : "r"(randomvar));
+}
+// CHECK: call void asm sideeffect "vartest $0", "r,~{dirflag},~{fpsr},~{flags}"