[PATCH] D75974: [DebugInfo] Fix build failure on the mingw

Djordje Todorovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 11 03:03:45 PDT 2020


djtodoro updated this revision to Diff 249568.
djtodoro added a comment.

-Improving the test


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75974/new/

https://reviews.llvm.org/D75974

Files:
  llvm/lib/Target/X86/X86InstrInfo.cpp
  llvm/test/DebugInfo/MIR/X86/call-site-param-mov16.mir


Index: llvm/test/DebugInfo/MIR/X86/call-site-param-mov16.mir
===================================================================
--- /dev/null
+++ llvm/test/DebugInfo/MIR/X86/call-site-param-mov16.mir
@@ -0,0 +1,53 @@
+# RUN: llc -emit-call-site-info -start-after=machineverifier -filetype=obj -o - %s \
+# RUN:     | llvm-dwarfdump - | FileCheck %s --implicit-check-not=DW_TAG_GNU_call_site_parameter
+
+--- |
+  target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
+  target triple = "x86_64-w64-windows-gnu"
+  
+  ; Function Attrs: nounwind uwtable
+  define dso_local i32 @b() local_unnamed_addr !dbg !14 {
+  entry:
+    %call = tail call i32 @a(i16 1), !dbg !17
+    ret i32 undef, !dbg !18
+  }
+  
+  declare !dbg !4 dso_local i32 @a(i16) local_unnamed_addr
+  
+  !llvm.dbg.cu = !{!0}
+  !llvm.module.flags = !{!9, !10, !11, !12}
+  !llvm.ident = !{!13}
+  
+  !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 11.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !3, nameTableKind: None)
+  !1 = !DIFile(filename: "1.c", directory: "/")
+  !2 = !{}
+  !3 = !{!4}
+  !4 = !DISubprogram(name: "a", scope: !1, file: !1, line: 1, type: !5, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized, retainedNodes: !2)
+  !5 = !DISubroutineType(types: !6)
+  !6 = !{!7, !8}
+  !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
+  !8 = !DIBasicType(name: "short", size: 16, encoding: DW_ATE_signed)
+  !9 = !{i32 7, !"Dwarf Version", i32 4}
+  !10 = !{i32 2, !"Debug Info Version", i32 3}
+  !11 = !{i32 1, !"wchar_size", i32 2}
+  !12 = !{i32 7, !"PIC Level", i32 2}
+  !13 = !{!"clang version 11.0.0"}
+  !14 = distinct !DISubprogram(name: "b", scope: !1, file: !1, line: 3, type: !15, scopeLine: 3, flags: DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !2)
+  !15 = !DISubroutineType(types: !16)
+  !16 = !{!7}
+  !17 = !DILocation(line: 4, column: 3, scope: !14)
+  !18 = !DILocation(line: 5, column: 1, scope: !14)
+
+...
+---
+name:            b
+alignment:       16
+callSites:
+  - { bb: 0, offset: 1, fwdArgRegs: 
+      - { arg: 0, reg: '$cx' } }
+body:             |
+  bb.0.entry:
+    $cx = MOV16ri 1, debug-location !17
+    TAILJMPd64 @a, csr_win64, implicit $rsp, implicit $ssp, implicit $rsp, implicit $ssp, implicit killed $cx, debug-location !17
+
+...
Index: llvm/lib/Target/X86/X86InstrInfo.cpp
===================================================================
--- llvm/lib/Target/X86/X86InstrInfo.cpp
+++ llvm/lib/Target/X86/X86InstrInfo.cpp
@@ -8270,6 +8270,10 @@
 
     return ParamLoadedValue(*Op, Expr);;
   }
+  case X86::MOV8ri:
+  case X86::MOV16ri:
+    // TODO: Handle MOV8ri and MOV16ri.
+    return None;
   case X86::MOV32ri:
   case X86::MOV64ri:
   case X86::MOV64ri32:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75974.249568.patch
Type: text/x-patch
Size: 2897 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200311/cdcadef7/attachment.bin>


More information about the llvm-commits mailing list