brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · 958318a Raw
47 lines · plain
1; RUN: opt < %s -passes=mem2reg -S | FileCheck %s2source_filename = "bugpoint-output.bc"3target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"4target triple = "x86_64-apple-macosx10.12.0"5 6define void @scan() #0 !dbg !12 {7entry:8  %entry1 = alloca i8, align 89  call void @llvm.dbg.declare(metadata ptr %entry1, metadata !18, metadata !19), !dbg !2010  store i8 0, ptr %entry1, align 8, !dbg !2011  br label %for.cond, !dbg !2012 13for.cond:14; CHECK: %[[PHI:.*]] = phi i8 [ 0, %entry ], [ %0, %for.cond ]15  %entryN = load i8, ptr %entry1, align 8, !dbg !2016; CHECK: #dbg_value(i8 %[[PHI]],17; CHECK-SAME:                      !DIExpression(),18  %0 = add i8 %entryN, 119; CHECK: %0 = add i8 %[[PHI]], 120; CHECK: #dbg_value(i8 %0,21; CHECK-SAME:                      !DIExpression(),22  store i8 %0, ptr %entry1, align 8, !dbg !2023  br label %for.cond, !dbg !2024}25 26declare void @llvm.dbg.declare(metadata, metadata, metadata) #127 28attributes #0 = { nounwind ssp uwtable }29attributes #1 = { nounwind readnone }30 31!llvm.dbg.cu = !{!0}32!llvm.module.flags = !{!10, !11}33 34!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "adrian", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug)35!1 = !DIFile(filename: "<stdin>", directory: "/")36!2 = !{}37!4 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char)38!10 = !{i32 2, !"Debug Info Version", i32 3}39!11 = !{i32 1, !"PIC Level", i32 2}40!12 = distinct !DISubprogram(name: "scan", scope: !1, file: !1, line: 4, type: !13, isLocal: false, isDefinition: true, scopeLine: 5, flags: DIFlagPrototyped, isOptimized: true, unit: !0, retainedNodes: !15)41!13 = !DISubroutineType(types: !14)42!14 = !{null, !4, !4}43!15 = !{!18}44!18 = !DILocalVariable(name: "entry", scope: !12, file: !1, line: 6, type: !4)45!19 = !DIExpression()46!20 = !DILocation(line: 6, scope: !12)47