Debian Codegraph @

llvm-project/llvm/projects/llvm-spirv/test/DebugInfo/X86/vector.ll

raw
1 ; RUN: llvm-as < %s -o %t.bc
2 ; RUN: llvm-spirv %t.bc -o %t.spv
3 ; RUN: llvm-spirv -r -emit-opaque-pointers %t.spv -o - | llvm-dis -o %t.ll
4
5 ; RUN: llc -mtriple=x86_64-linux-gnu -O0 -filetype=obj -o %t %t.ll
6 ; RUN: llvm-dwarfdump -debug-info %t | FileCheck %s
7
8 ; RUN: llvm-spirv %t.bc -o %t.spv -spirv-debug-info-version=nonsemantic-shader-100
9 ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
10 ; RUN: llc -mtriple=x86_64-linux-gnu -O0 -filetype=obj -o %t %t.ll
11 ; RUN: llvm-dwarfdump -debug-info %t | FileCheck %s
12
13 ; RUN: llvm-spirv %t.bc -o %t.spv -spirv-debug-info-version=nonsemantic-shader-200
14 ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
15 ; RUN: llc -mtriple=x86_64-linux-gnu -O0 -filetype=obj -o %t %t.ll
16 ; RUN: llvm-dwarfdump -debug-info %t | FileCheck %s
17
18 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"
19 target triple = "spir64-unknown-unknown"
20
21 ; Generated from:
22 ; clang -g -S -emit-llvm -o foo.ll foo.c
23 ; typedef int v4si __attribute__((__vector_size__(16)));
24 ;
25 ; v4si a
26
27 source_filename = "test/DebugInfo/X86/vector.ll"
28
29 @a = common addrspace(1) global <4 x i32> zeroinitializer, align 16, !dbg !0
30
31 !llvm.dbg.cu = !{!8}
32 !llvm.module.flags = !{!11}
33
34 !0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
35 !1 = !DIGlobalVariable(name: "a", scope: null, file: !2, line: 3, type: !3, isLocal: false, isDefinition: true)
36 !2 = !DIFile(filename: "foo.c", directory: "/Users/echristo")
37 !3 = !DIDerivedType(tag: DW_TAG_typedef, name: "v4si", file: !2, line: 1, baseType: !4)
38 !4 = !DICompositeType(tag: DW_TAG_array_type, baseType: !5, size: 128, align: 128, flags: DIFlagVector, elements: !6)
39 !5 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
40 !6 = !{!7}
41 !7 = !DISubrange(count: 4)
42 !8 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, producer: "clang version 3.3 (trunk 171825) (llvm/trunk 171822)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !9, retainedTypes: !9, globals: !10, imports: !9)
43 !9 = !{}
44 ; Check that we get an array type with a vector attribute.
45 ; CHECK: DW_TAG_array_type
46 ; CHECK-NEXT: DW_AT_GNU_vector
47 !10 = !{!0}
48 !11 = !{i32 1, !"Debug Info Version", i32 3}