Home | History | Annotate | Download | only in X86
      1 ; RUN: llc < %s | FileCheck %s
      2 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
      3 target triple = "x86_64-unknown-linux-gnu"
      4 
      5 @x = common global i32 0, align 4
      6 
      7 define i32 @main() !dbg !4 {
      8 entry:
      9   %0 = load volatile i32, i32* @x, align 4, !dbg !9, !tbaa !10
     10   %add = add nsw i32 %0, 24, !dbg !9
     11   store volatile i32 %add, i32* @x, align 4, !dbg !9, !tbaa !10
     12   %1 = load volatile i32, i32* @x, align 4, !dbg !14, !tbaa !10
     13   %add1 = add nsw i32 %1, 2, !dbg !14
     14   store volatile i32 %add1, i32* @x, align 4, !dbg !14, !tbaa !10
     15   %2 = load volatile i32, i32* @x, align 4, !dbg !15, !tbaa !10
     16   %add2 = add nsw i32 %2, 3, !dbg !15
     17   store volatile i32 %add2, i32* @x, align 4, !dbg !15, !tbaa !10
     18   %3 = load volatile i32, i32* @x, align 4, !dbg !16, !tbaa !10
     19   %add3 = add nsw i32 %3, 4, !dbg !16
     20   store volatile i32 %add3, i32* @x, align 4, !dbg !16, !tbaa !10
     21   tail call void @exit(i32 24), !dbg !17
     22   unreachable, !dbg !17
     23 }
     24 
     25 ; CHECK-LABEL: main:
     26 ; CHECK:      .loc 1 3
     27 ; CHECK:      .loc 1 4
     28 ; CHECK:      .loc 1 5
     29 ; CHECK:      .loc 1 6
     30 ; CHECK:      .loc 1 7
     31 ; CHECK:      .loc 1 8
     32 ; CHECK-NEXT: movl  $24, %edi
     33 ; CHECK-NEXT: callq exit
     34 
     35 declare void @exit(i32)
     36 
     37 !llvm.dbg.cu = !{!0}
     38 !llvm.module.flags = !{!6, !7}
     39 
     40 !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.9.0 (trunk 259383) (llvm/trunk 259385)", isOptimized: true, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !2)
     41 !1 = !DIFile(filename: "t.c", directory: "/home/majnemer/llvm/src")
     42 !2 = !{}
     43 !4 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, isOptimized: true, unit: !0, variables: !2)
     44 !5 = !DISubroutineType(types: !2)
     45 !6 = !{i32 2, !"Dwarf Version", i32 4}
     46 !7 = !{i32 2, !"Debug Info Version", i32 3}
     47 !9 = !DILocation(line: 4, column: 5, scope: !4)
     48 !10 = !{!11, !11, i64 0}
     49 !11 = !{!"int", !12, i64 0}
     50 !12 = !{!"omnipotent char", !13, i64 0}
     51 !13 = !{!"Simple C/C++ TBAA"}
     52 !14 = !DILocation(line: 5, column: 5, scope: !4)
     53 !15 = !DILocation(line: 6, column: 5, scope: !4)
     54 !16 = !DILocation(line: 7, column: 5, scope: !4)
     55 !17 = !DILocation(line: 8, column: 3, scope: !4)
     56