diff options
Diffstat (limited to 'llvm/test/CodeGen/SPIRV/zero-length-array.ll')
-rw-r--r-- | llvm/test/CodeGen/SPIRV/zero-length-array.ll | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/SPIRV/zero-length-array.ll b/llvm/test/CodeGen/SPIRV/zero-length-array.ll new file mode 100644 index 0000000..668bf20 --- /dev/null +++ b/llvm/test/CodeGen/SPIRV/zero-length-array.ll @@ -0,0 +1,12 @@ +; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s +; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv64-unknown-unknown %s -o - -filetype=obj | spirv-val %} + +; CHECK: %[[#type:]] = OpTypeInt 32 0 +; CHECK: %[[#ext:]] = OpTypeRuntimeArray %[[#type]] +; CHECK: %[[#]] = OpTypePointer Function %[[#ext]] + +define spir_func void @_Z3foov() { +entry: + %i = alloca [0 x i32], align 4 + ret void +} |