| 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=%triple -O0 < %t.ll -o /dev/null |
| 6 |
|
| 7 |
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" |
| 8 |
target triple = "spir64-unknown-unknown" |
| 9 |
; llc should not crash on this optimized out debug info. |
| 10 |
; PR6588 |
| 11 |
declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone |
| 12 |
|
| 13 |
define void @foo() { |
| 14 |
entry: |
| 15 |
call void @llvm.dbg.declare(metadata i32* undef, metadata !0, metadata !DIExpression()), !dbg !DILocation(scope: !1) |
| 16 |
ret void |
| 17 |
} |
| 18 |
|
| 19 |
!llvm.dbg.cu = !{!3} |
| 20 |
!0 = !DILocalVariable(name: "sy", line: 890, arg: 1, scope: !1, file: !2, type: !7) |
| 21 |
!1 = distinct !DISubprogram(name: "foo", linkageName: "foo", line: 892, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !3, file: !8, scope: !3, type: !4) |
| 22 |
!2 = !DIFile(filename: "qpainter.h", directory: "QtGui") |
| 23 |
!3 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang 1.1", isOptimized: true, emissionKind: FullDebug, file: !9, enums: !10, retainedTypes: !10) |
| 24 |
!4 = !DISubroutineType(types: !6) |
| 25 |
!5 = !DIFile(filename: "splineeditor.cpp", directory: "src") |
| 26 |
!6 = !{null} |
| 27 |
!7 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) |
| 28 |
!8 = !DIFile(filename: "qpainter.h", directory: "QtGui") |
| 29 |
!9 = !DIFile(filename: "splineeditor.cpp", directory: "src") |
| 30 |
!10 = !{i32 0} |