summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/WebAssembly/userstack.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/CodeGen/WebAssembly/userstack.ll')
-rw-r--r--llvm/test/CodeGen/WebAssembly/userstack.ll12
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/WebAssembly/userstack.ll b/llvm/test/CodeGen/WebAssembly/userstack.ll
index f4f9e1c9fa7..69cc03813de 100644
--- a/llvm/test/CodeGen/WebAssembly/userstack.ll
+++ b/llvm/test/CodeGen/WebAssembly/userstack.ll
@@ -217,4 +217,16 @@ define void @frameaddress_1() {
ret void
}
+; Test a stack address passed to an inline asm.
+; CHECK-LABEL: inline_asm:
+; CHECK: __stack_pointer
+; CHECK: #APP
+; CHECK-NEXT: # %{{[0-9]+}}{{$}}
+; CHECK-NEXT: #NO_APP
+define void @inline_asm() {
+ %tmp = alloca i8
+ call void asm sideeffect "# %0", "r"(i8* %tmp)
+ ret void
+}
+
; TODO: test over-aligned alloca
OpenPOWER on IntegriCloud