|
8 | 8 | ; CHECK-LABEL: DW_TAG_subprogram
|
9 | 9 | ; CHECK: DW_AT_name ("test1")
|
10 | 10 | ; CHECK: DW_TAG_variable
|
11 |
| -; CHECK: DW_AT_location (DW_OP_fbreg -1, DW_OP_deref, DW_OP_constu 0x3d, DW_OP_shl, DW_OP_constu 0x3d, DW_OP_shr, DW_OP_stack_value) |
| 11 | +; CHECK: DW_AT_location (DW_OP_fbreg -1, DW_OP_deref_size 0x1, DW_OP_constu 0x3d, DW_OP_shl, DW_OP_constu 0x3d, DW_OP_shr, DW_OP_stack_value) |
12 | 12 | ; CHECK: DW_AT_name ("x")
|
13 | 13 | ; CHECK: DW_TAG_variable
|
14 |
| -; CHECK: DW_AT_location (DW_OP_fbreg -1, DW_OP_deref, DW_OP_constu 0x39, DW_OP_shl, DW_OP_constu 0x3c, DW_OP_shra, DW_OP_stack_value) |
| 14 | +; CHECK: DW_AT_location (DW_OP_fbreg -1, DW_OP_deref_size 0x1, DW_OP_constu 0x39, DW_OP_shl, DW_OP_constu 0x3c, DW_OP_shra, DW_OP_stack_value) |
15 | 15 | ; CHECK: DW_AT_name ("y")
|
16 | 16 |
|
17 | 17 | define i32 @test1() !dbg !13 {
|
@@ -56,6 +56,27 @@ entry:
|
56 | 56 | ret i64 %0, !dbg !26
|
57 | 57 | }
|
58 | 58 |
|
| 59 | +; CHECK-LABEL: DW_TAG_subprogram |
| 60 | +; CHECK: DW_AT_name ("test4") |
| 61 | +; CHECK: DW_TAG_variable |
| 62 | +; CHECK: DW_AT_location (DW_OP_fbreg -4, DW_OP_deref_size 0x4, DW_OP_constu 0x20, DW_OP_shl, DW_OP_constu 0x3f, DW_OP_shr, DW_OP_stack_value) |
| 63 | +; CHECK: DW_AT_name ("x") |
| 64 | +; CHECK: DW_TAG_variable |
| 65 | +; CHECK: DW_AT_location (DW_OP_fbreg -4, DW_OP_deref_size 0x4, DW_OP_constu 0x20, DW_OP_shl, DW_OP_constu 0x21, DW_OP_shra, DW_OP_stack_value) |
| 66 | +; CHECK: DW_AT_name ("y") |
| 67 | +; CHECK: DW_TAG_variable |
| 68 | +; CHECK: DW_AT_location (DW_OP_fbreg -4, DW_OP_plus_uconst 0x3, DW_OP_deref_size 0x1, DW_OP_constu 0x38, DW_OP_shl, DW_OP_constu 0x39, DW_OP_shr, DW_OP_stack_value) |
| 69 | +; CHECK: DW_AT_name ("z") |
| 70 | + |
| 71 | +define i32 @test4() !dbg !28 { |
| 72 | +entry: |
| 73 | + %0 = alloca i32, align 4 |
| 74 | + tail call void @llvm.dbg.declare(metadata ptr %0, metadata !29, metadata !DIExpression(DW_OP_LLVM_extract_bits_zext, 31, 1)), !dbg !30 |
| 75 | + tail call void @llvm.dbg.declare(metadata ptr %0, metadata !31, metadata !DIExpression(DW_OP_LLVM_extract_bits_sext, 1, 31)), !dbg !30 |
| 76 | + tail call void @llvm.dbg.declare(metadata ptr %0, metadata !32, metadata !DIExpression(DW_OP_plus_uconst, 3, DW_OP_LLVM_extract_bits_zext, 1, 7)), !dbg !30 |
| 77 | + ret i32 0, !dbg !30 |
| 78 | +} |
| 79 | + |
59 | 80 | declare void @llvm.dbg.declare(metadata, metadata, metadata)
|
60 | 81 | declare void @llvm.dbg.value(metadata, metadata, metadata)
|
61 | 82 |
|
@@ -90,3 +111,8 @@ declare void @llvm.dbg.value(metadata, metadata, metadata)
|
90 | 111 | !25 = !DILocalVariable(name: "x", scope: !24, file: !3, type: !9)
|
91 | 112 | !26 = !DILocation(line: 0, scope: !24)
|
92 | 113 | !27 = !DILocalVariable(name: "y", scope: !24, file: !3, type: !19)
|
| 114 | +!28 = distinct !DISubprogram(name: "test4", linkageName: "test4", scope: !3, file: !3, type: !14, spFlags: DISPFlagDefinition, unit: !2) |
| 115 | +!29 = !DILocalVariable(name: "x", scope: !28, file: !3, type: !9) |
| 116 | +!30 = !DILocation(line: 0, scope: !28) |
| 117 | +!31 = !DILocalVariable(name: "y", scope: !28, file: !3, type: !19) |
| 118 | +!32 = !DILocalVariable(name: "z", scope: !28, file: !3, type: !9) |
0 commit comments