1; RUN: llc < %s -O2 -mtriple=aarch64-none-linux-gnu 2 3; Bug 20598 4 5 6define void @test() #0 { 7entry: 8 br label %for.body, !dbg !39 9 10for.body: ; preds = %for.body, %entry 11 %arrayidx5 = getelementptr inbounds i32* null, i64 1, !dbg !43 12 %0 = load i32* null, align 4, !dbg !45, !tbaa !46 13 %s1 = sub nsw i32 0, %0, !dbg !50 14 %n1 = sext i32 %s1 to i64, !dbg !50 15 %arrayidx21 = getelementptr inbounds i32* null, i64 3, !dbg !51 16 %add53 = add nsw i64 %n1, 0, !dbg !52 17 %add55 = add nsw i64 %n1, 0, !dbg !53 18 %mul63 = mul nsw i64 %add53, -20995, !dbg !54 19 tail call void @llvm.dbg.value(metadata i64 %mul63, i64 0, metadata !30, metadata !{!"0x102"}), !dbg !55 20 %mul65 = mul nsw i64 %add55, -3196, !dbg !56 21 %add67 = add nsw i64 0, %mul65, !dbg !57 22 %add80 = add i64 0, 1024, !dbg !58 23 %add81 = add i64 %add80, %mul63, !dbg !58 24 %add82 = add i64 %add81, 0, !dbg !58 25 %shr83351 = lshr i64 %add82, 11, !dbg !58 26 %conv84 = trunc i64 %shr83351 to i32, !dbg !58 27 store i32 %conv84, i32* %arrayidx21, align 4, !dbg !58, !tbaa !46 28 %add86 = add i64 0, 1024, !dbg !59 29 %add87 = add i64 %add86, 0, !dbg !59 30 %add88 = add i64 %add87, %add67, !dbg !59 31 %shr89352 = lshr i64 %add88, 11, !dbg !59 32 %n2 = trunc i64 %shr89352 to i32, !dbg !59 33 store i32 %n2, i32* %arrayidx5, align 4, !dbg !59, !tbaa !46 34 br label %for.body, !dbg !39 35} 36 37; Function Attrs: nounwind readnone 38declare void @llvm.dbg.value(metadata, i64, metadata, metadata) #1 39 40attributes #0 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "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 = !{!"0x11\0012\00clang version 3.6.0 \001\00\000\00\001", !1, !2, !2, !3, !2, !2} ; [ DW_TAG_compile_unit ] [] [] [] 48!1 = !{!"test.c", !""} 49!2 = !{} 50!3 = !{!4} 51!4 = !{!"0x2e\00\00\00\00140\000\001\000\006\00256\001\00141", !1, !5, !6, null, void ()* @test, null, null, !12} ; [ DW_TAG_subprogram ] [] [] [def] [scope 141] [] 52!5 = !{!"0x29", !1} ; [ DW_TAG_file_type ] [] [] 53!6 = !{!"0x15\00\000\000\000\000\000\000", i32 0, null, null, !7, null, null, null} ; [ DW_TAG_subroutine_type ] [] [] [from ] 54!7 = !{null, !8} 55!8 = !{!"0xf\00\000\0064\0064\000\000", null, null, !9} ; [ DW_TAG_pointer_type ] [] [] [] 56!9 = !{!"0x16\00\0030\000\000\000\000", !10, null, !11} ; [ DW_TAG_typedef ] [] [] [] [from int] 57!10 = !{!"", !""} 58!11 = !{!"0x24\00int\000\0032\0032\000\000\005", null, null} ; [ DW_TAG_base_type ] [] [int] [] 59!12 = !{!13, !14, !18, !19, !20, !21, !22, !23, !24, !25, !26, !27, !28, !29, !30, !31, !32, !33, !34, !35} 60!13 = !{!"0x101\00\0016777356\000", !4, !5, !8} ; [ DW_TAG_arg_variable ] [] [data] [] 61!14 = !{!"0x100\00\00142\000", !4, !5, !15} ; [ DW_TAG_auto_variable ] [] [] [] 62!15 = !{!"0x16\00\00183\000\000\000\000", !16, null, !17} ; [ DW_TAG_typedef ] [] [INT32] [] [from long int] 63!16 = !{!"", !""} 64!17 = !{!"0x24\00\000\0064\0064\000\000\005", null, null} ; [ DW_TAG_base_type ] [] [long int] [] 65!18 = !{!"0x100\00\00142\000", !4, !5, !15} ; [ DW_TAG_auto_variable ] [] [] [] 66!19 = !{!"0x100\00\00142\000", !4, !5, !15} ; [ DW_TAG_auto_variable ] [] [] [] 67!20 = !{!"0x100\00\00142\000", !4, !5, !15} ; [ DW_TAG_auto_variable ] [] [] [] 68!21 = !{!"0x100\00\00142\000", !4, !5, !15} ; [ DW_TAG_auto_variable ] [] [] [] 69!22 = !{!"0x100\00\00142\000", !4, !5, !15} ; [ DW_TAG_auto_variable ] [] [] [] 70!23 = !{!"0x100\00\00142\000", !4, !5, !15} ; [ DW_TAG_auto_variable ] [] [] [] 71!24 = !{!"0x100\00\00142\000", !4, !5, !15} ; [ DW_TAG_auto_variable ] [ ] [] [] 72!25 = !{!"0x100\00\00143\000", !4, !5, !15} ; [ DW_TAG_auto_variable ] [ ] [] [] 73!26 = !{!"0x100\00\00143\000", !4, !5, !15} ; [ DW_TAG_auto_variable ] [ ] [] [] 74!27 = !{!"0x100\00\00143\000", !4, !5, !15} ; [ DW_TAG_auto_variable ] [ ] [] [] 75!28 = !{!"0x100\00\00143\000", !4, !5, !15} ; [ DW_TAG_auto_variable ] [ ] [] [] 76!29 = !{!"0x100\00\00144\000", !4, !5, !15} ; [ DW_TAG_auto_variable ] [ ] [] [] 77!30 = !{!"0x100\00\00144\000", !4, !5, !15} ; [ DW_TAG_auto_variable ] [ ] [] [] 78!31 = !{!"0x100\00\00144\000", !4, !5, !15} ; [ DW_TAG_auto_variable ] [ ] [] [] 79!32 = !{!"0x100\00\00144\000", !4, !5, !15} ; [ DW_TAG_auto_variable ] [ ] [] [] 80!33 = !{!"0x100\00\00144\000", !4, !5, !15} ; [ DW_TAG_auto_variable ] [ ] [] [] 81!34 = !{!"0x100\00\00145\000", !4, !5, !8} ; [ DW_TAG_auto_variable ] [ ] [] [] 82!35 = !{!"0x100\00\00146\000", !4, !5, !11} ; [ DW_TAG_auto_variable ] [ ] [] [] 83!36 = !{i32 2, !"Dwarf Version", i32 4} 84!37 = !{i32 2, !"Debug Info Version", i32 2} 85!38 = !{!"clang version 3.6.0 "} 86!39 = !MDLocation(line: 154, column: 8, scope: !40) 87!40 = !{!"0xb\00154\008\002", !1, !41} ; [ DW_TAG_lexical_block ] [ ] [] 88!41 = !{!"0xb\00154\008\001", !1, !42} ; [ DW_TAG_lexical_block ] [ ] [] 89!42 = !{!"0xb\00154\003\000", !1, !4} ; [ DW_TAG_lexical_block ] [ ] [] 90!43 = !MDLocation(line: 157, column: 5, scope: !44) 91!44 = !{!"0xb\00154\0042\000", !1, !42} ; [ DW_TAG_lexical_block ] [ ] [] 92!45 = !MDLocation(line: 159, column: 5, scope: !44) 93!46 = !{!47, !47, i64 0} 94!47 = !{!"int", !48, i64 0} 95!48 = !{!"omnipotent char", !49, i64 0} 96!49 = !{!"Simple C/C++ TBAA"} 97!50 = !MDLocation(line: 160, column: 5, scope: !44) 98!51 = !MDLocation(line: 161, column: 5, scope: !44) 99!52 = !MDLocation(line: 188, column: 5, scope: !44) 100!53 = !MDLocation(line: 190, column: 5, scope: !44) 101!54 = !MDLocation(line: 198, column: 5, scope: !44) 102!55 = !MDLocation(line: 144, column: 13, scope: !4) 103!56 = !MDLocation(line: 200, column: 5, scope: !44) 104!57 = !MDLocation(line: 203, column: 5, scope: !44) 105!58 = !MDLocation(line: 207, column: 5, scope: !44) 106!59 = !MDLocation(line: 208, column: 5, scope: !44) 107