brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.6 KiB · f96d83f Raw
56 lines · plain
1# RUN: llc -run-pass=mir-debugify -o - %s | FileCheck --check-prefixes=ALL,VALUE %s2# RUN: llc -run-pass=mir-debugify -debugify-level=locations -o - %s | FileCheck --check-prefixes=ALL --implicit-check-not=dbg_value %s3# RUN: llc -run-pass=mir-debugify,mir-strip-debug,mir-debugify -o - %s | FileCheck --check-prefixes=ALL,VALUE %s4# RUN: llc -run-pass=mir-debugify,mir-strip-debug -o - %s | FileCheck --check-prefix=STRIP %s5 6--- |7  ; ModuleID = 'loc-only.ll'8  source_filename = "loc-only.ll"9 10  ; ALL-LABEL: @test11  define i32 @test(i32 %a, i32 %b) {12    %add = add i32 %a, 213  ; ALL-NEXT:  %add = add i32 %a, 2, !dbg [[L1:![0-9]+]]14  ; VALUE-NEXT: #dbg_value(i32 %add, [[add:![0-9]+]], !DIExpression(), [[L1]]15    %sub = sub i32 %add, %b16  ; ALL-NEXT: %sub = sub i32 %add, %b, !dbg [[L2:![0-9]+]]17  ; VALUE-NEXT: #dbg_value(i32 %sub, [[sub:![0-9]+]], !DIExpression(), [[L2]]18  ; ALL-NEXT: ret i32 %sub, !dbg [[L3:![0-9]+]]19    ret i32 %sub20  }21 22  ; ALL: !llvm.dbg.cu = !{![[CU:[0-9]+]]}23  ; ALL: !llvm.debugify =24  ; ALL: !llvm.module.flags = !{![[VERSION:[0-9]+]]}25  ; ALL: ![[CU]] = distinct !DICompileUnit(26  ; ALL: ![[VERSION]] = !{i32 2, !"Debug Info Version", i32 3}27  ; VALUE: [[VAR1:![0-9]+]] = !DILocalVariable(name: "1"28  ; VALUE: [[VAR2:![0-9]+]] = !DILocalVariable(name: "2"29  ; STRIP-NOT: !llvm.debugify30  ; STRIP-NOT: !llvm.mir.debugify31 32...33---34name:            test35body:             |36  bb.1 (%ir-block.0):37    %0:_(s32) = IMPLICIT_DEF38    %1:_(s32) = IMPLICIT_DEF39    %2:_(s32) = G_CONSTANT i32 240    %3:_(s32) = G_ADD %0, %241    %4:_(s32) = G_SUB %3, %142    ; There's no attempt to have the locations make sense as it's an imaginary43    ; source file anyway. These first three coincide with IR-level information44    ; and therefore use metadata references.45    ; ALL: %0:_(s32) = IMPLICIT_DEF debug-location [[L1]]46    ; VALUE: DBG_VALUE %0(s32), $noreg, [[VAR1]], !DIExpression(), debug-location [[L1]]47    ; ALL: %1:_(s32) = IMPLICIT_DEF debug-location [[L2]]48    ; VALUE: DBG_VALUE %1(s32), $noreg, [[VAR2]], !DIExpression(), debug-location [[L2]]49    ; ALL: %2:_(s32) = G_CONSTANT i32 2, debug-location [[L3]]50    ; VALUE: DBG_VALUE %2(s32), $noreg, [[VAR1]], !DIExpression(), debug-location [[L3]]51    ; ALL: %3:_(s32) = G_ADD %0, %2, debug-location !DILocation(line: 4, column: 1, scope: [[SP:![0-9]+]])52    ; VALUE: DBG_VALUE %3(s32), $noreg, [[VAR1]], !DIExpression(), debug-location !DILocation(line: 453    ; ALL: %4:_(s32) = G_SUB %3, %1, debug-location !DILocation(line: 5, column: 1, scope: [[SP]])54    ; VALUE: DBG_VALUE %4(s32), $noreg, [[VAR1]], !DIExpression(), debug-location !DILocation(line: 555...56