Imported Upstream version 5.18.0.207

Former-commit-id: 3b152f462918d427ce18620a2cbe4f8b79650449
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2018-11-17 08:23:10 +00:00
parent 8e12397d70
commit eb85e2fc17
28480 changed files with 72 additions and 3866936 deletions

View File

@ -1,82 +0,0 @@
; RUN: llc -filetype=asm < %s | FileCheck %s
; RUN: llc -filetype=obj < %s \
; RUN: | llvm-dwarfdump -debug-info - | FileCheck %s --check-prefix=DWARF
;
; CHECK: @DEBUG_VALUE: h:x <- [DW_OP_plus_uconst {{.*}}] [%r{{.*}}+0]
; DWARF: DW_TAG_formal_parameter
; DWARF: DW_AT_location
; DWARF-NEXT: DW_OP_reg0 R0
; DWARF: DW_TAG_formal_parameter
; DWARF: DW_AT_location
; DWARF-NEXT: DW_OP_reg1 R1
; DWARF: DW_TAG_formal_parameter
; DWARF: DW_AT_location
; DWARF-NEXT: DW_OP_reg2 R2
; DWARF: DW_TAG_formal_parameter
; DWARF: DW_AT_location
; DWARF-NEXT: DW_OP_reg3 R3
; DWARF: DW_TAG_formal_parameter
; DWARF: DW_AT_location
; DWARF-NEXT: DW_OP_breg7 R7+8
; generated from:
; clang -cc1 -triple thumbv7 -S -O1 arm.cpp -g
;
; int f();
; void g(float);
; void h(int, int, int, int, float x) {
; g(x = f());
; }
;
target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:64:128-a0:0:32-n32-S64"
target triple = "thumbv7-apple-ios"
; Function Attrs: nounwind
define arm_aapcscc void @_Z1hiiiif(i32, i32, i32, i32, float %x) #0 "no-frame-pointer-elim"="true" !dbg !4 {
entry:
tail call void @llvm.dbg.value(metadata i32 %0, metadata !12, metadata !DIExpression()), !dbg !18
tail call void @llvm.dbg.value(metadata i32 %1, metadata !13, metadata !DIExpression()), !dbg !18
tail call void @llvm.dbg.value(metadata i32 %2, metadata !14, metadata !DIExpression()), !dbg !18
tail call void @llvm.dbg.value(metadata i32 %3, metadata !15, metadata !DIExpression()), !dbg !18
tail call void @llvm.dbg.value(metadata float %x, metadata !16, metadata !DIExpression()), !dbg !18
%call = tail call arm_aapcscc i32 @_Z1fv() #3, !dbg !19
%conv = sitofp i32 %call to float, !dbg !19
tail call void @llvm.dbg.value(metadata float %conv, metadata !16, metadata !DIExpression()), !dbg !19
tail call arm_aapcscc void @_Z1gf(float %conv) #3, !dbg !19
ret void, !dbg !20
}
declare arm_aapcscc void @_Z1gf(float)
declare arm_aapcscc i32 @_Z1fv()
; Function Attrs: nounwind readnone
declare void @llvm.dbg.value(metadata, metadata, metadata) #2
attributes #0 = { nounwind }
attributes #2 = { nounwind readnone }
attributes #3 = { nounwind }
!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!17, !21}
!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 (trunk 190804) (llvm/trunk 190797)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2)
!1 = !DIFile(filename: "/<unknown>", directory: "")
!2 = !{}
!4 = distinct !DISubprogram(name: "h", linkageName: "_Z1hiiiif", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 3, file: !5, scope: !6, type: !7, variables: !11)
!5 = !DIFile(filename: "/arm.cpp", directory: "")
!6 = !DIFile(filename: "/arm.cpp", directory: "")
!7 = !DISubroutineType(types: !8)
!8 = !{null, !9, !9, !9, !9, !10}
!9 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
!10 = !DIBasicType(tag: DW_TAG_base_type, name: "float", size: 32, align: 32, encoding: DW_ATE_float)
!11 = !{!12, !13, !14, !15, !16}
!12 = !DILocalVariable(name: "", line: 3, arg: 1, scope: !4, file: !6, type: !9)
!13 = !DILocalVariable(name: "", line: 3, arg: 2, scope: !4, file: !6, type: !9)
!14 = !DILocalVariable(name: "", line: 3, arg: 3, scope: !4, file: !6, type: !9)
!15 = !DILocalVariable(name: "", line: 3, arg: 4, scope: !4, file: !6, type: !9)
!16 = !DILocalVariable(name: "x", line: 3, arg: 5, scope: !4, file: !6, type: !10)
!17 = !{i32 2, !"Dwarf Version", i32 4}
!18 = !DILocation(line: 3, scope: !4)
!19 = !DILocation(line: 4, scope: !4)
!20 = !DILocation(line: 5, scope: !4)
!21 = !{i32 1, !"Debug Info Version", i32 3}

View File

