summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/X86/unknown-location.ll
diff options
context:
space:
mode:
authorrdivacky <rdivacky@FreeBSD.org>2010-05-27 15:15:58 +0000
committerrdivacky <rdivacky@FreeBSD.org>2010-05-27 15:15:58 +0000
commit1e3dec662ea18131c495db50caccc57f77b7a5fe (patch)
tree9fad9a5d5dd8c4ff54af48edad9c8cc26dd5fda1 /test/CodeGen/X86/unknown-location.ll
parent377552607e51dc1d3e6ff33833f9620bcfe815ac (diff)
downloadFreeBSD-src-1e3dec662ea18131c495db50caccc57f77b7a5fe.zip
FreeBSD-src-1e3dec662ea18131c495db50caccc57f77b7a5fe.tar.gz
Update LLVM to r104832.
Diffstat (limited to 'test/CodeGen/X86/unknown-location.ll')
-rw-r--r--test/CodeGen/X86/unknown-location.ll34
1 files changed, 34 insertions, 0 deletions
diff --git a/test/CodeGen/X86/unknown-location.ll b/test/CodeGen/X86/unknown-location.ll
new file mode 100644
index 0000000..fa98b78
--- /dev/null
+++ b/test/CodeGen/X86/unknown-location.ll
@@ -0,0 +1,34 @@
+; RUN: llc < %s -asm-verbose=false -march=x86-64 -use-unknown-locations | FileCheck %s
+
+; The divide instruction does not have a debug location. CodeGen should
+; represent this in the debug information. This is checked by a check
+; for a label between the code for the add and the code for the divide,
+; which indicates that the add's location doesn't spill over unto the
+; divide.
+
+; CHECK: leal (%rdi,%rsi), %eax
+; CHECK-NEXT: Ltmp
+; CHECK-NEXT: cltd
+; CHECK-NEXT: idivl %r8d
+; CHECK-NEXT: Ltmp
+; CHECK-NEXT: addl %ecx, %eax
+; CHECK-NEXT: ret
+; CHECK-NEXT: Ltmp
+
+define i32 @foo(i32 %w, i32 %x, i32 %y, i32 %z) nounwind {
+entry:
+ %a = add i32 %w, %x, !dbg !8
+ %b = sdiv i32 %a, %y
+ %c = add i32 %b, %z, !dbg !8
+ ret i32 %c, !dbg !8
+}
+
+!0 = metadata !{i32 524545, metadata !1, metadata !"x", metadata !2, i32 1, metadata !6} ; [ DW_TAG_arg_variable ]
+!1 = metadata !{i32 524334, i32 0, metadata !2, metadata !"foo", metadata !"foo", metadata !"foo", metadata !2, i32 1, metadata !4, i1 false, i1 true, i32 0, i32 0, null, i1 false, i1 false} ; [ DW_TAG_subprogram ]
+!2 = metadata !{i32 524329, metadata !"test.c", metadata !"/dir", metadata !3} ; [ DW_TAG_file_type ]
+!3 = metadata !{i32 524305, i32 0, i32 12, metadata !"test.c", metadata !".", metadata !"producer", i1 true, i1 false, metadata !"", i32 0} ; [ DW_TAG_compile_unit ]
+!4 = metadata !{i32 524309, metadata !2, metadata !"", metadata !2, i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !5, i32 0, null} ; [ DW_TAG_subroutine_type ]
+!5 = metadata !{metadata !6}
+!6 = metadata !{i32 524324, metadata !2, metadata !"int", metadata !2, i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ]
+!7 = metadata !{i32 524299, metadata !1, i32 1, i32 30} ; [ DW_TAG_lexical_block ]
+!8 = metadata !{i32 4, i32 3, metadata !7, null}
OpenPOWER on IntegriCloud