brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.6 KiB · 4637f37 Raw
65 lines · plain
1; RUN: opt -passes=early-cse -earlycse-debug-hash -S %s -o - | FileCheck %s2target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"3 4; Function Attrs: nounwind uwtable5define i32 @foo() !dbg !6 {6entry:7  %0 = call i64 @llvm.ctpop.i64(i64 0), !dbg !148  %1 = inttoptr i64 %0 to ptr, !dbg !149  call void @llvm.dbg.value(metadata ptr %1, i64 0, metadata !11, metadata !13), !dbg !1410; CHECK: #dbg_value(i64 0, !11, !DIExpression(), !1311  %call = call ptr (...) @baa(), !dbg !1512  %2 = ptrtoint ptr %call to i64, !dbg !1613  %3 = inttoptr i64 %2 to ptr, !dbg !1614  call void @llvm.dbg.value(metadata ptr %3, i64 0, metadata !11, metadata !13), !dbg !1415  %tobool = icmp ne ptr %3, null, !dbg !1716  br i1 %tobool, label %if.end, label %if.then, !dbg !1917 18if.then:                                          ; preds = %entry19  br label %cleanup, !dbg !2020 21if.end:                                           ; preds = %entry22  %4 = ptrtoint ptr %3 to i32, !dbg !2123  br label %cleanup, !dbg !2224 25cleanup:                                          ; preds = %if.end, %if.then26  %retval.0 = phi i32 [ %4, %if.end ], [ 0, %if.then ]27  ret i32 %retval.0, !dbg !2228}29 30declare ptr @baa(...)31 32; Function Attrs: nounwind readnone33declare i64 @llvm.ctpop.i64(i64)34 35; Function Attrs: nounwind readnone36declare void @llvm.dbg.value(metadata, i64, metadata, metadata)37 38!llvm.dbg.cu = !{!0}39!llvm.module.flags = !{!3, !4}40!llvm.ident = !{!5}41 42!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 6.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)43!1 = !DIFile(filename: "test.c", directory: "/dir")44!2 = !{}45!3 = !{i32 2, !"Dwarf Version", i32 4}46!4 = !{i32 2, !"Debug Info Version", i32 3}47!5 = !{!"clang version 6.0.0"}48!6 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 3, type: !7, isLocal: false, isDefinition: true, scopeLine: 3, isOptimized: true, unit: !0, retainedNodes: !10)49!7 = !DISubroutineType(types: !8)50!8 = !{!9}51!9 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)52!10 = !{!11}53!11 = !DILocalVariable(name: "ptr", scope: !6, file: !1, line: 4, type: !12)54!12 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !9, size: 64)55!13 = !DIExpression()56!14 = !DILocation(line: 4, column: 8, scope: !6)57!15 = !DILocation(line: 5, column: 9, scope: !6)58!16 = !DILocation(line: 5, column: 7, scope: !6)59!17 = !DILocation(line: 7, column: 7, scope: !18)60!18 = distinct !DILexicalBlock(scope: !6, file: !1, line: 7, column: 6)61!19 = !DILocation(line: 7, column: 6, scope: !6)62!20 = !DILocation(line: 8, column: 5, scope: !18)63!21 = !DILocation(line: 10, column: 10, scope: !6)64!22 = !DILocation(line: 11, column: 1, scope: !6)65