@ -1,104 +0,0 @@
; RUN: llc -filetype=obj -o - < %s | llvm-dwarfdump -v -debug-info - | FileCheck %s
;
; Checks that we're creating two ranges, one that terminates immediately
; and one that spans the rest of the function. This isn't necessarily the
; best thing to do here (and also not necessarily correct, since the first
; one has a bit_piece), but it is what is currently being emitted, any
; change here needs to be intentional, so the test is very specific.
;
; CHECK: DW_TAG_inlined_subroutine
; CHECK: DW_TAG_variable
; CHECK: DW_AT_location [DW_FORM_sec_offset] ({{.*}}
; CHECK: 0x0000000000000004 - 0x0000000000000004: DW_OP_constu 0x0, DW_OP_stack_value, DW_OP_piece 0x8
; CHECK: 0x0000000000000004 - 0x0000000000000014: DW_OP_constu 0x0, DW_OP_stack_value, DW_OP_piece 0x4)
; Created form the following test case (PR26163) with
; clang -cc1 -triple armv4t--freebsd11.0-gnueabi -emit-obj -debug-info-kind=standalone -O2 -x c test.c
;
; typedef unsigned int size_t;
; struct timeval {
; long long tv_sec;
; int tv_usec;
; };
;
; void *memset(void *, int, size_t);
; void foo(void);
;
; static void
; bar(int value)
; {
; struct timeval lifetime;
;
; memset(&lifetime, 0, sizeof(struct timeval));
; lifetime.tv_sec = value;
;
; foo();
; }
;
; int
; parse_config_file(void)
; {
; int value;
;
; bar(value);
; return (0);
; }
target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
target triple = "armv4t--freebsd11.0-gnueabi"
%struct.timeval = type { i64, i32 }
declare void @llvm.dbg.declare(metadata, metadata, metadata)
declare void @llvm.dbg.value(metadata, metadata, metadata)
declare void @foo()
define i32 @parse_config_file() !dbg !4 {
entry:
tail call void @llvm.dbg.value(metadata i32 0, metadata !15, metadata !26), !dbg !27
tail call void @llvm.dbg.declare(metadata %struct.timeval* undef, metadata !16, metadata !26), !dbg !29
tail call void @llvm.dbg.value(metadata i64 0, metadata !16, metadata !30), !dbg !29
tail call void @llvm.dbg.value(metadata i32 0, metadata !16, metadata !31), !dbg !29
tail call void @foo() #3, !dbg !32
ret i32 0, !dbg !33
}
!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!22, !23, !24}
!llvm.ident = !{!25}
!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.9.0 (https://github.com/llvm-mirror/clang 89dda3855cda574f355e6defa1d77bdae5053994) (llvm/trunk 257891)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
!1 = !DIFile(filename: "<stdin>", directory: "/home/ubuntu/bugs")
!2 = !{}
!4 = distinct !DISubprogram(name: "parse_config_file", scope: !5, file: !5, line: 22, type: !6, isLocal: false, isDefinition: true, scopeLine: 23, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !9)
!5 = !DIFile(filename: "test.c", directory: "/home/ubuntu/bugs")
!6 = !DISubroutineType(types: !7)
!7 = !{!8}
!8 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
!9 = !{!10}
!10 = !DILocalVariable(name: "value", scope: !4, file: !5, line: 24, type: !8)
!11 = distinct !DISubprogram(name: "bar", scope: !5, file: !5, line: 11, type: !12, isLocal: true, isDefinition: true, scopeLine: 12, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !14)
!12 = !DISubroutineType(types: !13)
!13 = !{null, !8}
!14 = !{!15, !16}
!15 = !DILocalVariable(name: "value", arg: 1, scope: !11, file: !5, line: 11, type: !8)
!16 = !DILocalVariable(name: "lifetime", scope: !11, file: !5, line: 13, type: !17)
!17 = !DICompositeType(tag: DW_TAG_structure_type, name: "timeval", file: !5, line: 2, size: 128, align: 64, elements: !18)
!18 = !{!19, !21}
!19 = !DIDerivedType(tag: DW_TAG_member, name: "tv_sec", scope: !17, file: !5, line: 3, baseType: !20, size: 64, align: 64)
!20 = !DIBasicType(name: "long long int", size: 64, align: 64, encoding: DW_ATE_signed)
!21 = !DIDerivedType(tag: DW_TAG_member, name: "tv_usec", scope: !17, file: !5, line: 4, baseType: !8, size: 32, align: 32, offset: 64)
!22 = !{i32 2, !"Debug Info Version", i32 3}
!23 = !{i32 1, !"wchar_size", i32 4}
!24 = !{i32 1, !"min_enum_size", i32 4}
!25 = !{!"clang version 3.9.0 (https://github.com/llvm-mirror/clang 89dda3855cda574f355e6defa1d77bdae5053994) (llvm/trunk 257891)"}
!26 = !DIExpression()
!27 = !DILocation(line: 11, scope: !11, inlinedAt: !28)
!28 = distinct !DILocation(line: 26, scope: !4)
!29 = !DILocation(line: 13, scope: !11, inlinedAt: !28)
!30 = !DIExpression(DW_OP_LLVM_fragment, 0, 64)
!31 = !DIExpression(DW_OP_LLVM_fragment, 0, 32)
!32 = !DILocation(line: 18, scope: !11, inlinedAt: !28)
!33 = !DILocation(line: 27, scope: !4)

View File

@ -1,55 +0,0 @@
; RUN: llc -O0 -filetype=obj -mtriple=armeb-none-freebsd -debugger-tune=lldb %s -o - \
; RUN: | llvm-dwarfdump -v --debug-info - | FileCheck %s
; Generated from:
; struct S {
; int j:5;
; int k:6;
; int m:5;
; int n:8;
; } s;
source_filename = "test/DebugInfo/ARM/big-endian-bitfield.ll"
target datalayout = "E-m:e-p:32:32-i64:64-v128:64:128-n32-S64"
%struct.S = type { i24 }
@s = common global %struct.S zeroinitializer, align 4, !dbg !0
!llvm.dbg.cu = !{!2}
!llvm.module.flags = !{!13, !14, !15}
!llvm.ident = !{!16}
!0 = distinct !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
!1 = !DIGlobalVariable(name: "s", scope: !2, file: !3, line: 6, type: !6, isLocal: false, isDefinition: true)
!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 3.9.0 (trunk 267633)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5)
!3 = !DIFile(filename: "bitfield.c", directory: "/Volumes/Data/llvm")
!4 = !{}
!5 = !{!0}
!6 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "S", file: !3, line: 1, size: 32, elements: !7)
!7 = !{!8, !10, !11, !12}
!8 = !DIDerivedType(tag: DW_TAG_member, name: "j", scope: !6, file: !3, line: 2, baseType: !9, size: 5)
; CHECK: DW_TAG_member
; CHECK-NEXT: DW_AT_name{{.*}}"j"
; CHECK-NOT: DW_TAG
; CHECK: DW_AT_data_bit_offset [DW_FORM_data1] (0x00)
!9 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
!10 = !DIDerivedType(tag: DW_TAG_member, name: "k", scope: !6, file: !3, line: 3, baseType: !9, size: 6, offset: 5)
!11 = !DIDerivedType(tag: DW_TAG_member, name: "m", scope: !6, file: !3, line: 4, baseType: !9, size: 5, offset: 11)
!12 = !DIDerivedType(tag: DW_TAG_member, name: "n", scope: !6, file: !3, line: 5, baseType: !9, size: 8, offset: 16)
!13 = !{i32 2, !"Dwarf Version", i32 4}
; CHECK: DW_TAG_member
; CHECK-NEXT: DW_AT_name{{.*}}"k"
; CHECK-NOT: DW_TAG
; CHECK: DW_AT_data_bit_offset [DW_FORM_data1] (0x05)
!14 = !{i32 2, !"Debug Info Version", i32 3}
; CHECK: DW_TAG_member
; CHECK-NEXT: DW_AT_name{{.*}}"m"
; CHECK-NOT: DW_TAG
; CHECK: DW_AT_data_bit_offset [DW_FORM_data1] (0x0b)
!15 = !{i32 1, !"PIC Level", i32 2}
; CHECK: DW_TAG_member
; CHECK-NEXT: DW_AT_name{{.*}}"n"
; CHECK-NOT: DW_TAG
; CHECK: DW_AT_data_bit_offset [DW_FORM_data1] (0x10)
!16 = !{!"clang version 3.9.0 (trunk 267633)"}

View File

@ -1,18 +0,0 @@
; RUN: llc -O0 -filetype=obj -mtriple=armeb-none-linux < %s | llvm-dwarfdump - | FileCheck %s
; CHECK: file format ELF32-arm-big
target datalayout = "E-m:e-p:32:32-i64:64-v128:64:128-n32-S64"
!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!3, !4, !5, !6}
!llvm.ident = !{!7}
!0 = !{i32 786449, !1, i32 12, !"clang version 3.6.0 ", i1 false, !"", i32 0, !2, !2, !2, !2, !2, !"", i32 1} ; [ DW_TAG_compile_unit ] [/a/empty.c] [DW_LANG_C99]
!1 = !{!"empty.c", !"/a"}
!2 = !{}
!3 = !{i32 2, !"Dwarf Version", i32 4}
!4 = !{i32 2, !"Debug Info Version", i32 1}
!5 = !{i32 1, !"wchar_size", i32 4}
!6 = !{i32 1, !"min_enum_size", i32 4}
!7 = !{!"clang version 3.6.0 "}

View File

