summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/WebAssembly/fast-isel-i24.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/CodeGen/WebAssembly/fast-isel-i24.ll')
-rw-r--r--llvm/test/CodeGen/WebAssembly/fast-isel-i24.ll16
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/WebAssembly/fast-isel-i24.ll b/llvm/test/CodeGen/WebAssembly/fast-isel-i24.ll
new file mode 100644
index 00000000000..d3823f9869b
--- /dev/null
+++ b/llvm/test/CodeGen/WebAssembly/fast-isel-i24.ll
@@ -0,0 +1,16 @@
+; RUN: llc < %s -O0
+; PR36564
+
+; Test that fast-isel properly copes with i24 arguments and return types.
+
+target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
+target triple = "wasm32-unknown-unknown-wasm"
+
+define i24 @add(i24 %x, i24 %y) {
+ %z = add i24 %x, %y
+ ret i24 %z
+}
+
+define i24 @return_zero() {
+ ret i24 0
+}
OpenPOWER on IntegriCloud