brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.1 KiB · b7149f0 Raw
55 lines · plain
1# RUN: llc %s  --run-pass=x86-fixup-setcc -o - | FileCheck %s2 3## Check the debug-isntr-number transfers from MOVZX32rr8 to the SETCC4## after the mov is replaced with an INSERT_SUBREG, updating the substitutions5## table.6 7# CHECK: debugValueSubstitutions:8# CHECK:  - { srcinst: 1, srcop: 0, dstinst: 2, dstop: 0, subreg: 0 }9 10# CHECK: %[[#]]:gr8 = SETCCr 15, implicit $eflags,  debug-instr-number 211# CHECK: INSERT_SUBREG12# CHECK-NOT: debug-instr-number13# CHECK-NEXT: DBG_INSTR_REF ![[#]], !DIExpression(DW_OP_LLVM_arg, 0), dbg-instr-ref(1, 0)14 15--- |16  source_filename = "reduced.ll"17  target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"18  target triple = "x86_64-unknown-linux-gnu"19 20  define i32 @main(i32 %call2) {21  entry:22    %cmp12 = icmp sgt i32 %call2, 023    %conv13 = zext i1 %cmp12 to i3224      #dbg_value(i32 %conv13, !4, !DIExpression(), !8)25    ret i32 %conv1326  }27 28  !llvm.dbg.cu = !{!0}29  !llvm.module.flags = !{!3}30 31  !0 = distinct !DICompileUnit(language: DW_LANG_C11, file: !1, producer: "clang version 22.0.0git", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, globals: !2, splitDebugInlining: false, nameTableKind: None)32  !1 = !DIFile(filename: "test.c", directory: "/")33  !2 = !{}34  !3 = !{i32 2, !"Debug Info Version", i32 3}35  !4 = !DILocalVariable(name: "v_3", scope: !5, file: !1, line: 10, type: !7)36  !5 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 5, type: !6, scopeLine: 6, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !2, keyInstructions: true)37  !6 = !DISubroutineType(types: !2)38  !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)39  !8 = !DILocation(line: 0, scope: !5)40...41---42name:            main43body:             |44  bb.0.entry:45    liveins: $edi46 47    %0:gr32 = COPY $edi48    TEST32rr %0, %0, implicit-def $eflags49    %1:gr8 = SETCCr 15, implicit $eflags50    %2:gr32 = MOVZX32rr8 killed %1,  debug-instr-number 151    DBG_INSTR_REF !4, !DIExpression(DW_OP_LLVM_arg, 0), dbg-instr-ref(1, 0),  debug-location !852    $eax = COPY %253    RET 0, $eax54...55