| 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 -debugger-tune=lldb -asm-verbose -O1 -o - < %t.ll | FileCheck %s |
| 6 |
; RUN: llc -mtriple=%triple -debugger-tune=gdb -asm-verbose -O1 -o - < %t.ll | FileCheck %s --check-prefix=DISABLE |
| 7 |
; RUN: llc -mtriple=%triple -frame-pointer=all -debugger-tune=lldb -asm-verbose -O1 -o - < %t.ll | FileCheck %s --check-prefix=DISABLE |
| 8 |
|
| 9 |
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" |
| 10 |
target triple = "spir64-unknown-unknown" |
| 11 |
|
| 12 |
; CHECK: DW_AT_APPLE_omit_frame_ptr |
| 13 |
; DISABLE-NOT: DW_AT_APPLE_omit_frame_ptr |
| 14 |
|
| 15 |
|
| 16 |
define i32 @foo() nounwind ssp !dbg !1 { |
| 17 |
entry: |
| 18 |
%retval = alloca i32 ; <i32*> [#uses=2] |
| 19 |
%0 = alloca i32 ; <i32*> [#uses=2] |
| 20 |
%"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0] |
| 21 |
store i32 42, i32* %0, align 4, !dbg !0 |
| 22 |
%1 = load i32, i32* %0, align 4, !dbg !0 ; <i32> [#uses=1] |
| 23 |
store i32 %1, i32* %retval, align 4, !dbg !0 |
| 24 |
br label %return, !dbg !0 |
| 25 |
|
| 26 |
return: ; preds = %entry |
| 27 |
%retval1 = load i32, i32* %retval, !dbg !0 ; <i32> [#uses=1] |
| 28 |
ret i32 %retval1, !dbg !7 |
| 29 |
} |
| 30 |
|
| 31 |
!llvm.dbg.cu = !{!3} |
| 32 |
!llvm.module.flags = !{!12} |
| 33 |
!9 = !{!1} |
| 34 |
|
| 35 |
!0 = !DILocation(line: 2, scope: !1) |
| 36 |
!1 = distinct !DISubprogram(name: "foo", linkageName: "foo", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !3, scopeLine: 2, file: !10, scope: null, type: !4) |
| 37 |
!2 = !DIFile(filename: "a.c", directory: "/tmp") |
| 38 |
!3 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: false, emissionKind: FullDebug, file: !10, enums: !11, retainedTypes: !11, imports: null) |
| 39 |
!4 = !DISubroutineType(types: !5) |
| 40 |
!5 = !{!6} |
| 41 |
!6 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) |
| 42 |
!7 = !DILocation(line: 2, scope: !8) |
| 43 |
!8 = distinct !DILexicalBlock(line: 2, column: 0, file: !10, scope: !1) |
| 44 |
!10 = !DIFile(filename: "a.c", directory: "/tmp") |
| 45 |
!11 = !{} |
| 46 |
!12 = !{i32 1, !"Debug Info Version", i32 3} |