Michael Kuperstein | 5f84303 | 2014-09-23 08:48:01 +0000 | [diff] [blame] | 1 | ; RUN: llvm-dis < %s.bc| FileCheck %s |
| 2 | |
| 3 | ; highLevelStructure.3.2.ll.bc was generated by passing this file to llvm-as-3.2. |
| 4 | ; The test checks that LLVM does not misread binary float instructions of |
| 5 | ; older bitcode files. |
| 6 | |
| 7 | ; Data Layout Test |
Mehdi Amini | c94da20 | 2015-03-04 18:43:29 +0000 | [diff] [blame] | 8 | ; CHECK: target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v16:16:16-v24:32:32-v32:32:32-v48:64:64-v64:64:64-v96:128:128-v128:128:128-v192:256:256-v256:256:256-v512:512:512-v1024:1024:1024-a0:0:64-f80:32:32-n8:16:32-S32" |
Michael Kuperstein | 5f84303 | 2014-09-23 08:48:01 +0000 | [diff] [blame] | 9 | target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v16:16:16-v24:32:32-v32:32:32-v48:64:64-v64:64:64-v96:128:128-v128:128:128-v192:256:256-v256:256:256-v512:512:512-v1024:1024:1024-a0:0:64-f80:32:32-n8:16:32-S32" |
| 10 | |
| 11 | ; Module-Level Inline Assembly Test |
| 12 | ; CHECK: module asm "some assembly" |
| 13 | module asm "some assembly" |
| 14 | |
| 15 | ; Named Types Test |
| 16 | ; CHECK: %mytype = type { %mytype*, i32 } |
| 17 | %mytype = type { %mytype*, i32 } |
| 18 | |
| 19 | ; Aliases Test |
| 20 | ; CHECK: @glob1 = global i32 1 |
| 21 | @glob1 = global i32 1 |
David Blaikie | 21f77df | 2015-09-11 03:22:04 +0000 | [diff] [blame] | 22 | ; CHECK: @aliased1 = alias i32, i32* @glob1 |
| 23 | @aliased1 = alias i32, i32* @glob1 |
| 24 | ; CHECK-NEXT: @aliased2 = internal alias i32, i32* @glob1 |
| 25 | @aliased2 = internal alias i32, i32* @glob1 |
| 26 | ; CHECK-NEXT: @aliased3 = alias i32, i32* @glob1 |
| 27 | @aliased3 = external alias i32, i32* @glob1 |
| 28 | ; CHECK-NEXT: @aliased4 = weak alias i32, i32* @glob1 |
| 29 | @aliased4 = weak alias i32, i32* @glob1 |
| 30 | ; CHECK-NEXT: @aliased5 = weak_odr alias i32, i32* @glob1 |
| 31 | @aliased5 = weak_odr alias i32, i32* @glob1 |
Michael Kuperstein | 5f84303 | 2014-09-23 08:48:01 +0000 | [diff] [blame] | 32 | |
| 33 | ;Parameter Attribute Test |
| 34 | ; CHECK: declare void @ParamAttr1(i8 zeroext) |
| 35 | declare void @ParamAttr1(i8 zeroext) |
| 36 | ; CHECK: declare void @ParamAttr2(i8* nest) |
| 37 | declare void @ParamAttr2(i8* nest) |
| 38 | ; CHECK: declare void @ParamAttr3(i8* sret) |
| 39 | declare void @ParamAttr3(i8* sret) |
| 40 | ; CHECK: declare void @ParamAttr4(i8 signext) |
| 41 | declare void @ParamAttr4(i8 signext) |
| 42 | ; CHECK: declare void @ParamAttr5(i8* inreg) |
| 43 | declare void @ParamAttr5(i8* inreg) |
| 44 | ; CHECK: declare void @ParamAttr6(i8* byval) |
| 45 | declare void @ParamAttr6(i8* byval) |
| 46 | ; CHECK: declare void @ParamAttr7(i8* noalias) |
| 47 | declare void @ParamAttr7(i8* noalias) |
| 48 | ; CHECK: declare void @ParamAttr8(i8* nocapture) |
| 49 | declare void @ParamAttr8(i8* nocapture) |
| 50 | ; CHECK: declare void @ParamAttr9{{[(i8* nest noalias nocapture) | (i8* noalias nocapture nest)]}} |
| 51 | declare void @ParamAttr9(i8* nest noalias nocapture) |
| 52 | ; CHECK: declare void @ParamAttr10{{[(i8* sret noalias nocapture) | (i8* noalias nocapture sret)]}} |
| 53 | declare void @ParamAttr10(i8* sret noalias nocapture) |
| 54 | ;CHECK: declare void @ParamAttr11{{[(i8* byval noalias nocapture) | (i8* noalias nocapture byval)]}} |
| 55 | declare void @ParamAttr11(i8* byval noalias nocapture) |
| 56 | ;CHECK: declare void @ParamAttr12{{[(i8* inreg noalias nocapture) | (i8* noalias nocapture inreg)]}} |
| 57 | declare void @ParamAttr12(i8* inreg noalias nocapture) |
| 58 | |
| 59 | |
| 60 | ; NamedTypesTest |
| 61 | define void @NamedTypes() { |
| 62 | entry: |
| 63 | ; CHECK: %res = alloca %mytype |
| 64 | %res = alloca %mytype |
| 65 | ret void |
| 66 | } |
| 67 | |
| 68 | ; Garbage Collector Name Test |
| 69 | ; CHECK: define void @gcTest() gc "gc" |
| 70 | define void @gcTest() gc "gc" { |
| 71 | entry: |
| 72 | ret void |
| 73 | } |
| 74 | |
| 75 | ; Named metadata Test |
| 76 | ; CHECK: !name = !{!0, !1, !2} |
| 77 | !name = !{!0, !1, !2} |
Duncan P. N. Exon Smith | 1ef70ff | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 78 | ; CHECK: !0 = !{!"zero"} |
Michael Kuperstein | 5f84303 | 2014-09-23 08:48:01 +0000 | [diff] [blame] | 79 | !0 = metadata !{metadata !"zero"} |
Duncan P. N. Exon Smith | 1ef70ff | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 80 | ; CHECK: !1 = !{!"one"} |
Michael Kuperstein | 5f84303 | 2014-09-23 08:48:01 +0000 | [diff] [blame] | 81 | !1 = metadata !{metadata !"one"} |
Duncan P. N. Exon Smith | 1ef70ff | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 82 | ; CHECK: !2 = !{!"two"} |
Michael Kuperstein | 5f84303 | 2014-09-23 08:48:01 +0000 | [diff] [blame] | 83 | !2 = metadata !{metadata !"two"} |
| 84 | |
| 85 | |
| 86 | |