brintos

brintos / llvm-project-archived public Read only

0
0
Text · 6.8 KiB · 8eb0f3a Raw
137 lines · plain
1; RUN: opt -passes=deadargelim -S < %s | FileCheck %s2target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"3 4%struct.Channel = type { i32, i32 }5 6; Function Attrs: nounwind uwtable7define void @f2(i32 %m, i32 %n) #0 !dbg !7 {8entry:9  call void @llvm.dbg.value(metadata i32 %m, metadata !12, metadata !DIExpression()), !dbg !2110  call void @llvm.dbg.value(metadata i32 %n, metadata !13, metadata !DIExpression()), !dbg !2211  call void @llvm.dbg.value(metadata ptr null, metadata !14, metadata !DIExpression()), !dbg !2312  %call = call ptr (...) @foo(), !dbg !2413  call void @llvm.dbg.value(metadata ptr %call, metadata !14, metadata !DIExpression()), !dbg !2314  %cmp = icmp sgt i32 %m, 3, !dbg !2515  br i1 %cmp, label %if.then, label %if.end, !dbg !2716 17if.then:                                          ; preds = %entry18  %call1 = call zeroext i1 @f1(i1 zeroext true, ptr %call), !dbg !2819  br label %if.end, !dbg !2820 21if.end:                                           ; preds = %if.then, %entry22  %cmp2 = icmp sgt i32 %n, %m, !dbg !2923  br i1 %cmp2, label %if.then3, label %if.end5, !dbg !3124 25if.then3:                                         ; preds = %if.end26  %call4 = call zeroext i1 @f1(i1 zeroext false, ptr %call), !dbg !3227  br label %if.end5, !dbg !3228 29if.end5:                                          ; preds = %if.then3, %if.end30  ret void, !dbg !3331}32 33declare ptr @foo(...) local_unnamed_addr #134 35; Function Attrs: noinline nounwind uwtable36define internal zeroext i1 @f1(i1 zeroext %is_y, ptr %str) #4 !dbg !34 {37entry:38  %frombool = zext i1 %is_y to i839; CHECK: #dbg_value(i1 %is_y, !39, !DIExpression(), !4240  call void @llvm.dbg.value(metadata i1 %is_y, metadata !39, metadata !DIExpression()), !dbg !4241; CHECK: #dbg_value(ptr %str, !40, !DIExpression(), !4342  call void @llvm.dbg.value(metadata ptr %str, metadata !40, metadata !DIExpression()), !dbg !4343  call void @llvm.dbg.value(metadata ptr null, metadata !41, metadata !DIExpression()), !dbg !4444  %tobool = icmp ne ptr %str, null, !dbg !4545  br i1 %tobool, label %if.end, label %if.then, !dbg !4746 47if.then:                                          ; preds = %entry48  call void (...) @baa(), !dbg !4849  br label %cleanup, !dbg !5050 51if.end:                                           ; preds = %entry52  %call = call ptr (...) @foo(), !dbg !5153  call void @llvm.dbg.value(metadata ptr %call, metadata !41, metadata !DIExpression()), !dbg !4454  %tobool1 = trunc i8 %frombool to i1, !dbg !5255  br i1 %tobool1, label %if.then2, label %if.end3, !dbg !5656 57if.then2:                                         ; preds = %if.end58  call void (...) @baa(), !dbg !5759  br label %cleanup, !dbg !5660 61if.end3:                                          ; preds = %if.end62  br label %cleanup, !dbg !5663 64cleanup:                                          ; preds = %if.end3, %if.then2, %if.then65  %retval.0 = phi i1 [ false, %if.then2 ], [ true, %if.end3 ], [ false, %if.then ]66; CHECK: ret void, !dbg67  ret i1 %retval.0, !dbg !5668}69 70declare void @baa(...) local_unnamed_addr #171 72; Function Attrs: nounwind readnone speculatable73declare void @llvm.dbg.value(metadata, metadata, metadata) #374 75!llvm.dbg.cu = !{!0}76!llvm.module.flags = !{!3, !4, !5}77!llvm.ident = !{!6}78 79!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 7.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)80!1 = !DIFile(filename: "test.c", directory: "/dir")81!2 = !{}82!3 = !{i32 2, !"Dwarf Version", i32 4}83!4 = !{i32 2, !"Debug Info Version", i32 3}84!5 = !{i32 1, !"wchar_size", i32 4}85!6 = !{!"clang version 7.0.0"}86!7 = distinct !DISubprogram(name: "f2", scope: !1, file: !1, line: 31, type: !8, isLocal: false, isDefinition: true, scopeLine: 32, flags: DIFlagPrototyped, isOptimized: true, unit: !0, retainedNodes: !11)87!8 = !DISubroutineType(types: !9)88!9 = !{null, !10, !10}89!10 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)90!11 = !{!12, !13, !14}91!12 = !DILocalVariable(name: "m", arg: 1, scope: !7, file: !1, line: 31, type: !10)92!13 = !DILocalVariable(name: "n", arg: 2, scope: !7, file: !1, line: 31, type: !10)93!14 = !DILocalVariable(name: "str3", scope: !7, file: !1, line: 33, type: !15)94!15 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !16, size: 64)95!16 = !DIDerivedType(tag: DW_TAG_typedef, name: "channel", file: !1, line: 6, baseType: !17)96!17 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "Channel", file: !1, line: 3, size: 64, elements: !18)97!18 = !{!19, !20}98!19 = !DIDerivedType(tag: DW_TAG_member, name: "x", scope: !17, file: !1, line: 4, baseType: !10, size: 32)99!20 = !DIDerivedType(tag: DW_TAG_member, name: "y", scope: !17, file: !1, line: 5, baseType: !10, size: 32, offset: 32)100!21 = !DILocation(line: 31, column: 13, scope: !7)101!22 = !DILocation(line: 31, column: 20, scope: !7)102!23 = !DILocation(line: 33, column: 11, scope: !7)103!24 = !DILocation(line: 34, column: 9, scope: !7)104!25 = !DILocation(line: 36, column: 8, scope: !26)105!26 = distinct !DILexicalBlock(scope: !7, file: !1, line: 36, column: 6)106!27 = !DILocation(line: 36, column: 6, scope: !7)107!28 = !DILocation(line: 37, column: 3, scope: !26)108!29 = !DILocation(line: 39, column: 8, scope: !30)109!30 = distinct !DILexicalBlock(scope: !7, file: !1, line: 39, column: 6)110!31 = !DILocation(line: 39, column: 6, scope: !7)111!32 = !DILocation(line: 40, column: 3, scope: !30)112!33 = !DILocation(line: 41, column: 1, scope: !7)113!34 = distinct !DISubprogram(name: "f1", scope: !1, file: !1, line: 12, type: !35, isLocal: true, isDefinition: true, scopeLine: 13, flags: DIFlagPrototyped, isOptimized: true, unit: !0, retainedNodes: !38)114!35 = !DISubroutineType(types: !36)115!36 = !{!37, !37, !15}116!37 = !DIBasicType(name: "_Bool", size: 8, encoding: DW_ATE_boolean)117!38 = !{!39, !40, !41}118!39 = !DILocalVariable(name: "is_y", arg: 1, scope: !34, file: !1, line: 12, type: !37)119!40 = !DILocalVariable(name: "str", arg: 2, scope: !34, file: !1, line: 12, type: !15)120!41 = !DILocalVariable(name: "str2", scope: !34, file: !1, line: 14, type: !15)121!42 = !DILocation(line: 12, column: 21, scope: !34)122!43 = !DILocation(line: 12, column: 36, scope: !34)123!44 = !DILocation(line: 14, column: 11, scope: !34)124!45 = !DILocation(line: 16, column: 7, scope: !46)125!46 = distinct !DILexicalBlock(scope: !34, file: !1, line: 16, column: 6)126!47 = !DILocation(line: 16, column: 6, scope: !34)127!48 = !DILocation(line: 17, column: 3, scope: !49)128!49 = distinct !DILexicalBlock(scope: !46, file: !1, line: 16, column: 11)129!50 = !DILocation(line: 18, column: 3, scope: !49)130!51 = !DILocation(line: 21, column: 9, scope: !34)131!52 = !DILocation(line: 23, column: 6, scope: !34)132!53 = !DILocation(line: 24, column: 3, scope: !54)133!54 = distinct !DILexicalBlock(scope: !55, file: !1, line: 23, column: 11)134!55 = distinct !DILexicalBlock(scope: !34, file: !1, line: 23, column: 6)135!56 = !DILocation(line: 25, column: 3, scope: !54)136!57 = !DILocation(line: 28, column: 2, scope: !34)137