xref: /llvm-project/llvm/test/Transforms/LoopIdiom/dbginfo-cost.ll (revision 48c6b2729e2111bec08799c65b8b459e12413546)
1*48c6b272SRoman Lebedev; RUN: opt -S -passes=loop-idiom -mtriple=systemz-unknown -mcpu=z13 %s | FileCheck %s
2cee313d2SEric Christopher
3cee313d2SEric Christopher; CHECK: @llvm.ctlz.i32
4cee313d2SEric Christopher
5cee313d2SEric Christopherdeclare void @llvm.dbg.declare(metadata, metadata, metadata) #0
6cee313d2SEric Christopherdefine dso_local i32 @CeilLog2(i32 %arg) local_unnamed_addr #1 !dbg !38 {
7cee313d2SEric Christopherbb:
8cee313d2SEric Christopher  %tmp4 = add i32 %arg, -1, !dbg !45
9cee313d2SEric Christopher  call void @llvm.dbg.value(metadata i32 0, metadata !44, metadata !DIExpression()), !dbg !45
10cee313d2SEric Christopher  %tmp71 = icmp eq i32 %tmp4, 0, !dbg !45
11cee313d2SEric Christopher  br i1 %tmp71, label %bb13, label %bb8.preheader, !dbg !48
12cee313d2SEric Christopher
13cee313d2SEric Christopherbb8.preheader:                                    ; preds = %bb
14cee313d2SEric Christopher  br label %bb8, !dbg !49
15cee313d2SEric Christopher
16cee313d2SEric Christopherbb8:                                              ; preds = %bb8.preheader, %bb8
17cee313d2SEric Christopher  %tmp2.03 = phi i32 [ %tmp12, %bb8 ], [ 0, %bb8.preheader ]
18cee313d2SEric Christopher  %tmp1.02 = phi i32 [ %tmp10, %bb8 ], [ %tmp4, %bb8.preheader ]
19cee313d2SEric Christopher  call void @llvm.dbg.value(metadata i32 %tmp2.03, metadata !44, metadata !DIExpression()), !dbg !45
20cee313d2SEric Christopher  %tmp10 = lshr i32 %tmp1.02, 1, !dbg !49
21cee313d2SEric Christopher  %tmp12 = add nuw nsw i32 %tmp2.03, 1, !dbg !51
22cee313d2SEric Christopher  call void @llvm.dbg.value(metadata i32 %tmp12, metadata !44, metadata !DIExpression()), !dbg !45
23cee313d2SEric Christopher  %tmp7 = icmp eq i32 %tmp10, 0, !dbg !45
24cee313d2SEric Christopher  br i1 %tmp7, label %bb13.loopexit, label %bb8, !dbg !48, !llvm.loop !52
25cee313d2SEric Christopher
26cee313d2SEric Christopherbb13.loopexit:                                    ; preds = %bb8
27cee313d2SEric Christopher  %tmp12.lcssa = phi i32 [ %tmp12, %bb8 ], !dbg !51
28cee313d2SEric Christopher  br label %bb13, !dbg !54
29cee313d2SEric Christopher
30cee313d2SEric Christopherbb13:                                             ; preds = %bb13.loopexit, %bb
31cee313d2SEric Christopher  %tmp2.0.lcssa = phi i32 [ 0, %bb ], [ %tmp12.lcssa, %bb13.loopexit ], !dbg !55
32cee313d2SEric Christopher  call void @llvm.dbg.value(metadata i32 %tmp2.0.lcssa, metadata !44, metadata !DIExpression()), !dbg !45
33cee313d2SEric Christopher  ret i32 %tmp2.0.lcssa, !dbg !54
34cee313d2SEric Christopher}
35cee313d2SEric Christopher
36cee313d2SEric Christopher; Function Attrs: nounwind readnone speculatable
37cee313d2SEric Christopherdeclare void @llvm.dbg.value(metadata, metadata, metadata) #2
38cee313d2SEric Christopher
39cee313d2SEric Christopherattributes #0 = { nounwind readnone speculatable "target-cpu"="z13" }
40cee313d2SEric Christopherattributes #1 = { norecurse nounwind readnone "target-cpu"="z13" "use-soft-float"="false" }
41cee313d2SEric Christopherattributes #2 = { nounwind readnone speculatable }
42cee313d2SEric Christopher
43cee313d2SEric Christopher!llvm.dbg.cu = !{!0}
44cee313d2SEric Christopher!llvm.module.flags = !{!36, !37}
45cee313d2SEric Christopher
46cee313d2SEric Christopher!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 9.0.0 (ijonpan@m35lp38.lnxne.boe:llvm/llvm-dev-2/tools/clang a87ff88c6466fbedd6281513b9480a2cad6c08c8) (llvm/llvm-dev-2 922a3b1b3254bf3310c467e880a5419c1e13c87f)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !2, nameTableKind: None)
47cee313d2SEric Christopher!1 = !DIFile(filename: "configfile.c", directory: "/home/ijonpan/minispec-2006/spec-llvm/464.h264ref/build")
48cee313d2SEric Christopher!2 = !{}
49cee313d2SEric Christopher!4 = !DIFile(filename: "./global.h", directory: "/home/ijonpan/minispec-2006/spec-llvm/464.h264ref/build")
50cee313d2SEric Christopher!5 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned)
51cee313d2SEric Christopher!36 = !{i32 2, !"Debug Info Version", i32 3}
52cee313d2SEric Christopher!37 = !{i32 1, !"wchar_size", i32 4}
53cee313d2SEric Christopher!38 = distinct !DISubprogram(name: "CeilLog2", scope: !1, file: !1, line: 599, type: !39, scopeLine: 600, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !41)
54cee313d2SEric Christopher!39 = !DISubroutineType(types: !40)
55cee313d2SEric Christopher!40 = !{!5, !5}
56cee313d2SEric Christopher!41 = !{!42, !43, !44}
57cee313d2SEric Christopher!42 = !DILocalVariable(name: "uiVal", arg: 1, scope: !38, file: !1, line: 599, type: !5)
58cee313d2SEric Christopher!43 = !DILocalVariable(name: "uiTmp", scope: !38, file: !1, line: 601, type: !5)
59cee313d2SEric Christopher!44 = !DILocalVariable(name: "uiRet", scope: !38, file: !1, line: 602, type: !5)
60cee313d2SEric Christopher!45 = !DILocation(line: 601, column: 25, scope: !38)
61cee313d2SEric Christopher!48 = !DILocation(line: 604, column: 3, scope: !38)
62cee313d2SEric Christopher!49 = !DILocation(line: 606, column: 11, scope: !50)
63cee313d2SEric Christopher!50 = distinct !DILexicalBlock(scope: !38, file: !1, line: 605, column: 3)
64cee313d2SEric Christopher!51 = !DILocation(line: 607, column: 10, scope: !50)
65cee313d2SEric Christopher!52 = distinct !{!52, !48, !53}
66cee313d2SEric Christopher!53 = !DILocation(line: 608, column: 3, scope: !38)
67cee313d2SEric Christopher!54 = !DILocation(line: 609, column: 3, scope: !38)
68cee313d2SEric Christopher!55 = !DILocation(line: 0, scope: !38)
69