@ -1,48 +0,0 @@
; RUN: %llc_dwarf -O0 -filetype=obj -o %t.o %s
; RUN: llvm-dwarfdump -v -debug-info %t.o | FileCheck %s
; REQUIRES: object-emission
;
; Generated from:
; struct {
; char c;
; int : 4;
; int reserved : 28;
; } a;
;
; CHECK: DW_TAG_member
; CHECK: DW_AT_name {{.*}} "reserved"
; CHECK: DW_AT_byte_size {{.*}} (0x04)
; CHECK: DW_AT_bit_size {{.*}} (0x1c)
; CHECK: DW_AT_bit_offset {{.*}} (0xfffffffffffffff8)
; CHECK: DW_AT_data_member_location {{.*}} (DW_OP_plus_uconst 0x0)
source_filename = "test/DebugInfo/ARM/bitfield.ll"
target datalayout = "e-m:o-p:32:32-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32"
target triple = "thumbv7-apple-ios"
%struct.anon = type { i8, [5 x i8] }
@a = common global %struct.anon zeroinitializer, align 1, !dbg !0
!llvm.dbg.cu = !{!2}
!llvm.module.flags = !{!12, !13, !14, !15, !16}
!llvm.ident = !{!17}
!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
!1 = !DIGlobalVariable(name: "a", scope: !2, file: !3, line: 5, type: !6, isLocal: false, isDefinition: true)
!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 3.7.0 (trunk 240548) (llvm/trunk 240554)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !4, globals: !5, imports: !4)
!3 = !DIFile(filename: "test.i", directory: "/")
!4 = !{}
!5 = !{!0}
!6 = !DICompositeType(tag: DW_TAG_structure_type, file: !3, line: 1, size: 48, align: 8, elements: !7)
!7 = !{!8, !10}
!8 = !DIDerivedType(tag: DW_TAG_member, name: "c", scope: !6, file: !3, line: 2, baseType: !9, size: 8, align: 8)
!9 = !DIBasicType(name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char)
!10 = !DIDerivedType(tag: DW_TAG_member, name: "reserved", scope: !6, file: !3, line: 4, baseType: !11, size: 28, align: 32, offset: 12)
!11 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
!12 = !{i32 2, !"Dwarf Version", i32 2}
!13 = !{i32 2, !"Debug Info Version", i32 3}
!14 = !{i32 1, !"wchar_size", i32 4}
!15 = !{i32 1, !"min_enum_size", i32 4}
!16 = !{i32 1, !"PIC Level", i32 2}
!17 = !{!"clang version 3.7.0 (trunk 240548) (llvm/trunk 240554)"}

View File

@ -1,114 +0,0 @@
; struct A {
; A();
; virtual ~A();
; };
; struct B : A {
; B();
; virtual ~B();
; };
; B::B() {}
; CHECK: __ZN1BC1Ev:
; CHECK: .loc 1 [[@LINE-2]] 0 prologue_end
; CHECK-NOT: .loc 1 0 0 prologue_end
; The location of the prologue_end marker should not be affected by the presence
; of CFI instructions.
; RUN: llc -O0 -filetype=asm -mtriple=thumbv7-apple-ios < %s | FileCheck %s
; RUN: llc -O0 -filetype=asm -mtriple=thumbv6-apple-ios < %s | FileCheck %s
; ModuleID = 'test1.cpp'
target datalayout = "e-m:o-p:32:32-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32"
target triple = "thumbv7-apple-ios"
%struct.B = type { %struct.A }
%struct.A = type { i32 (...)** }
@_ZTV1B = external unnamed_addr constant [4 x i8*]
; Function Attrs: nounwind
define %struct.B* @_ZN1BC2Ev(%struct.B* %this) unnamed_addr #0 align 2 !dbg !28 {
entry:
tail call void @llvm.dbg.value(metadata %struct.B* %this, metadata !30, metadata !40), !dbg !41
%0 = getelementptr inbounds %struct.B, %struct.B* %this, i32 0, i32 0, !dbg !42
%call = tail call %struct.A* @_ZN1AC2Ev(%struct.A* %0) #3, !dbg !42
%1 = getelementptr inbounds %struct.B, %struct.B* %this, i32 0, i32 0, i32 0, !dbg !42
store i32 (...)** bitcast (i8** getelementptr inbounds ([4 x i8*], [4 x i8*]* @_ZTV1B, i32 0, i32 2) to i32 (...)**), i32 (...)*** %1, align 4, !dbg !42, !tbaa !43
ret %struct.B* %this, !dbg !42
}
declare %struct.A* @_ZN1AC2Ev(%struct.A*)
; Function Attrs: nounwind
define %struct.B* @_ZN1BC1Ev(%struct.B* %this) unnamed_addr #0 align 2 !dbg !32 {
entry:
tail call void @llvm.dbg.value(metadata %struct.B* %this, metadata !34, metadata !40), !dbg !46
tail call void @llvm.dbg.value(metadata %struct.B* %this, metadata !47, metadata !40) #3, !dbg !49
%0 = getelementptr inbounds %struct.B, %struct.B* %this, i32 0, i32 0, !dbg !50
%call.i = tail call %struct.A* @_ZN1AC2Ev(%struct.A* %0) #3, !dbg !50
%1 = getelementptr inbounds %struct.B, %struct.B* %this, i32 0, i32 0, i32 0, !dbg !50
store i32 (...)** bitcast (i8** getelementptr inbounds ([4 x i8*], [4 x i8*]* @_ZTV1B, i32 0, i32 2) to i32 (...)**), i32 (...)*** %1, align 4, !dbg !50, !tbaa !43
ret %struct.B* %this, !dbg !48
}
; Function Attrs: nounwind readnone
declare void @llvm.dbg.value(metadata, metadata, metadata) #2
attributes #0 = { nounwind }
attributes #2 = { nounwind readnone }
attributes #3 = { nounwind }
!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!35, !36, !37, !38}
!llvm.ident = !{!39}
!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 (trunk 224279) (llvm/trunk 224283)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !2, imports: !2)
!1 = !DIFile(filename: "<stdin>", directory: "")
!2 = !{}
!3 = !{!4, !13}
!4 = !DICompositeType(tag: DW_TAG_structure_type, name: "B", line: 5, size: 32, align: 32, file: !5, elements: !6, vtableHolder: !13, identifier: "_ZTS1B")
!5 = !DIFile(filename: "test1.cpp", directory: "")
!6 = !{!7, !8, !12}
!7 = !DIDerivedType(tag: DW_TAG_inheritance, scope: !4, baseType: !13)
!8 = !DISubprogram(name: "B", line: 6, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 6, file: !5, scope: !4, type: !9)
!9 = !DISubroutineType(types: !10)
!10 = !{null, !11}
!11 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !4)
!12 = !DISubprogram(name: "~B", line: 7, isLocal: false, isDefinition: false, virtuality: DW_VIRTUALITY_virtual, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 7, file: !5, scope: !4, type: !9, containingType: !4)
!13 = !DICompositeType(tag: DW_TAG_structure_type, name: "A", line: 1, size: 32, align: 32, file: !5, elements: !14, vtableHolder: !13, identifier: "_ZTS1A")
!14 = !{!15, !22, !26}
!15 = !DIDerivedType(tag: DW_TAG_member, name: "_vptr$A", size: 32, flags: DIFlagArtificial, file: !5, scope: !16, baseType: !17)
!16 = !DIFile(filename: "test1.cpp", directory: "")
!17 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, baseType: !18)
!18 = !DIDerivedType(tag: DW_TAG_pointer_type, name: "__vtbl_ptr_type", size: 32, baseType: !19)
!19 = !DISubroutineType(types: !20)
!20 = !{!21}
!21 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
!22 = !DISubprogram(name: "A", line: 2, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 2, file: !5, scope: !13, type: !23)
!23 = !DISubroutineType(types: !24)
!24 = !{null, !25}
!25 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !13)
!26 = !DISubprogram(name: "~A", line: 3, isLocal: false, isDefinition: false, virtuality: DW_VIRTUALITY_virtual, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 3, file: !5, scope: !13, type: !23, containingType: !13)
!28 = distinct !DISubprogram(name: "B", linkageName: "_ZN1BC2Ev", line: 9, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 9, file: !5, scope: !4, type: !9, declaration: !8, variables: !29)
!29 = !{!30}
!30 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !28, type: !31)
!31 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, baseType: !4)
!32 = distinct !DISubprogram(name: "B", linkageName: "_ZN1BC1Ev", line: 9, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 9, file: !5, scope: !4, type: !9, declaration: !8, variables: !33)
!33 = !{!34}
!34 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !32, type: !31)
!35 = !{i32 2, !"Dwarf Version", i32 4}
!36 = !{i32 2, !"Debug Info Version", i32 3}
!37 = !{i32 1, !"wchar_size", i32 4}
!38 = !{i32 1, !"min_enum_size", i32 4}
!39 = !{!"clang version 3.6.0 (trunk 224279) (llvm/trunk 224283)"}
!40 = !DIExpression()
!41 = !DILocation(line: 0, scope: !28)
!42 = !DILocation(line: 9, scope: !28)
!43 = !{!44, !44, i64 0}
!44 = !{!"vtable pointer", !45, i64 0}
!45 = !{!"Simple C/C++ TBAA"}
!46 = !DILocation(line: 0, scope: !32)
!47 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !28, type: !31)
!48 = !DILocation(line: 9, scope: !32)
!49 = !DILocation(line: 0, scope: !28, inlinedAt: !48)
!50 = !DILocation(line: 9, scope: !28, inlinedAt: !48)

