103 lines · plain
1; RUN: llc < %s -O2 -mtriple=aarch64-none-linux-gnu 2 3; Bug 205984 5 6define void @test() #0 !dbg !4 {7entry:8 br label %for.body, !dbg !399 10for.body: ; preds = %for.body, %entry11 %arrayidx5 = getelementptr inbounds i32, ptr null, i64 1, !dbg !4312 %0 = load i32, ptr null, align 4, !dbg !45, !tbaa !4613 %s1 = sub nsw i32 0, %0, !dbg !5014 %n1 = sext i32 %s1 to i64, !dbg !5015 %arrayidx21 = getelementptr inbounds i32, ptr null, i64 3, !dbg !5116 %add53 = add nsw i64 %n1, 0, !dbg !5217 %add55 = add nsw i64 %n1, 0, !dbg !5318 %mul63 = mul nsw i64 %add53, -20995, !dbg !5419 tail call void @llvm.dbg.value(metadata i64 %mul63, i64 0, metadata !30, metadata !DIExpression()), !dbg !5520 %mul65 = mul nsw i64 %add55, -3196, !dbg !5621 %add67 = add nsw i64 0, %mul65, !dbg !5722 %add80 = add i64 0, 1024, !dbg !5823 %add81 = add i64 %add80, %mul63, !dbg !5824 %add82 = add i64 %add81, 0, !dbg !5825 %shr83351 = lshr i64 %add82, 11, !dbg !5826 %conv84 = trunc i64 %shr83351 to i32, !dbg !5827 store i32 %conv84, ptr %arrayidx21, align 4, !dbg !58, !tbaa !4628 %add86 = add i64 0, 1024, !dbg !5929 %add87 = add i64 %add86, 0, !dbg !5930 %add88 = add i64 %add87, %add67, !dbg !5931 %shr89352 = lshr i64 %add88, 11, !dbg !5932 %n2 = trunc i64 %shr89352 to i32, !dbg !5933 store i32 %n2, ptr %arrayidx5, align 4, !dbg !59, !tbaa !4634 br label %for.body, !dbg !3935}36 37; Function Attrs: nounwind readnone38declare void @llvm.dbg.value(metadata, i64, metadata, metadata) #139 40attributes #0 = { nounwind "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "use-soft-float"="false" }41attributes #1 = { nounwind readnone }42 43!llvm.dbg.cu = !{!0}44!llvm.module.flags = !{!36, !37}45!llvm.ident = !{!38}46 47!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.6.0 ", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2)48!1 = !DIFile(filename: "test.c", directory: "")49!2 = !{}50!4 = distinct !DISubprogram(name: "", line: 140, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 141, file: !1, scope: !1, type: !6, retainedNodes: !12)51!6 = !DISubroutineType(types: !7)52!7 = !{null, !8}53!8 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !9)54!9 = !DIDerivedType(tag: DW_TAG_typedef, line: 30, file: !1, baseType: !11)55!11 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)56!12 = !{!13, !14, !18, !19, !20, !21, !22, !23, !24, !25, !26, !27, !28, !29, !30, !31, !32, !33, !34, !35}57!13 = !DILocalVariable(name: "", line: 140, arg: 1, scope: !4, file: !1, type: !8)58!14 = !DILocalVariable(name: "", line: 142, scope: !4, file: !1, type: !15)59!15 = !DIDerivedType(tag: DW_TAG_typedef, line: 183, file: !1, baseType: !17)60!17 = !DIBasicType(tag: DW_TAG_base_type, size: 64, align: 64, encoding: DW_ATE_signed)61!18 = !DILocalVariable(name: "", line: 142, scope: !4, file: !1, type: !15)62!19 = !DILocalVariable(name: "", line: 142, scope: !4, file: !1, type: !15)63!20 = !DILocalVariable(name: "", line: 142, scope: !4, file: !1, type: !15)64!21 = !DILocalVariable(name: "", line: 142, scope: !4, file: !1, type: !15)65!22 = !DILocalVariable(name: "", line: 142, scope: !4, file: !1, type: !15)66!23 = !DILocalVariable(name: "", line: 142, scope: !4, file: !1, type: !15)67!24 = !DILocalVariable(name: "", line: 142, scope: !4, file: !1, type: !15)68!25 = !DILocalVariable(name: "", line: 143, scope: !4, file: !1, type: !15)69!26 = !DILocalVariable(name: "", line: 143, scope: !4, file: !1, type: !15)70!27 = !DILocalVariable(name: "", line: 143, scope: !4, file: !1, type: !15)71!28 = !DILocalVariable(name: "", line: 143, scope: !4, file: !1, type: !15)72!29 = !DILocalVariable(name: "", line: 144, scope: !4, file: !1, type: !15)73!30 = !DILocalVariable(name: "", line: 144, scope: !4, file: !1, type: !15)74!31 = !DILocalVariable(name: "", line: 144, scope: !4, file: !1, type: !15)75!32 = !DILocalVariable(name: "", line: 144, scope: !4, file: !1, type: !15)76!33 = !DILocalVariable(name: "", line: 144, scope: !4, file: !1, type: !15)77!34 = !DILocalVariable(name: "", line: 145, scope: !4, file: !1, type: !8)78!35 = !DILocalVariable(name: "", line: 146, scope: !4, file: !1, type: !11)79!36 = !{i32 2, !"Dwarf Version", i32 4}80!37 = !{i32 2, !"Debug Info Version", i32 3}81!38 = !{!"clang version 3.6.0 "}82!39 = !DILocation(line: 154, column: 8, scope: !40)83!40 = distinct !DILexicalBlock(line: 154, column: 8, file: !1, scope: !41)84!41 = distinct !DILexicalBlock(line: 154, column: 8, file: !1, scope: !42)85!42 = distinct !DILexicalBlock(line: 154, column: 3, file: !1, scope: !4)86!43 = !DILocation(line: 157, column: 5, scope: !44)87!44 = distinct !DILexicalBlock(line: 154, column: 42, file: !1, scope: !42)88!45 = !DILocation(line: 159, column: 5, scope: !44)89!46 = !{!47, !47, i64 0}90!47 = !{!"int", !48, i64 0}91!48 = !{!"omnipotent char", !49, i64 0}92!49 = !{!"Simple C/C++ TBAA"}93!50 = !DILocation(line: 160, column: 5, scope: !44)94!51 = !DILocation(line: 161, column: 5, scope: !44)95!52 = !DILocation(line: 188, column: 5, scope: !44)96!53 = !DILocation(line: 190, column: 5, scope: !44)97!54 = !DILocation(line: 198, column: 5, scope: !44)98!55 = !DILocation(line: 144, column: 13, scope: !4)99!56 = !DILocation(line: 200, column: 5, scope: !44)100!57 = !DILocation(line: 203, column: 5, scope: !44)101!58 = !DILocation(line: 207, column: 5, scope: !44)102!59 = !DILocation(line: 208, column: 5, scope: !44)103