55 lines · plain
1; RUN: opt -passes='print<memoryssa>' -disable-output %s 2>&1 | FileCheck %s2 3; Note that the test crashes the MemorySSA verification when doing loop-rotate,4; if debuginfo is modelled in MemorySSA, due to the fact that MemorySSA is not5; updated when adding/removing debuginfo intrinsics.6 7target triple = "x86_64-unknown-linux-gnu"8 9; CHECK-LABEL: @overflow_iter_var10; CHECK-NOT: MemoryDef11define void @overflow_iter_var(i1 %arg) !dbg !11 {12entry:13 call void @llvm.dbg.value(metadata i16 0, metadata !16, metadata !DIExpression()), !dbg !1814 br label %for.cond15 16for.cond: ; preds = %for.body, %entry17 call void @llvm.dbg.value(metadata i16 0, metadata !16, metadata !DIExpression()), !dbg !1818 call void @llvm.dbg.value(metadata i16 undef, metadata !20, metadata !DIExpression()), !dbg !2119 br i1 %arg, label %for.end, label %for.body20 21for.body: ; preds = %for.cond22 %0 = load i16, ptr undef, align 123 br label %for.cond24 25for.end: ; preds = %for.cond26 ret void27}28 29; Function Attrs: nounwind readnone speculatable willreturn30declare void @llvm.dbg.value(metadata, metadata, metadata) #131 32attributes #1 = { nounwind readnone speculatable willreturn }33 34!llvm.dbg.cu = !{!0}35!llvm.module.flags = !{!10}36 37!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 10.0.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, globals: !3, nameTableKind: None)38!1 = !DIFile(filename: "2_loops.c", directory: "/")39!2 = !{}40!3 = !{}41!6 = !DICompositeType(tag: DW_TAG_array_type, baseType: !7, size: 4096, elements: !8)42!7 = !DIBasicType(name: "int", size: 16, encoding: DW_ATE_signed)43!8 = !{!9}44!9 = !DISubrange(count: 256)45!10 = !{i32 2, !"Debug Info Version", i32 3}46!11 = distinct !DISubprogram(name: "overflow_iter_var", scope: !1, file: !1, line: 20, type: !12, scopeLine: 21, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !2)47!12 = !DISubroutineType(types: !13)48!13 = !{null, !14, !14}49!14 = !DIBasicType(name: "unsigned int", size: 16, encoding: DW_ATE_unsigned)50!16 = !DILocalVariable(name: "i", scope: !17, file: !1, line: 23, type: !14)51!17 = distinct !DILexicalBlock(scope: !11, file: !1, line: 23, column: 3)52!18 = !DILocation(line: 0, scope: !17)53!20 = !DILocalVariable(name: "stop1", arg: 1, scope: !11, file: !1, line: 20, type: !14)54!21 = !DILocation(line: 0, scope: !11)55