xref: /aosp_15_r20/external/llvm/test/CodeGen/AArch64/aarch64-2014-08-11-MachineCombinerCrash.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -O2 -mtriple=aarch64-none-linux-gnu
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker; Bug 20598
4*9880d681SAndroid Build Coastguard Worker
5*9880d681SAndroid Build Coastguard Worker
6*9880d681SAndroid Build Coastguard Workerdefine void @test() #0 !dbg !4 {
7*9880d681SAndroid Build Coastguard Workerentry:
8*9880d681SAndroid Build Coastguard Worker  br label %for.body, !dbg !39
9*9880d681SAndroid Build Coastguard Worker
10*9880d681SAndroid Build Coastguard Workerfor.body:                                         ; preds = %for.body, %entry
11*9880d681SAndroid Build Coastguard Worker  %arrayidx5 = getelementptr inbounds i32, i32* null, i64 1, !dbg !43
12*9880d681SAndroid Build Coastguard Worker  %0 = load i32, i32* null, align 4, !dbg !45, !tbaa !46
13*9880d681SAndroid Build Coastguard Worker  %s1 = sub nsw i32 0, %0, !dbg !50
14*9880d681SAndroid Build Coastguard Worker  %n1 = sext i32 %s1 to i64, !dbg !50
15*9880d681SAndroid Build Coastguard Worker  %arrayidx21 = getelementptr inbounds i32, i32* null, i64 3, !dbg !51
16*9880d681SAndroid Build Coastguard Worker  %add53 = add nsw i64 %n1, 0, !dbg !52
17*9880d681SAndroid Build Coastguard Worker  %add55 = add nsw i64 %n1, 0, !dbg !53
18*9880d681SAndroid Build Coastguard Worker  %mul63 = mul nsw i64 %add53, -20995, !dbg !54
19*9880d681SAndroid Build Coastguard Worker  tail call void @llvm.dbg.value(metadata i64 %mul63, i64 0, metadata !30, metadata !DIExpression()), !dbg !55
20*9880d681SAndroid Build Coastguard Worker  %mul65 = mul nsw i64 %add55, -3196, !dbg !56
21*9880d681SAndroid Build Coastguard Worker  %add67 = add nsw i64 0, %mul65, !dbg !57
22*9880d681SAndroid Build Coastguard Worker  %add80 = add i64 0, 1024, !dbg !58
23*9880d681SAndroid Build Coastguard Worker  %add81 = add i64 %add80, %mul63, !dbg !58
24*9880d681SAndroid Build Coastguard Worker  %add82 = add i64 %add81, 0, !dbg !58
25*9880d681SAndroid Build Coastguard Worker  %shr83351 = lshr i64 %add82, 11, !dbg !58
26*9880d681SAndroid Build Coastguard Worker  %conv84 = trunc i64 %shr83351 to i32, !dbg !58
27*9880d681SAndroid Build Coastguard Worker  store i32 %conv84, i32* %arrayidx21, align 4, !dbg !58, !tbaa !46
28*9880d681SAndroid Build Coastguard Worker  %add86 = add i64 0, 1024, !dbg !59
29*9880d681SAndroid Build Coastguard Worker  %add87 = add i64 %add86, 0, !dbg !59
30*9880d681SAndroid Build Coastguard Worker  %add88 = add i64 %add87, %add67, !dbg !59
31*9880d681SAndroid Build Coastguard Worker  %shr89352 = lshr i64 %add88, 11, !dbg !59
32*9880d681SAndroid Build Coastguard Worker  %n2 = trunc i64 %shr89352 to i32, !dbg !59
33*9880d681SAndroid Build Coastguard Worker  store i32 %n2, i32* %arrayidx5, align 4, !dbg !59, !tbaa !46
34*9880d681SAndroid Build Coastguard Worker  br label %for.body, !dbg !39
35*9880d681SAndroid Build Coastguard Worker}
36*9880d681SAndroid Build Coastguard Worker
37*9880d681SAndroid Build Coastguard Worker; Function Attrs: nounwind readnone
38*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.dbg.value(metadata, i64, metadata, metadata) #1
39*9880d681SAndroid Build Coastguard Worker
40*9880d681SAndroid Build Coastguard Workerattributes #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" }
41*9880d681SAndroid Build Coastguard Workerattributes #1 = { nounwind readnone }
42*9880d681SAndroid Build Coastguard Worker
43*9880d681SAndroid Build Coastguard Worker!llvm.dbg.cu = !{!0}
44*9880d681SAndroid Build Coastguard Worker!llvm.module.flags = !{!36, !37}
45*9880d681SAndroid Build Coastguard Worker!llvm.ident = !{!38}
46*9880d681SAndroid Build Coastguard Worker
47*9880d681SAndroid Build Coastguard Worker!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*9880d681SAndroid Build Coastguard Worker!1 = !DIFile(filename: "test.c", directory: "")
49*9880d681SAndroid Build Coastguard Worker!2 = !{}
50*9880d681SAndroid Build Coastguard Worker!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, variables: !12)
51*9880d681SAndroid Build Coastguard Worker!6 = !DISubroutineType(types: !7)
52*9880d681SAndroid Build Coastguard Worker!7 = !{null, !8}
53*9880d681SAndroid Build Coastguard Worker!8 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !9)
54*9880d681SAndroid Build Coastguard Worker!9 = !DIDerivedType(tag: DW_TAG_typedef, line: 30, file: !1, baseType: !11)
55*9880d681SAndroid Build Coastguard Worker!11 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
56*9880d681SAndroid Build Coastguard Worker!12 = !{!13, !14, !18, !19, !20, !21, !22, !23, !24, !25, !26, !27, !28, !29, !30, !31, !32, !33, !34, !35}
57*9880d681SAndroid Build Coastguard Worker!13 = !DILocalVariable(name: "", line: 140, arg: 1, scope: !4, file: !1, type: !8)
58*9880d681SAndroid Build Coastguard Worker!14 = !DILocalVariable(name: "", line: 142, scope: !4, file: !1, type: !15)
59*9880d681SAndroid Build Coastguard Worker!15 = !DIDerivedType(tag: DW_TAG_typedef, line: 183, file: !1, baseType: !17)
60*9880d681SAndroid Build Coastguard Worker!17 = !DIBasicType(tag: DW_TAG_base_type, size: 64, align: 64, encoding: DW_ATE_signed)
61*9880d681SAndroid Build Coastguard Worker!18 = !DILocalVariable(name: "", line: 142, scope: !4, file: !1, type: !15)
62*9880d681SAndroid Build Coastguard Worker!19 = !DILocalVariable(name: "", line: 142, scope: !4, file: !1, type: !15)
63*9880d681SAndroid Build Coastguard Worker!20 = !DILocalVariable(name: "", line: 142, scope: !4, file: !1, type: !15)
64*9880d681SAndroid Build Coastguard Worker!21 = !DILocalVariable(name: "", line: 142, scope: !4, file: !1, type: !15)
65*9880d681SAndroid Build Coastguard Worker!22 = !DILocalVariable(name: "", line: 142, scope: !4, file: !1, type: !15)
66*9880d681SAndroid Build Coastguard Worker!23 = !DILocalVariable(name: "", line: 142, scope: !4, file: !1, type: !15)
67*9880d681SAndroid Build Coastguard Worker!24 = !DILocalVariable(name: "", line: 142, scope: !4, file: !1, type: !15)
68*9880d681SAndroid Build Coastguard Worker!25 = !DILocalVariable(name: "", line: 143, scope: !4, file: !1, type: !15)
69*9880d681SAndroid Build Coastguard Worker!26 = !DILocalVariable(name: "", line: 143, scope: !4, file: !1, type: !15)
70*9880d681SAndroid Build Coastguard Worker!27 = !DILocalVariable(name: "", line: 143, scope: !4, file: !1, type: !15)
71*9880d681SAndroid Build Coastguard Worker!28 = !DILocalVariable(name: "", line: 143, scope: !4, file: !1, type: !15)
72*9880d681SAndroid Build Coastguard Worker!29 = !DILocalVariable(name: "", line: 144, scope: !4, file: !1, type: !15)
73*9880d681SAndroid Build Coastguard Worker!30 = !DILocalVariable(name: "", line: 144, scope: !4, file: !1, type: !15)
74*9880d681SAndroid Build Coastguard Worker!31 = !DILocalVariable(name: "", line: 144, scope: !4, file: !1, type: !15)
75*9880d681SAndroid Build Coastguard Worker!32 = !DILocalVariable(name: "", line: 144, scope: !4, file: !1, type: !15)
76*9880d681SAndroid Build Coastguard Worker!33 = !DILocalVariable(name: "", line: 144, scope: !4, file: !1, type: !15)
77*9880d681SAndroid Build Coastguard Worker!34 = !DILocalVariable(name: "", line: 145, scope: !4, file: !1, type: !8)
78*9880d681SAndroid Build Coastguard Worker!35 = !DILocalVariable(name: "", line: 146, scope: !4, file: !1, type: !11)
79*9880d681SAndroid Build Coastguard Worker!36 = !{i32 2, !"Dwarf Version", i32 4}
80*9880d681SAndroid Build Coastguard Worker!37 = !{i32 2, !"Debug Info Version", i32 3}
81*9880d681SAndroid Build Coastguard Worker!38 = !{!"clang version 3.6.0 "}
82*9880d681SAndroid Build Coastguard Worker!39 = !DILocation(line: 154, column: 8, scope: !40)
83*9880d681SAndroid Build Coastguard Worker!40 = distinct !DILexicalBlock(line: 154, column: 8, file: !1, scope: !41)
84*9880d681SAndroid Build Coastguard Worker!41 = distinct !DILexicalBlock(line: 154, column: 8, file: !1, scope: !42)
85*9880d681SAndroid Build Coastguard Worker!42 = distinct !DILexicalBlock(line: 154, column: 3, file: !1, scope: !4)
86*9880d681SAndroid Build Coastguard Worker!43 = !DILocation(line: 157, column: 5, scope: !44)
87*9880d681SAndroid Build Coastguard Worker!44 = distinct !DILexicalBlock(line: 154, column: 42, file: !1, scope: !42)
88*9880d681SAndroid Build Coastguard Worker!45 = !DILocation(line: 159, column: 5, scope: !44)
89*9880d681SAndroid Build Coastguard Worker!46 = !{!47, !47, i64 0}
90*9880d681SAndroid Build Coastguard Worker!47 = !{!"int", !48, i64 0}
91*9880d681SAndroid Build Coastguard Worker!48 = !{!"omnipotent char", !49, i64 0}
92*9880d681SAndroid Build Coastguard Worker!49 = !{!"Simple C/C++ TBAA"}
93*9880d681SAndroid Build Coastguard Worker!50 = !DILocation(line: 160, column: 5, scope: !44)
94*9880d681SAndroid Build Coastguard Worker!51 = !DILocation(line: 161, column: 5, scope: !44)
95*9880d681SAndroid Build Coastguard Worker!52 = !DILocation(line: 188, column: 5, scope: !44)
96*9880d681SAndroid Build Coastguard Worker!53 = !DILocation(line: 190, column: 5, scope: !44)
97*9880d681SAndroid Build Coastguard Worker!54 = !DILocation(line: 198, column: 5, scope: !44)
98*9880d681SAndroid Build Coastguard Worker!55 = !DILocation(line: 144, column: 13, scope: !4)
99*9880d681SAndroid Build Coastguard Worker!56 = !DILocation(line: 200, column: 5, scope: !44)
100*9880d681SAndroid Build Coastguard Worker!57 = !DILocation(line: 203, column: 5, scope: !44)
101*9880d681SAndroid Build Coastguard Worker!58 = !DILocation(line: 207, column: 5, scope: !44)
102*9880d681SAndroid Build Coastguard Worker!59 = !DILocation(line: 208, column: 5, scope: !44)
103