View File

@ -1,36 +0,0 @@
; RUN: llc -filetype=asm %s -o - | FileCheck %s
target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
target triple = "armv7--linux-gnueabihf"
; int
; main(void)
; {
; return -1;
; }
; CHECK: test.c:4:5
; CHECK: mvn
; Function Attrs: nounwind
define i32 @main() !dbg !4 {
entry:
%retval = alloca i32, align 4
store i32 0, i32* %retval
ret i32 -1, !dbg !11
}
!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!8, !9}
!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "", isOptimized: false, emissionKind: FullDebug)
!1 = !DIFile(filename: "test.c", directory: "/home/user/clang/build")
!2 = !{}
!4 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 2, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2)
!5 = !DISubroutineType(types: !6)
!6 = !{!7}
!7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
!8 = !{i32 2, !"Dwarf Version", i32 4}
!9 = !{i32 2, !"Debug Info Version", i32 3}
!10 = !{i32 1, !"wchar_size", i32 4}
!11 = !DILocation(line: 4, column: 5, scope: !4)

View File

@ -1,44 +0,0 @@
; RUN: %llc_dwarf -filetype=obj -mattr=+vfp2 -float-abi=hard < %s | llvm-dwarfdump -debug-info - | FileCheck %s
; RUN: %llc_dwarf -filetype=obj -mattr=-vfp2 -float-abi=soft < %s | llvm-dwarfdump -debug-info - | FileCheck %s
; REQUIRES: object-emission
; Generated by clang -O1 -g from the following C source:
; float foo(float p) {
; return p;
; }
; When using the soft-float calling convention, we have to look through a
; bitcast to find the register which contains the argument.
; CHECK: 0x{{[0-9a-f]*}}: DW_TAG_formal_parameter
; CHECK-NEXT: DW_AT_location
target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
target triple = "armv7--none-eabi"
define float @foo(float %p) !dbg !4 {
entry:
tail call void @llvm.dbg.value(metadata float %p, metadata !9, metadata !15), !dbg !16
ret float %p, !dbg !18
}
declare void @llvm.dbg.value(metadata, metadata, metadata)
!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!10, !11}
!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
!1 = !DIFile(filename: "test.c", directory: "")
!2 = !{}
!4 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !8)
!5 = !DISubroutineType(types: !6)
!6 = !{!7, !7}
!7 = !DIBasicType(name: "float", size: 32, align: 32, encoding: DW_ATE_float)
!8 = !{!9}
!9 = !DILocalVariable(name: "p", arg: 1, scope: !4, file: !1, line: 1, type: !7)
!10 = !{i32 2, !"Dwarf Version", i32 4}
!11 = !{i32 2, !"Debug Info Version", i32 3}
!15 = !DIExpression()
!16 = !DILocation(line: 1, column: 17, scope: !4)
!17 = !DILocation(line: 2, column: 12, scope: !4)
!18 = !DILocation(line: 2, column: 3, scope: !4)

View File

@ -1,30 +0,0 @@
; RUN: llc -mtriple armv7-apple-darwin < %s | FileCheck %s
; Test that we don't pollute the start of the file with debug sections.
; This is particularly important on ARM MachO as a change in section order can
; cause a change the relaxation of the instructions used.
; CHECK: .section __TEXT,__text,regular,pure_instructions
; CHECK-NEXT: .syntax unified
; CHECK-NEXT: .globl _f
; CHECK-NEXT: .p2align 2
; CHECK-NEXT: .code 32 @ @f
; CHECK-NEXT: _f:
; CHECK: .section __DWARF,__debug_str,regular,debug
define void @f() !dbg !4 {
ret void, !dbg !9
}
!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!7, !8}
!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "foo", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !2, imports: !2)
!1 = !DIFile(filename: "/foo/test.c", directory: "/foo")
!2 = !{}
!4 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 2, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !2)
!5 = !DISubroutineType(types: !6)
!6 = !{null}
!7 = !{i32 2, !"Dwarf Version", i32 4}
!8 = !{i32 2, !"Debug Info Version", i32 3}
!9 = !DILocation(line: 1, column: 15, scope: !4)

View File

