brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · b637814 Raw
42 lines · plain
1; RUN: opt -S -passes=consthoist < %s | FileCheck %s2; ModuleID = 'test-hoist-debug.cpp'3source_filename = "test-hoist-debug.cpp"4target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"5target triple = "x86_64-unknown-linux-gnu"6 7; Function Attrs: noinline nounwind optnone uwtable8define i32 @_Z3foov() !dbg !7 {9; CHECK: bitcast10; CHECK: !dbg !1111; CHECK: inttoptr12  %a0 = inttoptr i64 4646526064 to ptr, !dbg !1113  %v0 = load i32, ptr %a0, align 16, !dbg !1114 15  %a1 = inttoptr i64 4646526080 to ptr16  %v1 = load i32, ptr %a1, align 16, !dbg !1117 18  %a2 = inttoptr i64 4646526096 to ptr19  %v2 = load i32, ptr %a2, align 16, !dbg !1120 21  %r0 = add i32 %v0, %v122  %r1 = add i32 %r0, %v223  ret i32 %r124}25 26!llvm.dbg.cu = !{!0}27!llvm.module.flags = !{!3, !4, !5}28!llvm.ident = !{!6}29 30!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 6.0.0 (trunk 313291)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)31!1 = !DIFile(filename: "test-hoist-debug.cpp", directory: "/tmp")32!2 = !{}33!3 = !{i32 2, !"Dwarf Version", i32 4}34!4 = !{i32 2, !"Debug Info Version", i32 3}35!5 = !{i32 1, !"wchar_size", i32 4}36!6 = !{!"clang version 6.0.0 (trunk 313291)"}37!7 = distinct !DISubprogram(name: "foo", linkageName: "_Z3foov", scope: !1, file: !1, line: 1, type: !8, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, unit: !0, retainedNodes: !2)38!8 = !DISubroutineType(types: !9)39!9 = !{!10}40!10 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)41!11 = !DILocation(line: 2, column: 3, scope: !7)42