1 # RUN: llc -march=hexagon -run-pass hexagon-packetizer %s -o - | FileCheck %s
3 ##############################################################################
4 # This test case is not really hexagon specific, but we use hexagon to get
7 # The goal is to verify that the BUNDLE instruction is getting the first
8 # non-empty debug location among the bundled instructions.
9 ##############################################################################
12 define void @test() { ret void }
14 !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "llvm", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !3, retainedTypes: !3)
15 !1 = distinct !DISubprogram(name: "test", scope: !3, file: !3, line: 1, type: !2, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: true, unit: !0)
16 !2 = !DISubroutineType(types: !3)
18 !5 = !DILocation(line: 126, column: 9, scope: !2)
19 !6 = !DILocation(line: 321, column: 4, scope: !2)
24 tracksRegLiveness: true
28 $r2 = L2_loadri_io $r1, 0, debug-location !5
29 $r3 = L2_loadri_io $r1, 0, debug-location !6
31 $r4 = L2_loadri_io $r1, 0
32 $r5 = L2_loadri_io $r1, 0, debug-location !5
34 $r6 = L2_loadri_io $r1, 0, debug-location !6
35 $r7 = L2_loadri_io $r1, 0
37 $r8 = L2_loadri_io $r1, 0
38 $r9 = L2_loadri_io $r1, 0
41 # CHECK-LABEL: name: test
44 # CHECK-SAME: debug-location [[DL1:!DILocation([^)]+)]]
45 # CHECK-NEXT: L2_loadri_io $r1, 0, debug-location [[DL1]]
46 # CHECK-NEXT: L2_loadri_io $r1, 0, debug-location [[DL2:!DILocation([^)]+)]]
49 # CHECK-SAME: debug-location [[DL1]]
50 # CHECK-NEXT: L2_loadri_io $r1, 0{{$}}
51 # CHECK-NEXT: L2_loadri_io $r1, 0, debug-location [[DL1]]
54 # CHECK-SAME: debug-location [[DL2]]
55 # CHECK-NEXT: L2_loadri_io $r1, 0, debug-location [[DL2]]
57 # No debug-location printouts expected for the last bundle
58 # CHECK-NOT: debug-location