xref: /aosp_15_r20/external/llvm/test/DebugInfo/X86/float_const.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -filetype=obj | llvm-dwarfdump -debug-dump=info - | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker; from (at -Os):
3*9880d681SAndroid Build Coastguard Worker; void foo() {
4*9880d681SAndroid Build Coastguard Worker;   float a = 3.14;
5*9880d681SAndroid Build Coastguard Worker;   *(int *)&a = 0;
6*9880d681SAndroid Build Coastguard Worker; }
7*9880d681SAndroid Build Coastguard Workertarget datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
8*9880d681SAndroid Build Coastguard Workertarget triple = "x86_64-apple-macosx10.10.0"
9*9880d681SAndroid Build Coastguard Worker
10*9880d681SAndroid Build Coastguard Worker; Function Attrs: nounwind optsize readnone uwtable
11*9880d681SAndroid Build Coastguard Workerdefine void @foo() #0 !dbg !7 {
12*9880d681SAndroid Build Coastguard Workerentry:
13*9880d681SAndroid Build Coastguard Worker  tail call void @llvm.dbg.declare(metadata float* undef, metadata !13, metadata !19), !dbg !20
14*9880d681SAndroid Build Coastguard Worker  tail call void @llvm.dbg.value(metadata i32 1078523331, i64 0, metadata !13, metadata !19), !dbg !20
15*9880d681SAndroid Build Coastguard Worker  tail call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !13, metadata !19), !dbg !20
16*9880d681SAndroid Build Coastguard Worker; CHECK:  DW_AT_const_value [DW_FORM_sdata]    (0)
17*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: DW_AT_name {{.*}}"a"
18*9880d681SAndroid Build Coastguard Worker  ret void, !dbg !21
19*9880d681SAndroid Build Coastguard Worker}
20*9880d681SAndroid Build Coastguard Worker
21*9880d681SAndroid Build Coastguard Worker; Function Attrs: nounwind readnone
22*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.dbg.declare(metadata, metadata, metadata) #1
23*9880d681SAndroid Build Coastguard Worker
24*9880d681SAndroid Build Coastguard Worker; Function Attrs: nounwind readnone
25*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.dbg.value(metadata, i64, metadata, metadata) #1
26*9880d681SAndroid Build Coastguard Worker
27*9880d681SAndroid Build Coastguard Workerattributes #0 = { nounwind optsize readnone uwtable }
28*9880d681SAndroid Build Coastguard Workerattributes #1 = { nounwind readnone }
29*9880d681SAndroid Build Coastguard Worker
30*9880d681SAndroid Build Coastguard Worker!llvm.dbg.cu = !{!0}
31*9880d681SAndroid Build Coastguard Worker!llvm.module.flags = !{!15, !16, !17}
32*9880d681SAndroid Build Coastguard Worker!llvm.ident = !{!18}
33*9880d681SAndroid Build Coastguard Worker
34*9880d681SAndroid Build Coastguard Worker!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.7.0 (trunk 227686)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !2, imports: !2)
35*9880d681SAndroid Build Coastguard Worker!1 = !DIFile(filename: "foo.c", directory: "")
36*9880d681SAndroid Build Coastguard Worker!2 = !{}
37*9880d681SAndroid Build Coastguard Worker!3 = !{!4}
38*9880d681SAndroid Build Coastguard Worker!4 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !5)
39*9880d681SAndroid Build Coastguard Worker!5 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
40*9880d681SAndroid Build Coastguard Worker!7 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, isOptimized: true, unit: !0, scopeLine: 1, file: !8, scope: !9, type: !10, variables: !12)
41*9880d681SAndroid Build Coastguard Worker!8 = !DIFile(filename: "foo.c", directory: "")
42*9880d681SAndroid Build Coastguard Worker!9 = !DIFile(filename: "foo.c", directory: "")
43*9880d681SAndroid Build Coastguard Worker!10 = !DISubroutineType(types: !11)
44*9880d681SAndroid Build Coastguard Worker!11 = !{null}
45*9880d681SAndroid Build Coastguard Worker!12 = !{!13}
46*9880d681SAndroid Build Coastguard Worker!13 = !DILocalVariable(name: "a", line: 2, scope: !7, file: !9, type: !14)
47*9880d681SAndroid Build Coastguard Worker!14 = !DIBasicType(tag: DW_TAG_base_type, name: "float", size: 32, align: 32, encoding: DW_ATE_float)
48*9880d681SAndroid Build Coastguard Worker!15 = !{i32 2, !"Dwarf Version", i32 2}
49*9880d681SAndroid Build Coastguard Worker!16 = !{i32 2, !"Debug Info Version", i32 3}
50*9880d681SAndroid Build Coastguard Worker!17 = !{i32 1, !"PIC Level", i32 2}
51*9880d681SAndroid Build Coastguard Worker!18 = !{!"clang version 3.7.0 (trunk 227686)"}
52*9880d681SAndroid Build Coastguard Worker!19 = !DIExpression()
53*9880d681SAndroid Build Coastguard Worker!20 = !DILocation(line: 2, column: 9, scope: !7)
54*9880d681SAndroid Build Coastguard Worker!21 = !DILocation(line: 4, column: 1, scope: !7)
55