summaryrefslogtreecommitdiff
path: root/test/capability-integers.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/capability-integers.ll')
-rw-r--r--test/capability-integers.ll27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/capability-integers.ll b/test/capability-integers.ll
new file mode 100644
index 0000000..d5679e5
--- /dev/null
+++ b/test/capability-integers.ll
@@ -0,0 +1,27 @@
+; RUN: llvm-as < %s | llvm-spirv -spirv-text -o %t
+; RUN: FileCheck < %t %s
+
+; CHECK-DAG: Capability Int8
+; CHECK-DAG: Capability Int16
+; CHECK-DAG: Capability Int64
+
+; CHECK-DAG: TypeInt {{[0-9]+}} 8 0
+; CHECK-DAG: TypeInt {{[0-9]+}} 16 0
+; CHECK-DAG: TypeInt {{[0-9]+}} 64 0
+
+target datalayout = "e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024"
+target triple = "spir"
+
+@a = addrspace(1) global i8 0, align 1
+@b = addrspace(1) global i16 0, align 2
+@c = addrspace(1) global i64 0, align 8
+
+!opencl.enable.FP_CONTRACT = !{}
+!opencl.ocl.version = !{!0}
+!opencl.spir.version = !{!0}
+!opencl.used.extensions = !{!1}
+!opencl.used.optional.core.features = !{!1}
+!opencl.compiler.options = !{!1}
+
+!0 = !{i32 2, i32 0}
+!1 = !{}