brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.9 KiB · 182ff5a Raw
74 lines · plain
1; RUN: llc -mtriple mips64-unknown-freebsd12.0 -relocation-model pic -mcpu=mips4 -target-abi n64 -O2 -verify-machineinstrs -o - %s2 3; Test that the long branch pass does not crash due to the control flow4; optimizer producing malformed basic block operands due to the backend5; failing to handle debug information around branch instructions.6 7define void @f() !dbg !5 {8entry:9  %cmp = icmp eq i32 undef, 0, !dbg !1610  %conv = zext i1 %cmp to i32, !dbg !1611  tail call void @llvm.dbg.value(metadata i32 %conv, metadata !11, metadata !DIExpression()), !dbg !1712  %tobool = icmp eq i32 undef, 0, !dbg !1813  br i1 %tobool, label %if.end, label %cleanup7.critedge, !dbg !2114 15if.end:                                           ; preds = %entry16  %call6 = call i32 @j(i32 signext %conv)17#4, !dbg !2218  br label %cleanup7, !dbg !2319 20cleanup7.critedge:                                ; preds = %entry21  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull undef) #4, !dbg !2422  br label %cleanup723 24cleanup7:                                         ; preds = %cleanup7.critedge,25  ret void26}27 28declare void @llvm.lifetime.end.p0(i64, ptr nocapture) #129 30declare i32 @j(...)31 32declare void @llvm.dbg.value(metadata, metadata, metadata) #333attributes #1 = { argmemonly nounwind }34attributes #3 = { nounwind readnone speculatable }35attributes #4 = { nounwind }36 37!llvm.dbg.cu = !{!0}38!llvm.module.flags = !{!3, !4}39 40!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang41version 6.0.0", isOptimized: true, runtimeVersion:420, emissionKind: FullDebug, enums: !2)43!1 = !DIFile(filename:44"/tmp//<stdin>", directory:45"/tmp/")46!2 = !{}47!3 = !{i32 2, !"Debug Info Version", i32 3}48!4 = !{i32 7, !"PIC Level", i32 2}49!5 = distinct !DISubprogram(name: "f", scope: !6, file: !6, line: 8, type: !7,50isLocal: false, isDefinition: true, scopeLine: 8, isOptimized: true, unit: !0,51retainedNodes: !10)52!6 = !DIFile(filename:53"/tmp/test.c",54directory: "/tmp")55!7 = !DISubroutineType(types: !8)56!8 = !{!9}57!9 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)58!10 = !{!11, !12, !14}59!11 = !DILocalVariable(name: "e", scope: !5, file: !6, line: 9, type: !9)60!12 = !DILocalVariable(name: "g", scope: !13, file: !6, line: 11, type: !9)61!13 = distinct !DILexicalBlock(scope: !5, file: !6, line: 10, column: 3)62!14 = !DILocalVariable(name: "d", scope: !13, file: !6, line: 12, type: !15)63!15 = !DIDerivedType(tag: DW_TAG_typedef, name: "a", file: !6, line: 2,64baseType: !9)65!16 = !DILocation(line: 9, column: 15, scope: !5)66!17 = !DILocation(line: 9, column: 7, scope: !5)67!18 = !DILocation(line: 12, column: 5, scope: !19)68!19 = distinct !DILexicalBlock(scope: !20, file: !6, line: 12, column: 5)69!20 = distinct !DILexicalBlock(scope: !5, file: !6, line: 10, column: 3)70!21 = !DILocation(line: 12, column: 5, scope: !20)71!22 = !DILocation(line: 16, column: 3, scope: !5)72!23 = !DILocation(line: 17, column: 1, scope: !5)73!24 = !DILocation(line: 15, column: 3, scope: !5)74