@ -1,95 +0,0 @@
; RUN: llc -filetype=obj %s -o - | llvm-dwarfdump - | FileCheck %s
; CHECK: file format Mach-O arm
; ModuleID = 'test.ll'
source_filename = "test.i"
target datalayout = "e-m:o-p:32:32-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32"
target triple = "thumbv7s-apple-ios5.0.0"
%struct.vm_object = type { i64 }
; Function Attrs: nounwind ssp
define void @f(%struct.vm_object* %object, i64* nocapture readonly %start) local_unnamed_addr #0 !dbg !11 {
entry:
tail call void @llvm.dbg.value(metadata %struct.vm_object* %object, metadata !21, metadata !DIExpression()), !dbg !27
tail call void @llvm.dbg.value(metadata i64* %start, metadata !22, metadata !DIExpression()), !dbg !28
tail call void @llvm.dbg.value(metadata i64 %0, metadata !25, metadata !DIExpression()), !dbg !29
tail call void @llvm.dbg.value(metadata i64 %0, metadata !26, metadata !DIExpression(DW_OP_constu, 4096, DW_OP_minus, DW_OP_stack_value)), !dbg !30
; This debug value cannot safely be split into two 32-bit pieces.
; CHECK-NOT: DW_AT_name(offset)
tail call void @llvm.dbg.value(metadata i32 undef, metadata !23, metadata !DIExpression()), !dbg !31
br i1 undef, label %for.end, label %for.body.lr.ph, !dbg !31
for.body.lr.ph: ; preds = %entry
%0 = load i64, i64* %start, align 4, !dbg !33
br label %for.body, !dbg !31
for.body: ; preds = %for.body, %for.body.lr.ph
%offset.010.in = phi i64 [ %0, %for.body.lr.ph ], [ %offset.010, %for.body ]
%head_size.09 = phi i32 [ undef, %for.body.lr.ph ], [ %sub2, %for.body ]
%offset.010 = add i64 %offset.010.in, -4096
tail call void @llvm.dbg.value(metadata i32 %head_size.09, metadata !23, metadata !DIExpression()), !dbg !30
%call = tail call i32 bitcast (i32 (...)* @use to i32 (i64, %struct.vm_object*)*)(i64 %offset.010, %struct.vm_object* %object) #2, !dbg !34
%sub2 = add i32 %head_size.09, -4096, !dbg !37
tail call void @llvm.dbg.value(metadata i64 %offset.010, metadata !26, metadata !DIExpression(DW_OP_constu, 4096, DW_OP_minus, DW_OP_stack_value)), !dbg !29
tail call void @llvm.dbg.value(metadata i32 %sub2, metadata !23, metadata !DIExpression()), !dbg !30
%tobool = icmp eq i32 %sub2, 0, !dbg !31
br i1 %tobool, label %for.end, label %for.body, !dbg !31, !llvm.loop !38
for.end: ; preds = %for.body, %entry
ret void, !dbg !40
}
declare i32 @use(...) local_unnamed_addr
; Function Attrs: nounwind readnone speculatable
declare void @llvm.dbg.value(metadata, metadata, metadata) #1
attributes #0 = { nounwind ssp }
attributes #1 = { nounwind readnone speculatable }
attributes #2 = { nobuiltin nounwind }
!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!5, !6, !7, !8, !9}
!llvm.ident = !{!10}
!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 6.0.0 (trunk 317434) (llvm/trunk 317437)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !3)
!1 = !DIFile(filename: "test.i", directory: "/Data/radar/31209283")
!2 = !{}
!3 = !{!4}
!4 = !DIBasicType(name: "long long unsigned int", size: 64, encoding: DW_ATE_unsigned)
!5 = !{i32 2, !"Dwarf Version", i32 2}
!6 = !{i32 2, !"Debug Info Version", i32 3}
!7 = !{i32 1, !"wchar_size", i32 4}
!8 = !{i32 1, !"min_enum_size", i32 4}
!9 = !{i32 7, !"PIC Level", i32 2}
!10 = !{!"clang version 6.0.0 (trunk 317434) (llvm/trunk 317437)"}
!11 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 6, type: !12, isLocal: false, isDefinition: true, scopeLine: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !20)
!12 = !DISubroutineType(types: !13)
!13 = !{null, !14, !19}
!14 = !DIDerivedType(tag: DW_TAG_typedef, name: "v_t", file: !1, line: 1, baseType: !15)
!15 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !16, size: 32)
!16 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "v", file: !1, line: 2, size: 64, elements: !17)
!17 = !{!18}
!18 = !DIDerivedType(tag: DW_TAG_member, name: "p", scope: !16, file: !1, line: 3, baseType: !4, size: 64)
!19 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !4, size: 32)
!20 = !{!21, !22, !23, !25, !26}
!21 = !DILocalVariable(name: "object", arg: 1, scope: !11, file: !1, line: 6, type: !14)
!22 = !DILocalVariable(name: "start", arg: 2, scope: !11, file: !1, line: 6, type: !19)
!23 = !DILocalVariable(name: "head_size", scope: !11, file: !1, line: 7, type: !24)
!24 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned)
!25 = !DILocalVariable(name: "orig_start", scope: !11, file: !1, line: 8, type: !4)
!26 = !DILocalVariable(name: "offset", scope: !11, file: !1, line: 9, type: !4)
!27 = !DILocation(line: 6, column: 20, scope: !11)
!28 = !DILocation(line: 6, column: 48, scope: !11)
!29 = !DILocation(line: 7, column: 12, scope: !11)
!30 = !DILocation(line: 10, column: 16, scope: !11)
!31 = !DILocation(line: 11, column: 5, scope: !32)
!32 = distinct !DILexicalBlock(scope: !11, file: !1, line: 11, column: 5)
!33 = !DILocation(line: 8, column: 22, scope: !11)
!34 = !DILocation(line: 13, column: 7, scope: !35)
!35 = distinct !DILexicalBlock(scope: !36, file: !1, line: 12, column: 75)
!36 = distinct !DILexicalBlock(scope: !32, file: !1, line: 11, column: 5)
!37 = !DILocation(line: 12, column: 61, scope: !36)
!38 = distinct !{!38, !31, !39}
!39 = !DILocation(line: 14, column: 3, scope: !32)
!40 = !DILocation(line: 15, column: 1, scope: !11)

View File

@ -1,7 +0,0 @@
; RUN: llc -mtriple=arm-none-linux -O0 -filetype=asm < %S/../Inputs/line.ll | FileCheck %S/../Inputs/line.ll
; This is more complex than it looked. It's mixed up somewhere in SelectionDAG
; (legalized as br_cc, losing the separation between the comparison and the
; branch, then further lowered to CMPri + brcc but without the fidelity that
; those two instructions are on separate lines)
; XFAIL: *

View File

@ -1,3 +0,0 @@
if not 'ARM' in config.root.targets:
config.unsupported = True

View File

@ -1,18 +0,0 @@
; RUN: llc -O0 -filetype=obj -mtriple=arm-none-linux < %s | llvm-dwarfdump - | FileCheck %s
; CHECK: file format ELF32-arm-little
target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-n32-S64"
!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!3, !4, !5, !6}
!llvm.ident = !{!7}
!0 = !{i32 786449, !1, i32 12, !"clang version 3.6.0 ", i1 false, !"", i32 0, !2, !2, !2, !2, !2, !"", i32 1} ; [ DW_TAG_compile_unit ] [/a/empty.c] [DW_LANG_C99]
!1 = !{!"empty.c", !"/a"}
!2 = !{}
!3 = !{i32 2, !"Dwarf Version", i32 4}
!4 = !{i32 2, !"Debug Info Version", i32 1}
!5 = !{i32 1, !"wchar_size", i32 4}
!6 = !{i32 1, !"min_enum_size", i32 4}
!7 = !{!"clang version 3.6.0 "}

View File

