70 lines · plain
1; This test checks that we do not accidentally mutate the debug info when2; inserting loop parallel metadata.3; RUN: opt %loadNPMPolly -S -polly '-passes=polly<no-default-opts>' -polly-ast-detect-parallel < %s | FileCheck %s4; CHECK-NOT: !7 = !{!7}5target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"6 7@A = common global ptr null, align 88 9; Function Attrs: nounwind uwtable10define void @foo() !dbg !4 {11entry:12 tail call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !9, metadata !19), !dbg !2013 %0 = load ptr, ptr @A, align 8, !dbg !21, !tbaa !2314 br label %for.body, !dbg !2715 16for.body: ; preds = %for.body, %entry17 %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]18 %arrayidx = getelementptr inbounds i32, ptr %0, i64 %indvars.iv, !dbg !2119 %1 = load i32, ptr %arrayidx, align 4, !dbg !21, !tbaa !3020 %add = add nsw i32 %1, 1, !dbg !2121 store i32 %add, ptr %arrayidx, align 4, !dbg !21, !tbaa !3022 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1, !dbg !2723 %exitcond = icmp eq i64 %indvars.iv, 1, !dbg !2724 br i1 %exitcond, label %for.end, label %for.body, !dbg !2725 26for.end: ; preds = %for.body27 ret void, !dbg !3228}29 30; Function Attrs: nounwind readnone31declare void @llvm.dbg.value(metadata, i64, metadata, metadata)32 33 34!llvm.dbg.cu = !{!0}35!llvm.module.flags = !{!15, !16}36!llvm.ident = !{!17}37 38!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.6.0 ", isOptimized: true, emissionKind: 1, file: !1, enums: !2, retainedTypes: !2, globals: !12, imports: !2)39!1 = !DIFile(filename: "t2.c", directory: "/local/mnt/workspace/build/tip-Release")40!2 = !{}41!4 = distinct !DISubprogram(name: "foo", line: 3, isLocal: false, isDefinition: true, isOptimized: true, unit: !0, scopeLine: 3, file: !1, scope: !5, type: !6, retainedNodes: !8)42!5 = !DIFile(filename: "t2.c", directory: "/local/mnt/workspace/build/tip-Release")43!6 = !DISubroutineType(types: !7)44!7 = !{null}45!8 = !{!9}46!9 = !DILocalVariable(name: "i", line: 4, scope: !10, file: !5, type: !11)47!10 = distinct !DILexicalBlock(line: 4, column: 3, file: !1, scope: !4)48!11 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)49!12 = !{!13}50!13 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "A", line: 2, isLocal: false, isDefinition: true, scope: null, file: !5, type: !14), expr: !DIExpression())51!14 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !11)52!15 = !{i32 2, !"Dwarf Version", i32 4}53!16 = !{i32 2, !"Debug Info Version", i32 3}54!17 = !{!"clang version 3.6.0 "}55!18 = !{i32 0}56!19 = !DIExpression()57!20 = !DILocation(line: 4, column: 12, scope: !10)58!21 = !DILocation(line: 5, column: 5, scope: !22)59!22 = distinct !DILexicalBlock(line: 4, column: 3, file: !1, scope: !10)60!23 = !{!24, !24, i64 0}61!24 = !{!"any pointer", !25, i64 0}62!25 = !{!"omnipotent char", !26, i64 0}63!26 = !{!"Simple C/C++ TBAA"}64!27 = !DILocation(line: 4, column: 3, scope: !28)65!28 = !DILexicalBlockFile(discriminator: 2, file: !1, scope: !29)66!29 = !DILexicalBlockFile(discriminator: 1, file: !1, scope: !22)67!30 = !{!31, !31, i64 0}68!31 = !{!"int", !25, i64 0}69!32 = !DILocation(line: 6, column: 1, scope: !4)70