brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.1 KiB · 8787d85 Raw
96 lines · plain
1# RUN: llc %s -o - -run-pass=early-tailduplication | FileCheck %s --check-prefixes=CHECK,DEBUG2# RUN: llc %s -o - -run-pass=mir-strip-debug,early-tailduplication -mir-strip-debugify-only=0 | FileCheck %s --check-prefix=CHECK3 4# We should get the same result with and without debug information.5# Specifically, the register class of [[COPY]] should not be changed to6# gpr32common with debug info while staying as gpr32sp without.7 8--- |9  target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"10  target triple = "aarch64-none-linux-gnu"11 12  define void @test() !dbg !8 {13  entry:14    ret void15  }16 17  !llvm.dbg.cu = !{!0}18  !llvm.module.flags = !{!2, !3, !4, !5}19  !llvm.ident = !{!6}20 21  !0 = distinct !DICompileUnit(language: DW_LANG_C11, file: !1, producer: "My compiler", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None)22  !1 = !DIFile(filename: "foo.c", directory: "/bar")23  !2 = !{i32 7, !"Dwarf Version", i32 4}24  !3 = !{i32 2, !"Debug Info Version", i32 3}25  !4 = !{i32 1, !"wchar_size", i32 1}26  !5 = !{i32 7, !"frame-pointer", i32 2}27  !6 = !{!"My compiler"}28  !7 = !DILocalVariable(name: "i", scope: !8, file: !1, line: 6, type: !12)29  !8 = distinct !DISubprogram(name: "test", scope: !1, file: !1, line: 5, type: !9, scopeLine: 5, flags: DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !11)30  !9 = !DISubroutineType(types: !10)31  !10 = !{null}32  !11 = !{!7}33  !12 = !DIBasicType(name: "int", size: 16, encoding: DW_ATE_signed)34  !13 = !DILocation(line: 0, scope: !8)35...36---37name:            test38tracksRegLiveness: true39liveins:         []40body:             |41  ; CHECK-LABEL: name: test42  ; CHECK: bb.0:43  ; CHECK-NEXT:   successors: %bb.2(0x40000000), %bb.1(0x40000000)44  ; CHECK-NEXT:   liveins: $w0, $wzr45  ; CHECK-NEXT: {{  $}}46  ; CHECK-NEXT:   [[COPY:%[0-9]+]]:gpr32sp = COPY $w047  ; CHECK-NEXT:   CBNZW $wzr, %bb.248  ; CHECK-NEXT: {{  $}}49  ; CHECK-NEXT: bb.1:50  ; CHECK-NEXT:   successors: %bb.4(0x80000000)51  ; CHECK-NEXT: {{  $}}52  ; CHECK-NEXT:   $x0 = COPY undef $x053  ; DEBUG-NEXT:   DBG_VALUE [[COPY]], $noreg, !11, !DIExpression(), debug-location !DILocation(line: 0, scope: !7)54  ; CHECK-NEXT:   [[COPY1:%[0-9]+]]:gpr32 = COPY [[COPY]]55  ; CHECK-NEXT:   B %bb.456  ; CHECK-NEXT: {{  $}}57  ; CHECK-NEXT: bb.2:58  ; CHECK-NEXT:   successors: %bb.4(0x80000000)59  ; CHECK-NEXT: {{  $}}60  ; DEBUG-NEXT:   DBG_VALUE [[COPY]], $noreg, !11, !DIExpression(), debug-location !DILocation(line: 0, scope: !7)61  ; CHECK-NEXT:   [[COPY2:%[0-9]+]]:gpr32 = COPY [[COPY]]62  ; CHECK-NEXT: {{  $}}63  ; CHECK-NEXT: bb.4:64  ; CHECK-NEXT:   RET undef $lr, implicit undef $w065  bb.0:66    successors: %bb.2, %bb.167    liveins: $w0, $wzr68 69    %1:gpr32sp = COPY $w070    CBNZW $wzr, %bb.271 72  bb.1:73    successors: %bb.374 75    $x0 = COPY undef $x076    B %bb.377 78  bb.2:79    successors: %bb.380 81  bb.3:82    successors: %bb.583 84    %2:gpr32 = PHI %1, %bb.1, %1, %bb.285    DBG_VALUE %2, $noreg, !7, !DIExpression(), debug-location !1386    B %bb.587 88  bb.4:89    RET undef $lr, implicit undef $w090 91  bb.5:92    successors: %bb.493 94    B %bb.495...96