• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
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"
9target 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"
13module 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
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
32
33;Parameter Attribute Test
34; CHECK: declare void @ParamAttr1(i8 zeroext)
35declare void @ParamAttr1(i8 zeroext)
36; CHECK: declare void @ParamAttr2(i8* nest)
37declare void @ParamAttr2(i8* nest)
38; CHECK: declare void @ParamAttr3(i8* sret)
39declare void @ParamAttr3(i8* sret)
40; CHECK: declare void @ParamAttr4(i8 signext)
41declare void @ParamAttr4(i8 signext)
42; CHECK: declare void @ParamAttr5(i8* inreg)
43declare void @ParamAttr5(i8* inreg)
44; CHECK: declare void @ParamAttr6(i8* byval)
45declare void @ParamAttr6(i8* byval)
46; CHECK: declare void @ParamAttr7(i8* noalias)
47declare void @ParamAttr7(i8* noalias)
48; CHECK: declare void @ParamAttr8(i8* nocapture)
49declare void @ParamAttr8(i8* nocapture)
50; CHECK: declare void @ParamAttr9{{[(i8* nest noalias nocapture) | (i8* noalias nocapture nest)]}}
51declare void @ParamAttr9(i8* nest noalias nocapture)
52; CHECK: declare void @ParamAttr10{{[(i8* sret noalias nocapture) | (i8* noalias nocapture sret)]}}
53declare void @ParamAttr10(i8* sret noalias nocapture)
54;CHECK: declare void @ParamAttr11{{[(i8* byval noalias nocapture) | (i8* noalias nocapture byval)]}}
55declare void @ParamAttr11(i8* byval noalias nocapture)
56;CHECK: declare void @ParamAttr12{{[(i8* inreg noalias nocapture) | (i8* noalias nocapture inreg)]}}
57declare void @ParamAttr12(i8* inreg noalias nocapture)
58
59
60; NamedTypesTest
61define void @NamedTypes() {
62entry:
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"
70define void @gcTest() gc "gc" {
71entry:
72  ret void
73}
74
75; Named metadata Test
76; CHECK: !name = !{!0, !1, !2}
77!name = !{!0, !1, !2}
78; CHECK: !0 = !{!"zero"}
79!0 = metadata !{metadata !"zero"}
80; CHECK: !1 = !{!"one"}
81!1 = metadata !{metadata !"one"}
82; CHECK: !2 = !{!"two"}
83!2 = metadata !{metadata !"two"}
84
85
86
87