Debian Codegraph @

llvm-project/llvm/projects/llvm-spirv/test/align-duplicate.ll

raw
1 ; RUN: llvm-as %s -o %t.bc
2 ; RUN: llvm-spirv %t.bc -o %t.spv
3 ; RUN: spirv-val %t.spv
4
5 ; Test that duplicate align information does not result in SPIR-V validation
6 ; errors due to duplicate Alignment Decorations.
7
8 target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-n8:16:32:64"
9 target triple = "spir64-unknown-unknown"
10
11 define spir_func void @f() {
12 %res = alloca i16, align 2, !spirv.Decorations !1
13 ret void
14 }
15
16 !1 = !{!2}
17 !2 = !{i32 44, i32 2}