summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/WebAssembly/inline-asm.ll
diff options
context:
space:
mode:
authorDan Gohman <dan433584@gmail.com>2015-12-05 20:03:44 +0000
committerDan Gohman <dan433584@gmail.com>2015-12-05 20:03:44 +0000
commit284384b64090931c793fba3b52e8372c8f0b48ce (patch)
treefcd5aa01f3291bc98ec24ef5716cc4841dd7da23 /llvm/test/CodeGen/WebAssembly/inline-asm.ll
parent1c7692b88188d155eba845838393edb0a3e9435b (diff)
downloadbcm5719-llvm-284384b64090931c793fba3b52e8372c8f0b48ce.tar.gz
bcm5719-llvm-284384b64090931c793fba3b52e8372c8f0b48ce.zip
[WebAssembly] Support inline asm constraints of type i16 and similar.
llvm-svn: 254861
Diffstat (limited to 'llvm/test/CodeGen/WebAssembly/inline-asm.ll')
-rw-r--r--llvm/test/CodeGen/WebAssembly/inline-asm.ll16
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/WebAssembly/inline-asm.ll b/llvm/test/CodeGen/WebAssembly/inline-asm.ll
index e9d2ebf51f6..646ea779dc8 100644
--- a/llvm/test/CodeGen/WebAssembly/inline-asm.ll
+++ b/llvm/test/CodeGen/WebAssembly/inline-asm.ll
@@ -56,6 +56,22 @@ entry:
ret i64 %0
}
+; CHECK-LABEL: X_i16:
+; CHECK: foo $1{{$}}
+; CHECK: i32.store16 $discard=, 0($0), $1{{$}}
+define void @X_i16(i16 * %t) {
+ call void asm sideeffect "foo $0", "=*X,~{dirflag},~{fpsr},~{flags},~{memory}"(i16* %t)
+ ret void
+}
+
+; CHECK-LABEL: X_ptr:
+; CHECK: foo $1{{$}}
+; CHECK: i32.store $discard=, 0($0), $1
+define void @X_ptr(i16 ** %t) {
+ call void asm sideeffect "foo $0", "=*X,~{dirflag},~{fpsr},~{flags},~{memory}"(i16** %t)
+ ret void
+}
+
attributes #0 = { nounwind }
!0 = !{i32 47}
OpenPOWER on IntegriCloud