Home | History | Annotate | Download | only in ConstantMerge
      1 ; RUN: opt < %s -constmerge -S | FileCheck %s
      2 
      3 ; CHECK: = constant i32 1, !dbg [[A:![0-9]+]], !dbg [[B:![0-9]+]]
      4 @a = internal constant i32 1, !dbg !0
      5 @b = unnamed_addr constant i32 1, !dbg !9
      6 
      7 define void @test1(i32** %P1, i32** %P2) {
      8   store i32* @a, i32** %P1
      9   store i32* @b, i32** %P2
     10   ret void
     11 }
     12 
     13 !llvm.dbg.cu = !{!2}
     14 !llvm.module.flags = !{!7, !8}
     15 
     16 ; CHECK: [[A]] = !DIGlobalVariableExpression(var: [[VA:![0-9]+]], expr: !DIExpression())
     17 ; CHECK: [[VA]] = distinct !DIGlobalVariable(name: "y"
     18 ; CHECK: [[B]] = !DIGlobalVariableExpression(var: [[VB:![0-9]+]], expr: !DIExpression())
     19 ; CHECK: [[VB]] = distinct !DIGlobalVariable(name: "x"
     20 
     21 !0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
     22 !1 = distinct !DIGlobalVariable(name: "x", scope: !2, file: !3, line: 1, type: !6, isLocal: false, isDefinition: true)
     23 !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "clang version 5.0.0 (trunk 297227) (llvm/trunk 297234)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5)
     24 !3 = !DIFile(filename: "1.cc", directory: "/build")
     25 !4 = !{}
     26 !5 = !{!0}
     27 !6 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
     28 !7 = !{i32 2, !"Dwarf Version", i32 4}
     29 !8 = !{i32 2, !"Debug Info Version", i32 3}
     30 
     31 !9 = !DIGlobalVariableExpression(var: !10, expr: !DIExpression())
     32 !10 = distinct !DIGlobalVariable(name: "y", scope: !2, file: !3, line: 1, type: !6, isLocal: false, isDefinition: true)
     33