brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.8 KiB · 0e8879e Raw
72 lines · plain
1; RUN: opt -passes=sroa -S -o - %s \2; RUN: | FileCheck %s --implicit-check-not="#dbg_"3;4;; Based on llvm/test/DebugInfo/ARM/sroa-complex.ll5;; generated from:6;; $ cat test.c7;; void f(_Complex double c) { c = 0; }8;; $ clang test.c -g -O2 -c -Xclang -disable-llvm-passes -S \9;;     -emit-llvm -o - --target="thumbv7-apple-unknown"10;;11;; Commented out some parts of the function that are not relevant to the test.12;;13;; Check that a split store gets dbg.assigns fragments. Ensure that only the14;; value-expression gets fragment info; that the address-expression remains15;; untouched.16 17;; dbg.assigns for the split (then promoted) stores.18; CHECK: %c.coerce.fca.0.extract = extractvalue [2 x i64] %c.coerce, 019; CHECK: %c.coerce.fca.1.extract = extractvalue [2 x i64] %c.coerce, 120; CHECK: #dbg_value(i64 %c.coerce.fca.0.extract,{{.+}}, !DIExpression(DW_OP_LLVM_fragment, 0, 64),21; CHECK: #dbg_value(i64 %c.coerce.fca.1.extract,{{.+}}, !DIExpression(DW_OP_LLVM_fragment, 64, 64),22 23target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"24target triple = "armv7-apple-unknown"25 26define dso_local arm_aapcscc void @f([2 x i64] %c.coerce) #0 !dbg !8 {27entry:28  %c = alloca { double, double }, align 8, !DIAssignID !1429  call void @llvm.dbg.assign(metadata i1 undef, metadata !13, metadata !DIExpression(), metadata !14, metadata ptr %c, metadata !DIExpression()), !dbg !1530  %0 = bitcast ptr %c to ptr31  store [2 x i64] %c.coerce, ptr %0, align 8, !DIAssignID !1632  call void @llvm.dbg.assign(metadata [2 x i64] %c.coerce, metadata !13, metadata !DIExpression(), metadata !16, metadata ptr %0, metadata !DIExpression()), !dbg !1533  ; --- The rest of this function isn't useful for the test ---34  ;%c.realp = getelementptr inbounds { double, double }, ptr %c, i32 0, i32 0, !dbg !1735  ;%c.imagp = getelementptr inbounds { double, double }, ptr %c, i32 0, i32 1, !dbg !1736  ;store double 0.000000e+00, ptr %c.realp, align 8, !dbg !17, !DIAssignID !1837  ;call void @llvm.dbg.assign(metadata double 0.000000e+00, metadata !13, metadata !DIExpression(DW_OP_LLVM_fragment, 0, 64), metadata !18, metadata ptr %c.realp, metadata !DIExpression()), !dbg !1538  ;store double 0.000000e+00, ptr %c.imagp, align 8, !dbg !17, !DIAssignID !1939  ;call void @llvm.dbg.assign(metadata double 0.000000e+00, metadata !13, metadata !DIExpression(DW_OP_LLVM_fragment, 64, 64), metadata !19, metadata ptr %c.imagp, metadata !DIExpression()), !dbg !1540  ret void, !dbg !2041}42 43declare void @llvm.dbg.declare(metadata, metadata, metadata)44declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata)45 46!llvm.dbg.cu = !{!0}47!llvm.module.flags = !{!3, !4, !5, !6, !1000}48!llvm.ident = !{!7}49 50!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 12.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None)51!1 = !DIFile(filename: "test.c", directory: "/")52!2 = !{}53!3 = !{i32 7, !"Dwarf Version", i32 4}54!4 = !{i32 2, !"Debug Info Version", i32 3}55!5 = !{i32 1, !"wchar_size", i32 4}56!6 = !{i32 1, !"min_enum_size", i32 4}57!7 = !{!"clang version 12.0.0"}58!8 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 2, type: !9, scopeLine: 2, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !12)59!9 = !DISubroutineType(types: !10)60!10 = !{null, !11}61!11 = !DIBasicType(name: "complex", size: 128, encoding: DW_ATE_complex_float)62!12 = !{!13}63!13 = !DILocalVariable(name: "c", arg: 1, scope: !8, file: !1, line: 2, type: !11)64!14 = distinct !DIAssignID()65!15 = !DILocation(line: 0, scope: !8)66!16 = distinct !DIAssignID()67!17 = !DILocation(line: 2, column: 31, scope: !8)68!18 = distinct !DIAssignID()69!19 = distinct !DIAssignID()70!20 = !DILocation(line: 2, column: 36, scope: !8)71!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true}72