summaryrefslogtreecommitdiffstats
path: root/llvm/test/CFrontend/inline-asm-mrv.c
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-04-29 05:53:29 +0000
committerChris Lattner <sabre@nondot.org>2008-04-29 05:53:29 +0000
commit141d2dfd430536bc32291c5f8ba4adc56177e77e (patch)
treeb50285cb0b7af94d0e63553519ea9c8c11d8525c /llvm/test/CFrontend/inline-asm-mrv.c
parenta374ea9a351a07cc8ffdf538b29500d07c1353b6 (diff)
downloadbcm5719-llvm-141d2dfd430536bc32291c5f8ba4adc56177e77e.tar.gz
bcm5719-llvm-141d2dfd430536bc32291c5f8ba4adc56177e77e.zip
new testcase for PR2094. The inline asms should not pin allocas to the
stack anymore. llvm-svn: 50397
Diffstat (limited to 'llvm/test/CFrontend/inline-asm-mrv.c')
-rw-r--r--llvm/test/CFrontend/inline-asm-mrv.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/test/CFrontend/inline-asm-mrv.c b/llvm/test/CFrontend/inline-asm-mrv.c
new file mode 100644
index 00000000000..6d1df67af1b
--- /dev/null
+++ b/llvm/test/CFrontend/inline-asm-mrv.c
@@ -0,0 +1,12 @@
+// RUN: %llvmgcc -S %s -o - -O | not grep alloca
+// PR2094
+
+int sad16_sse2(void *v, unsigned char *blk2, unsigned char *blk1,
+ int stride, int h) {
+ int ret;
+ asm volatile( "%0 %1 %2 %3"
+ : "+r" (h), "+r" (blk1), "+r" (blk2)
+ : "r" ((long)stride));
+ asm volatile("set %0 %1" : "=r"(ret) : "r"(blk1));
+ return ret;
+}
OpenPOWER on IntegriCloud