| 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 < %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 |
; PR 5942 |
| 10 |
define i8* @foo() nounwind { |
| 11 |
entry: |
| 12 |
%0 = load i32, i32* undef, align 4, !dbg !0 ; <i32> [#uses=1] |
| 13 |
%1 = inttoptr i32 %0 to i8*, !dbg !0 ; <i8*> [#uses=1] |
| 14 |
ret i8* %1, !dbg !10 |
| 15 |
|
| 16 |
} |
| 17 |
|
| 18 |
!llvm.dbg.cu = !{!3} |
| 19 |
!llvm.module.flags = !{!14} |
| 20 |
|
| 21 |
!0 = !DILocation(line: 571, column: 3, scope: !1) |
| 22 |
!1 = distinct !DILexicalBlock(line: 1, column: 1, file: !11, scope: !2) |
| 23 |
!2 = distinct !DISubprogram(name: "foo", linkageName: "foo", file: !11, line: 561, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !3, scope: !3, type: !4) |
| 24 |
!3 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang 1.1", isOptimized: true, emissionKind: FullDebug, file: !11, enums: !12, retainedTypes: !12) |
| 25 |
!4 = !DISubroutineType(types: !5) |
| 26 |
!5 = !{!6} |
| 27 |
!6 = !DIBasicType(tag: DW_TAG_base_type, name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char) |
| 28 |
!10 = !DILocation(line: 588, column: 1, scope: !2) |
| 29 |
!11 = !DIFile(filename: "hashtab.c", directory: "/usr/src/gnu/usr.bin/cc/cc_tools/../../../../contrib/gcclibs/libiberty") |
| 30 |
!12 = !{} |
| 31 |
!14 = !{i32 1, !"Debug Info Version", i32 3} |