@ -1,102 +0,0 @@
; RUN: opt -instcombine %s -S | FileCheck %s
;
; Generate me from:
; clang -cc1 -triple thumbv7-apple-ios7.0.0 -S -target-abi apcs-gnu -gdwarf-2 -Os test.c -o test.ll -emit-llvm
; void run(float r)
; {
; int count = r;
; float vla[count];
; vla[0] = r;
; for (int i = 0; i < count; i++)
; vla[i] /= r;
; }
; rdar://problem/15464571
;
; ModuleID = 'test.c'
target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:32:64-v128:32:128-a0:0:32-n32-S32"
target triple = "thumbv7-apple-ios8.0.0"
; Function Attrs: nounwind optsize readnone
define void @run(float %r) #0 !dbg !4 {
entry:
tail call void @llvm.dbg.declare(metadata float %r, metadata !11, metadata !DIExpression()), !dbg !22
%conv = fptosi float %r to i32, !dbg !23
tail call void @llvm.dbg.declare(metadata i32 %conv, metadata !12, metadata !DIExpression()), !dbg !23
%vla = alloca float, i32 %conv, align 4, !dbg !24
tail call void @llvm.dbg.declare(metadata float* %vla, metadata !14, metadata !DIExpression(DW_OP_deref)), !dbg !24
; The VLA alloca should be described by a dbg.declare:
; CHECK: call void @llvm.dbg.declare(metadata float* %vla, metadata ![[VLA:.*]], metadata {{.*}})
; The VLA alloca and following store into the array should not be lowered to like this:
; CHECK-NOT: call void @llvm.dbg.value(metadata float %r, metadata ![[VLA]])
; the backend interprets this as "vla has the location of %r".
store float %r, float* %vla, align 4, !dbg !25, !tbaa !26
tail call void @llvm.dbg.value(metadata i32 0, metadata !18, metadata !DIExpression()), !dbg !30
%cmp8 = icmp sgt i32 %conv, 0, !dbg !30
br i1 %cmp8, label %for.body, label %for.end, !dbg !30
for.body: ; preds = %entry, %for.body.for.body_crit_edge
%0 = phi float [ %.pre, %for.body.for.body_crit_edge ], [ %r, %entry ]
%i.09 = phi i32 [ %inc, %for.body.for.body_crit_edge ], [ 0, %entry ]
%arrayidx2 = getelementptr inbounds float, float* %vla, i32 %i.09, !dbg !31
%div = fdiv float %0, %r, !dbg !31
store float %div, float* %arrayidx2, align 4, !dbg !31, !tbaa !26
%inc = add nsw i32 %i.09, 1, !dbg !30
tail call void @llvm.dbg.value(metadata i32 %inc, metadata !18, metadata !DIExpression()), !dbg !30
%exitcond = icmp eq i32 %inc, %conv, !dbg !30
br i1 %exitcond, label %for.end, label %for.body.for.body_crit_edge, !dbg !30
for.body.for.body_crit_edge: ; preds = %for.body
%arrayidx2.phi.trans.insert = getelementptr inbounds float, float* %vla, i32 %inc
%.pre = load float, float* %arrayidx2.phi.trans.insert, align 4, !dbg !31, !tbaa !26
br label %for.body, !dbg !30
for.end: ; preds = %for.body, %entry
ret void, !dbg !32
}
; Function Attrs: nounwind readnone
declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
; Function Attrs: nounwind readnone
declare void @llvm.dbg.value(metadata, metadata, metadata) #1
attributes #0 = { nounwind optsize readnone "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-realign-stack" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #1 = { nounwind readnone }
!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!20, !33}
!llvm.ident = !{!21}
!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 ", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2)
!1 = !DIFile(filename: "<unknown>", directory: "/Volumes/Data/radar/15464571")
!2 = !{}
!4 = distinct !DISubprogram(name: "run", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 2, file: !5, scope: !6, type: !7, variables: !10)
!5 = !DIFile(filename: "test.c", directory: "/Volumes/Data/radar/15464571")
!6 = !DIFile(filename: "test.c", directory: "/Volumes/Data/radar/15464571")
!7 = !DISubroutineType(types: !8)
!8 = !{null, !9}
!9 = !DIBasicType(tag: DW_TAG_base_type, name: "float", size: 32, align: 32, encoding: DW_ATE_float)
!10 = !{!11, !12, !14, !18}
!11 = !DILocalVariable(name: "r", line: 1, arg: 1, scope: !4, file: !6, type: !9)
!12 = !DILocalVariable(name: "count", line: 3, scope: !4, file: !6, type: !13)
!13 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
!14 = !DILocalVariable(name: "vla", line: 4, scope: !4, file: !6, type: !15)
!15 = !DICompositeType(tag: DW_TAG_array_type, align: 32, baseType: !9, elements: !16)
!16 = !{!17}
!17 = !DISubrange(count: -1)
!18 = !DILocalVariable(name: "i", line: 6, scope: !19, file: !6, type: !13)
!19 = distinct !DILexicalBlock(line: 6, column: 0, file: !5, scope: !4)
!20 = !{i32 2, !"Dwarf Version", i32 2}
!21 = !{!"clang version 3.4 "}
!22 = !DILocation(line: 1, scope: !4)
!23 = !DILocation(line: 3, scope: !4)
!24 = !DILocation(line: 4, scope: !4)
!25 = !DILocation(line: 5, scope: !4)
!26 = !{!27, !27, i64 0}
!27 = !{!"float", !28, i64 0}
!28 = !{!"omnipotent char", !29, i64 0}
!29 = !{!"Simple C/C++ TBAA"}
!30 = !DILocation(line: 6, scope: !19)
!31 = !DILocation(line: 7, scope: !19)
!32 = !DILocation(line: 8, scope: !4)
!33 = !{i32 1, !"Debug Info Version", i32 3}

View File

@ -1,56 +0,0 @@
; RUN: llc -filetype=asm -asm-verbose=0 < %s | FileCheck %s
; char ch;
; int b;
;
; void proc (void)
; {
; ch = 'A';
; b = 0; // <== this should have correct location
; }
; CHECK: .loc 1 7 7
; CHECK: mov r{{[0-9]}}, #0
source_filename = "test/DebugInfo/ARM/multiple-constant-uses-drops-dbgloc.ll"
target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
target triple = "armv7--linux-gnueabihf"
@ch = common global i8 0, align 1, !dbg !0
@b = common global i32 0, align 4, !dbg !5
; Function Attrs: nounwind
define void @proc() #0 !dbg !13 {
entry:
store i8 65, i8* @ch, align 1, !dbg !17
store i32 0, i32* @b, align 4, !dbg !18
ret void, !dbg !19
}
attributes #0 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="cortex-a8" "target-features"="+neon,+vfp3" "unsafe-fp-math"="false" "use-soft-float"="false" }
!llvm.dbg.cu = !{!2}
!llvm.module.flags = !{!8, !9, !10, !11}
!llvm.ident = !{!12}
!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
!1 = !DIGlobalVariable(name: "ch", scope: !2, file: !3, line: 1, type: !4, isLocal: false, isDefinition: true)
!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
!3 = !DIFile(filename: "test.c", directory: "/home/user/clang/build")
!4 = !DIBasicType(name: "char", size: 8, align: 8, encoding: DW_ATE_unsigned_char)
!5 = !DIGlobalVariableExpression(var: !6, expr: !DIExpression())
!6 = !DIGlobalVariable(name: "b", scope: !2, file: !3, line: 2, type: !7, isLocal: false, isDefinition: true)
!7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
!8 = !{i32 2, !"Dwarf Version", i32 4}
!9 = !{i32 2, !"Debug Info Version", i32 3}
!10 = !{i32 1, !"wchar_size", i32 4}
!11 = !{i32 1, !"min_enum_size", i32 4}
!12 = !{!"clang version 3.7.0 (http://llvm.org/git/clang.git 9b0abb9df531ef7928c8182120e1869affca17d5) (http://llvm.org/git/llvm.git b1e759524dd94f7ce1e24935daed8383927e96c1)"}
!13 = distinct !DISubprogram(name: "proc", scope: !3, file: !3, line: 4, type: !14, isLocal: false, isDefinition: true, scopeLine: 5, flags: DIFlagPrototyped, isOptimized: false, unit: !2, variables: !16)
!14 = !DISubroutineType(types: !15)
!15 = !{null}
!16 = !{}
!17 = !DILocation(line: 6, column: 8, scope: !13)
!18 = !DILocation(line: 7, column: 7, scope: !13)
!19 = !DILocation(line: 8, column: 1, scope: !13)

View File

