llvm/test/CodeGen/SPIRV/legalize-zero-size-arrays-nested.ll
raw| 1 | ; RUN: opt -S -passes=spirv-legalize-zero-size-arrays -mtriple=spirv64-unknown-unknown < %s | FileCheck %s |
| 2 | ; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv64-unknown-unknown %s -o - -filetype=obj | spirv-val %} |
| 3 | |
| 4 | ; Test that nested zero-size arrays are legalized to a pointer. |
| 5 | |
| 6 | @nested_zero_array = global [2 x [0 x i32]] zeroinitializer |
| 7 | |
| 8 | ; CHECK: @nested_zero_array = global ptr addrspace(4) null |