| Devang Patel | 801b8ea | 2010-05-04 01:05:02 +0000 | [diff] [blame] | 1 |  | 
| Manman Ren | ed696c3 | 2013-07-24 22:23:00 +0000 | [diff] [blame] | 2 | ;RUN: llc < %s -o /dev/null | 
| Devang Patel | 801b8ea | 2010-05-04 01:05:02 +0000 | [diff] [blame] | 3 | ;Radar 7937109 | 
|  | 4 |  | 
|  | 5 | %struct.anon = type { i64, i32, i32, i32, [1 x i32] } | 
|  | 6 | %struct.gpm_t = type { i32, i8*, [16 x i8], i32, i64, i64, i64, i64, i64, i64, i32, i16, i16, [8 x %struct.gpmr_t] } | 
|  | 7 | %struct.gpmr_t = type { [48 x i8], [48 x i8], [16 x i8], i64, i64, i64, i64, i16 } | 
|  | 8 | %struct.gpt_t = type { [8 x i8], i32, i32, i32, i32, i64, i64, i64, i64, [16 x i8], %struct.anon } | 
|  | 9 |  | 
|  | 10 | @llvm.used = appending global [1 x i8*] [i8* bitcast (void (%struct.gpm_t*, %struct.gpt_t*)* @gpt2gpm to i8*)], section "llvm.metadata" ; <[1 x i8*]*> [#uses=0] | 
|  | 11 |  | 
|  | 12 | define fastcc void @gpt2gpm(%struct.gpm_t* %gpm, %struct.gpt_t* %gpt) nounwind optsize ssp { | 
|  | 13 | entry: | 
|  | 14 | %data_addr.i18 = alloca i64, align 8            ; <i64*> [#uses=1] | 
|  | 15 | %data_addr.i17 = alloca i64, align 8            ; <i64*> [#uses=2] | 
|  | 16 | %data_addr.i16 = alloca i64, align 8            ; <i64*> [#uses=0] | 
|  | 17 | %data_addr.i15 = alloca i32, align 4            ; <i32*> [#uses=0] | 
|  | 18 | %data_addr.i = alloca i64, align 8              ; <i64*> [#uses=0] | 
| David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 19 | %0 = getelementptr inbounds %struct.gpm_t, %struct.gpm_t* %gpm, i32 0, i32 2, i32 0 ; <i8*> [#uses=1] | 
|  | 20 | %1 = getelementptr inbounds %struct.gpt_t, %struct.gpt_t* %gpt, i32 0, i32 9, i32 0 ; <i8*> [#uses=1] | 
| Devang Patel | 801b8ea | 2010-05-04 01:05:02 +0000 | [diff] [blame] | 21 | call void @uuid_LtoB(i8* %0, i8* %1) nounwind, !dbg !0 | 
| David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 22 | %a9 = load volatile i64, i64* %data_addr.i18, align 8 ; <i64> [#uses=1] | 
| Devang Patel | 801b8ea | 2010-05-04 01:05:02 +0000 | [diff] [blame] | 23 | %a10 = call i64 @llvm.bswap.i64(i64 %a9) nounwind ; <i64> [#uses=1] | 
| David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 24 | %a11 = getelementptr inbounds %struct.gpt_t, %struct.gpt_t* %gpt, i32 0, i32 8, !dbg !7 ; <i64*> [#uses=1] | 
| David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 25 | %a12 = load i64, i64* %a11, align 4, !dbg !7         ; <i64> [#uses=1] | 
| Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 26 | call void @llvm.dbg.declare(metadata i64* %data_addr.i17, metadata !8, metadata !DIExpression()) nounwind, !dbg !14 | 
| Devang Patel | 801b8ea | 2010-05-04 01:05:02 +0000 | [diff] [blame] | 27 | store i64 %a12, i64* %data_addr.i17, align 8 | 
| Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 28 | call void @llvm.dbg.value(metadata !6, i64 0, metadata !15, metadata !DIExpression()) nounwind, !dbg !DILocation(scope: !16) | 
|  | 29 | call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !19, metadata !DIExpression()) nounwind, !dbg !DILocation(scope: !16) | 
|  | 30 | call void @llvm.dbg.declare(metadata !6, metadata !23, metadata !DIExpression()) nounwind, !dbg !DILocation(scope: !24) | 
|  | 31 | call void @llvm.dbg.value(metadata i64* %data_addr.i17, i64 0, metadata !34, metadata !DIExpression()) nounwind, !dbg !DILocation(scope: !24) | 
| David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 32 | %a13 = load volatile i64, i64* %data_addr.i17, align 8 ; <i64> [#uses=1] | 
| Devang Patel | 801b8ea | 2010-05-04 01:05:02 +0000 | [diff] [blame] | 33 | %a14 = call i64 @llvm.bswap.i64(i64 %a13) nounwind ; <i64> [#uses=2] | 
|  | 34 | %a15 = add i64 %a10, %a14, !dbg !7              ; <i64> [#uses=1] | 
|  | 35 | %a16 = sub i64 %a15, %a14                       ; <i64> [#uses=1] | 
| David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 36 | %a17 = getelementptr inbounds %struct.gpm_t, %struct.gpm_t* %gpm, i32 0, i32 5, !dbg !7 ; <i64*> [#uses=1] | 
| Devang Patel | 801b8ea | 2010-05-04 01:05:02 +0000 | [diff] [blame] | 37 | store i64 %a16, i64* %a17, align 4, !dbg !7 | 
|  | 38 | ret void, !dbg !7 | 
|  | 39 | } | 
|  | 40 |  | 
| Adrian Prantl | 87b7eb9 | 2014-10-01 18:55:02 +0000 | [diff] [blame] | 41 | declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone | 
| Devang Patel | 801b8ea | 2010-05-04 01:05:02 +0000 | [diff] [blame] | 42 |  | 
| Adrian Prantl | 87b7eb9 | 2014-10-01 18:55:02 +0000 | [diff] [blame] | 43 | declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnone | 
| Devang Patel | 801b8ea | 2010-05-04 01:05:02 +0000 | [diff] [blame] | 44 |  | 
|  | 45 | declare i32 @llvm.bswap.i32(i32) nounwind readnone | 
|  | 46 |  | 
|  | 47 | declare i64 @llvm.bswap.i64(i64) nounwind readnone | 
|  | 48 |  | 
|  | 49 | declare void @uuid_LtoB(i8*, i8*) | 
|  | 50 |  | 
| Manman Ren | e9a52e1 | 2013-07-29 18:12:58 +0000 | [diff] [blame] | 51 | !llvm.dbg.cu = !{!4} | 
| Manman Ren | 409558f | 2013-11-22 21:49:45 +0000 | [diff] [blame] | 52 | !llvm.module.flags = !{!41} | 
| Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 53 | !0 = !DILocation(line: 808, scope: !1) | 
|  | 54 | !1 = distinct !DILexicalBlock(line: 807, column: 0, file: !39, scope: !2) | 
|  | 55 | !2 = !DISubprogram(name: "gpt2gpm", linkageName: "gpt2gpm", line: 807, isLocal: true, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !39, scope: null, type: !5) | 
|  | 56 | !3 = !DIFile(filename: "G.c", directory: "/tmp") | 
| Duncan P. N. Exon Smith | 55ca964 | 2015-08-03 17:26:41 +0000 | [diff] [blame^] | 57 | !4 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "llvm-gcc", isOptimized: true, emissionKind: 0, file: !39, enums: !18, retainedTypes: !18, subprograms: !40) | 
| Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 58 | !5 = !DISubroutineType(types: !6) | 
| Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 59 | !6 = !{null} | 
| Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 60 | !7 = !DILocation(line: 810, scope: !1) | 
| Duncan P. N. Exon Smith | ed013cd | 2015-07-31 18:58:39 +0000 | [diff] [blame] | 61 | !8 = !DILocalVariable(name: "data", line: 201, arg: 1, scope: !9, file: !10, type: !11) | 
| Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 62 | !9 = !DISubprogram(name: "_OSSwapInt64", linkageName: "_OSSwapInt64", line: 202, isLocal: true, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !10, scope: null, type: !5) | 
|  | 63 | !10 = !DIFile(filename: "OSByteOrder.h", directory: "/usr/include/libkern/ppc") | 
|  | 64 | !11 = !DIDerivedType(tag: DW_TAG_typedef, name: "uint64_t", line: 59, file: !36, scope: !3, baseType: !13) | 
|  | 65 | !12 = !DIFile(filename: "stdint.h", directory: "/usr/4.2.1/include") | 
|  | 66 | !13 = !DIBasicType(tag: DW_TAG_base_type, name: "long long unsigned int", size: 64, align: 64, encoding: DW_ATE_unsigned) | 
|  | 67 | !14 = !DILocation(line: 202, scope: !9, inlinedAt: !7) | 
| Duncan P. N. Exon Smith | ed013cd | 2015-07-31 18:58:39 +0000 | [diff] [blame] | 68 | !15 = !DILocalVariable(name: "base", line: 92, arg: 2, scope: !16, file: !10, type: !17) | 
| Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 69 | !16 = !DISubprogram(name: "OSReadSwapInt64", linkageName: "OSReadSwapInt64", line: 95, isLocal: true, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !38, scope: null, type: !5) | 
|  | 70 | !17 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, file: !39, scope: !3, baseType: null) | 
| Duncan P. N. Exon Smith | 988a7f8 | 2015-03-27 20:46:33 +0000 | [diff] [blame] | 71 | !18 = !{} | 
| Duncan P. N. Exon Smith | ed013cd | 2015-07-31 18:58:39 +0000 | [diff] [blame] | 72 | !19 = !DILocalVariable(name: "byteOffset", line: 94, arg: 3, scope: !16, file: !10, type: !20) | 
| Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 73 | !20 = !DIDerivedType(tag: DW_TAG_typedef, name: "uintptr_t", line: 114, file: !37, scope: !3, baseType: !22) | 
|  | 74 | !21 = !DIFile(filename: "types.h", directory: "/usr/include/ppc") | 
|  | 75 | !22 = !DIBasicType(tag: DW_TAG_base_type, name: "long unsigned int", size: 32, align: 32, encoding: DW_ATE_unsigned) | 
| Duncan P. N. Exon Smith | ed013cd | 2015-07-31 18:58:39 +0000 | [diff] [blame] | 76 | !23 = !DILocalVariable(name: "u", line: 100, scope: !24, file: !10, type: !25) | 
| Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 77 | !24 = distinct !DILexicalBlock(line: 95, column: 0, file: !38, scope: !16) | 
|  | 78 | !25 = !DICompositeType(tag: DW_TAG_union_type, line: 97, size: 64, align: 64, file: !38, scope: !16, elements: !26) | 
| Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 79 | !26 = !{!27, !28} | 
| Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 80 | !27 = !DIDerivedType(tag: DW_TAG_member, name: "u64", line: 98, size: 64, align: 64, file: !38, scope: !25, baseType: !11) | 
|  | 81 | !28 = !DIDerivedType(tag: DW_TAG_member, name: "u32", line: 99, size: 64, align: 32, file: !38, scope: !25, baseType: !29) | 
|  | 82 | !29 = !DICompositeType(tag: DW_TAG_array_type, size: 64, align: 32, file: !39, scope: !3, baseType: !30, elements: !32) | 
|  | 83 | !30 = !DIDerivedType(tag: DW_TAG_typedef, name: "uint32_t", line: 55, file: !36, scope: !3, baseType: !31) | 
|  | 84 | !31 = !DIBasicType(tag: DW_TAG_base_type, name: "unsigned int", size: 32, align: 32, encoding: DW_ATE_unsigned) | 
| Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 85 | !32 = !{!33} | 
| Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 86 | !33 = !DISubrange(count: 2) | 
| Duncan P. N. Exon Smith | ed013cd | 2015-07-31 18:58:39 +0000 | [diff] [blame] | 87 | !34 = !DILocalVariable(name: "addr", line: 96, scope: !24, file: !10, type: !35) | 
| Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 88 | !35 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, file: !39, scope: !3, baseType: !11) | 
|  | 89 | !36 = !DIFile(filename: "stdint.h", directory: "/usr/4.2.1/include") | 
|  | 90 | !37 = !DIFile(filename: "types.h", directory: "/usr/include/ppc") | 
|  | 91 | !38 = !DIFile(filename: "OSByteOrder.h", directory: "/usr/include/libkern/ppc") | 
|  | 92 | !39 = !DIFile(filename: "G.c", directory: "/tmp") | 
| Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 93 | !40 = !{!2, !9, !16} | 
| Duncan P. N. Exon Smith | e274180 | 2015-03-03 17:24:31 +0000 | [diff] [blame] | 94 | !41 = !{i32 1, !"Debug Info Version", i32 3} |