@ -1,63 +0,0 @@
; RUN: llc %s -filetype=obj -o - | llvm-dwarfdump -v - | FileCheck %s
; This tests a fragment that partially covers subregister compositions.
;
; Our fragment is 96 bits long and lies in a 128-bit register, which
; in turn has to be composed out of its two 64-bit subregisters.
; CHECK: .debug_info
; CHECK: DW_TAG_subprogram
; CHECK: DW_AT_name {{.*}}"subscript.get"
; CHECK: DW_TAG_formal_parameter
; CHECK-NEXT: DW_AT_location [DW_FORM_sec_offset] ({{.*}}
; CHECK-NEXT: 0x{{.*}} - 0x{{.*}}: DW_OP_regx D16, DW_OP_piece 0x8, DW_OP_regx D17, DW_OP_piece 0x4, DW_OP_regx D16, DW_OP_piece 0x8, DW_OP_regx D17, DW_OP_piece 0x4
source_filename = "simd.ll"
target datalayout = "e-m:o-p:32:32-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32"
target triple = "armv7-apple-ios7.0"
; Function Attrs: nounwind readnone
declare void @llvm.dbg.value(metadata, metadata, metadata) #0
define <3 x float> @_TFV4simd8float2x3g9subscriptFSiVS_6float3(i32, <3 x float>, <3 x float>) !dbg !5 {
entry:
tail call void @llvm.dbg.value(metadata <3 x float> %1, metadata !8, metadata !9), !dbg !10
tail call void @llvm.dbg.value(metadata <3 x float> %2, metadata !8, metadata !11), !dbg !10
%3 = icmp eq i32 %0, 0, !dbg !12
br i1 %3, label %7, label %4, !dbg !12
; <label>:4: ; preds = %entry
%5 = icmp eq i32 %0, 1, !dbg !15
br i1 %5, label %7, label %6, !dbg !15
; <label>:6: ; preds = %4
unreachable, !dbg !17
; <label>:7: ; preds = %4, %entry
%8 = phi <3 x float> [ %1, %entry ], [ %2, %4 ], !dbg !18
ret <3 x float> %8, !dbg !18
}
attributes #0 = { nounwind readnone }
!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!3, !4}
!0 = distinct !DICompileUnit(language: DW_LANG_Swift, file: !1, producer: "Swift", isOptimized: false, runtimeVersion: 3, emissionKind: FullDebug, enums: !2, imports: !2)
!1 = !DIFile(filename: "simd.swift", directory: "/")
!2 = !{}
!3 = !{i32 2, !"Dwarf Version", i32 4}
!4 = !{i32 2, !"Debug Info Version", i32 3}
!5 = distinct !DISubprogram(name: "subscript.get", linkageName: "_TFV4simd8float2x3g9subscriptFSiVS_6float3", scope: !6, file: !1, type: !7, isLocal: false, isDefinition: true, isOptimized: true, unit: !0, variables: !2)
!6 = !DICompositeType(tag: DW_TAG_structure_type, name: "float2x3", scope: !0, file: !1, line: 5824, size: 256, align: 128, elements: !2, runtimeLang: DW_LANG_Swift, identifier: "_TtV4simd8float2x3")
!7 = !DISubroutineType(types: !2)
!8 = !DILocalVariable(name: "self", arg: 2, scope: !5, file: !1, line: 5897, type: !6, flags: DIFlagArtificial)
!9 = !DIExpression(DW_OP_LLVM_fragment, 0, 96)
!10 = !DILocation(line: 5897, column: 5, scope: !5)
!11 = !DIExpression(DW_OP_LLVM_fragment, 96, 96)
!12 = !DILocation(line: 5900, column: 12, scope: !13)
!13 = distinct !DILexicalBlock(scope: !14, file: !1, line: 5898, column: 7)
!14 = distinct !DILexicalBlock(scope: !5, file: !1, line: 5897, column: 9)
!15 = !DILocation(line: 5902, column: 12, scope: !16)
!16 = distinct !DILexicalBlock(scope: !14, file: !1, line: 5898, column: 7)
!17 = !DILocation(line: 0, scope: !5)
!18 = !DILocation(line: 5906, column: 5, scope: !14)

View File

@ -1,15 +0,0 @@
; RUN: llc -filetype=obj -O0 < %s -mtriple arm-unknown-linux | \
; RUN: llvm-dwarfdump - 2>&1 | FileCheck %s
; CHECK-NOT: failed to compute relocation
!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!3, !4}
!llvm.ident = !{!5}
!0 = !{i32 786449, !1, i32 12, !"clang version 3.6.0 ", i1 false, !"", i32 0, !2, !2, !2, !2, !2, !"", i32 1} ; [ DW_TAG_compile_unit ] [/a/empty.c] [DW_LANG_C99]
!1 = !{!"empty.c", !"/a"}
!2 = !{}
!3 = !{i32 2, !"Dwarf Version", i32 4}
!4 = !{i32 2, !"Debug Info Version", i32 1}
!5 = !{!"clang version 3.6.0 "}

View File

@ -1,44 +0,0 @@
; RUN: llc -disable-fp-elim -O0 %s -mtriple armv7-apple-darwin -o - | FileCheck %s
; RUN: llc -disable-fp-elim -O0 %s -mtriple thumbv7-apple-darwin -o - | FileCheck %s
; int func(void);
; void prologue_end_test() {
; func();
; func();
; }
define void @prologue_end_test() nounwind uwtable !dbg !4 {
; CHECK: prologue_end_test:
; CHECK: push {r7, lr}
; CHECK: {{mov r7, sp|add r7, sp}}
; CHECK: sub sp
; CHECK: .loc 1 3 3 prologue_end
; CHECK: bl {{_func|Ltmp}}
; CHECK: bl {{_func|Ltmp}}
entry:
%call = call i32 @func(), !dbg !13
%call1 = call i32 @func(), !dbg !14
ret void, !dbg !15
}
declare i32 @func()
!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!7, !8, !9, !10, !11}
!llvm.ident = !{!12}
!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0 (trunk 242129)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
!1 = !DIFile(filename: "foo.c", directory: "/tmp")
!2 = !{}
!4 = distinct !DISubprogram(name: "prologue_end_test", scope: !1, file: !1, line: 2, type: !5, isLocal: false, isDefinition: true, scopeLine: 2, isOptimized: false, unit: !0, variables: !2)
!5 = !DISubroutineType(types: !6)
!6 = !{null}
!7 = !{i32 2, !"Dwarf Version", i32 2}
!8 = !{i32 2, !"Debug Info Version", i32 3}
!9 = !{i32 1, !"wchar_size", i32 4}
!10 = !{i32 1, !"min_enum_size", i32 4}
!11 = !{i32 1, !"PIC Level", i32 2}
!12 = !{!"clang version 3.7.0 (trunk 242129)"}
!13 = !DILocation(line: 3, column: 3, scope: !4)
!14 = !DILocation(line: 4, column: 3, scope: !4)
!15 = !DILocation(line: 5, column: 1, scope: !4)

View File

@ -1,59 +0,0 @@
; RUN: llc < %s - -filetype=obj | llvm-dwarfdump -debug-loc - | FileCheck %s
target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:32:64-v128:32:128-a0:0:32-n32"
target triple = "thumbv7-apple-macosx10.6.7"
; The S registers on ARM are expressed as pieces of their super-registers in DWARF.
;
; CHECK: DW_OP_regx
define void @_Z3foov() optsize ssp !dbg !1 {
entry:
%call = tail call float @_Z3barv() optsize, !dbg !11
tail call void @llvm.dbg.value(metadata float %call, metadata !5, metadata !DIExpression()), !dbg !11
%call16 = tail call float @_Z2f2v() optsize, !dbg !12
%cmp7 = fcmp olt float %call, %call16, !dbg !12
br i1 %cmp7, label %for.body, label %for.end, !dbg !12
for.body: ; preds = %entry, %for.body
%k.08 = phi float [ %inc, %for.body ], [ %call, %entry ]
%call4 = tail call float @_Z2f3f(float %k.08) optsize, !dbg !13
%inc = fadd float %k.08, 1.000000e+00, !dbg !14
%call1 = tail call float @_Z2f2v() optsize, !dbg !12
%cmp = fcmp olt float %inc, %call1, !dbg !12
br i1 %cmp, label %for.body, label %for.end, !dbg !12
for.end: ; preds = %for.body, %entry
ret void, !dbg !15
}
declare float @_Z3barv() optsize
declare float @_Z2f2v() optsize
declare float @_Z2f3f(float) optsize
declare void @llvm.dbg.value(metadata, metadata, metadata) nounwind readnone
!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!20}
!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.0 (trunk 130845)", isOptimized: true, emissionKind: FullDebug, file: !18, enums: !19, retainedTypes: !19, imports: null)
!1 = distinct !DISubprogram(name: "foo", linkageName: "_Z3foov", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 5, file: !18, scope: !2, type: !3, variables: !17)
!2 = !DIFile(filename: "k.cc", directory: "/private/tmp")
!3 = !DISubroutineType(types: !4)
!4 = !{null}
!5 = !DILocalVariable(name: "k", line: 6, scope: !6, file: !2, type: !7)
!6 = distinct !DILexicalBlock(line: 5, column: 12, file: !18, scope: !1)
!7 = !DIBasicType(tag: DW_TAG_base_type, name: "float", size: 32, align: 32, encoding: DW_ATE_float)
!8 = !DILocalVariable(name: "y", line: 8, scope: !9, file: !2, type: !7)
!9 = distinct !DILexicalBlock(line: 7, column: 25, file: !18, scope: !10)
!10 = distinct !DILexicalBlock(line: 7, column: 3, file: !18, scope: !6)
!11 = !DILocation(line: 6, column: 18, scope: !6)
!12 = !DILocation(line: 7, column: 3, scope: !6)
!13 = !DILocation(line: 8, column: 20, scope: !9)
!14 = !DILocation(line: 7, column: 20, scope: !10)
!15 = !DILocation(line: 10, column: 1, scope: !6)
!17 = !{!5, !8}
!18 = !DIFile(filename: "k.cc", directory: "/private/tmp")
!19 = !{}
!20 = !{i32 1, !"Debug Info Version", i32 3}

View File

@ -1,118 +0,0 @@
; RUN: opt -codegenprepare -S %s -o - | FileCheck %s
; typedef struct info {
; unsigned long long size;
; } info_t;
; extern unsigned p;
; extern unsigned n;
; void f() {
; unsigned int i;
; if (p) {
; info_t *info = (info_t *)p;
; for (i = 0; i < n; i++)
; use(info[i].size);
; }
; }
source_filename = "debug.i"
target datalayout = "e-m:o-p:32:32-i64:64-a:0:32-n32-S128"
target triple = "thumbv7k-apple-ios10.0.0"
%struct.info = type { i64 }
@p = external local_unnamed_addr global i32, align 4
@n = external local_unnamed_addr global i32, align 4
; Function Attrs: nounwind ssp uwtable
define void @f() local_unnamed_addr #0 !dbg !16 {
entry:
%0 = load i32, i32* @p, align 4, !dbg !25
%tobool = icmp eq i32 %0, 0, !dbg !25
br i1 %tobool, label %if.end, label %if.then, !dbg !26
if.then: ; preds = %entry
%1 = inttoptr i32 %0 to %struct.info*, !dbg !27
tail call void @llvm.dbg.value(metadata %struct.info* %1, metadata !22, metadata !DIExpression()), !dbg !28
; CHECK: call void @llvm.dbg.value(metadata i32 %0, metadata !22, metadata !DIExpression())
tail call void @llvm.dbg.value(metadata i32 0, metadata !20, metadata !DIExpression()), !dbg !29
%2 = load i32, i32* @n, align 4, !dbg !30
%cmp5 = icmp eq i32 %2, 0, !dbg !33
br i1 %cmp5, label %if.end, label %for.body.preheader, !dbg !34
for.body.preheader: ; preds = %if.then
; CHECK: for.body.preheader:
; CHECK: %2 = inttoptr i32 %0 to %struct.info*
br label %for.body, !dbg !35
for.body: ; preds = %for.body.preheader, %for.body
%lsr.iv = phi %struct.info* [ %1, %for.body.preheader ], [ %scevgep, %for.body ]
%i.06 = phi i32 [ %inc, %for.body ], [ 0, %for.body.preheader ]
%lsr.iv7 = bitcast %struct.info* %lsr.iv to i64*
tail call void @llvm.dbg.value(metadata i32 %i.06, metadata !20, metadata !DIExpression()), !dbg !29
%3 = load i64, i64* %lsr.iv7, align 8, !dbg !35
%call = tail call i32 bitcast (i32 (...)* @use to i32 (i64)*)(i64 %3) #3, !dbg !36
%inc = add nuw i32 %i.06, 1, !dbg !37
tail call void @llvm.dbg.value(metadata i32 %inc, metadata !20, metadata !DIExpression()), !dbg !29
%4 = load i32, i32* @n, align 4, !dbg !30
%scevgep = getelementptr %struct.info, %struct.info* %lsr.iv, i32 1, !dbg !33
%cmp = icmp ult i32 %inc, %4, !dbg !33
br i1 %cmp, label %for.body, label %if.end.loopexit, !dbg !34, !llvm.loop !38
if.end.loopexit: ; preds = %for.body
br label %if.end, !dbg !40
if.end: ; preds = %if.end.loopexit, %if.then, %entry
ret void, !dbg !40
}
declare i32 @use(...) local_unnamed_addr #1
; Function Attrs: nounwind readnone speculatable
declare void @llvm.dbg.value(metadata, metadata, metadata) #2
attributes #0 = { nounwind ssp uwtable }
attributes #2 = { nounwind readnone speculatable }
attributes #3 = { nobuiltin nounwind }
!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!10, !11, !12, !13, !14}
!llvm.ident = !{!15}
!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 6.0.0 (trunk 317231) (llvm/trunk 317262)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !3)
!1 = !DIFile(filename: "debug.i", directory: "/Data/radar/35321562")
!2 = !{}
!3 = !{!4}
!4 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !5, size: 32)
!5 = !DIDerivedType(tag: DW_TAG_typedef, name: "info_t", file: !1, line: 3, baseType: !6)
!6 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "info", file: !1, line: 1, size: 64, elements: !7)
!7 = !{!8}
!8 = !DIDerivedType(tag: DW_TAG_member, name: "size", scope: !6, file: !1, line: 2, baseType: !9, size: 64)
!9 = !DIBasicType(name: "long long unsigned int", size: 64, encoding: DW_ATE_unsigned)
!10 = !{i32 2, !"Dwarf Version", i32 4}
!11 = !{i32 2, !"Debug Info Version", i32 3}
!12 = !{i32 1, !"wchar_size", i32 4}
!13 = !{i32 1, !"min_enum_size", i32 4}
!14 = !{i32 7, !"PIC Level", i32 2}
!15 = !{!"clang version 6.0.0 (trunk 317231) (llvm/trunk 317262)"}
!16 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 6, type: !17, isLocal: false, isDefinition: true, scopeLine: 6, isOptimized: true, unit: !0, variables: !19)
!17 = !DISubroutineType(types: !18)
!18 = !{null}
!19 = !{!20, !22}
!20 = !DILocalVariable(name: "i", scope: !16, file: !1, line: 7, type: !21)
!21 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned)
!22 = !DILocalVariable(name: "info", scope: !23, file: !1, line: 9, type: !4)
!23 = distinct !DILexicalBlock(scope: !24, file: !1, line: 8, column: 10)
!24 = distinct !DILexicalBlock(scope: !16, file: !1, line: 8, column: 7)
!25 = !DILocation(line: 8, column: 7, scope: !24)
!26 = !DILocation(line: 8, column: 7, scope: !16)
!27 = !DILocation(line: 9, column: 20, scope: !23)
!28 = !DILocation(line: 9, column: 13, scope: !23)
!29 = !DILocation(line: 7, column: 16, scope: !16)
!30 = !DILocation(line: 10, column: 21, scope: !31)
!31 = distinct !DILexicalBlock(scope: !32, file: !1, line: 10, column: 5)
!32 = distinct !DILexicalBlock(scope: !23, file: !1, line: 10, column: 5)
!33 = !DILocation(line: 10, column: 19, scope: !31)
!34 = !DILocation(line: 10, column: 5, scope: !32)
!35 = !DILocation(line: 11, column: 19, scope: !31)
!36 = !DILocation(line: 11, column: 7, scope: !31)
!37 = !DILocation(line: 10, column: 25, scope: !31)
!38 = distinct !{!38, !34, !39}
!39 = !DILocation(line: 11, column: 23, scope: !32)
!40 = !DILocation(line: 13, column: 1, scope: !16)

Some files were not shown because too many files have changed in this diff Show More