~ubuntu-branches/ubuntu/trusty/libclc/trusty-proposed

« back to all changes in this revision

Viewing changes to generic/lib/shared/vload_impl.ll

  • Committer: Package Import Robot
  • Author(s): Michael Gilbert
  • Date: 2013-09-02 17:56:00 UTC
  • Revision ID: package-import@ubuntu.com-20130902175600-yzwtm29jme08wzs5
Tags: upstream-0~git20130819
ImportĀ upstreamĀ versionĀ 0~git20130819

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
; This provides optimized implementations of vload2/3/4/8/16 for 32-bit int/uint
 
2
; The address spaces get mapped to data types in target-specific usages
 
3
 
 
4
define <2 x i32> @__clc_vload2_i32__addr1(i32 addrspace(1)* nocapture %addr) nounwind readonly alwaysinline {
 
5
  %1 = bitcast i32 addrspace(1)* %addr to <2 x i32> addrspace(1)*
 
6
  %2 = load <2 x i32> addrspace(1)* %1, align 4, !tbaa !3
 
7
  ret <2 x i32> %2
 
8
}
 
9
 
 
10
define <3 x i32> @__clc_vload3_i32__addr1(i32 addrspace(1)* nocapture %addr) nounwind readonly alwaysinline {
 
11
  %1 = bitcast i32 addrspace(1)* %addr to <3 x i32> addrspace(1)*
 
12
  %2 = load <3 x i32> addrspace(1)* %1, align 4, !tbaa !3
 
13
  ret <3 x i32> %2
 
14
}
 
15
 
 
16
define <4 x i32> @__clc_vload4_i32__addr1(i32 addrspace(1)* nocapture %addr) nounwind readonly alwaysinline {
 
17
  %1 = bitcast i32 addrspace(1)* %addr to <4 x i32> addrspace(1)*
 
18
  %2 = load <4 x i32> addrspace(1)* %1, align 4, !tbaa !3
 
19
  ret <4 x i32> %2
 
20
}
 
21
 
 
22
define <8 x i32> @__clc_vload8_i32__addr1(i32 addrspace(1)* nocapture %addr) nounwind readonly alwaysinline {
 
23
  %1 = bitcast i32 addrspace(1)* %addr to <8 x i32> addrspace(1)*
 
24
  %2 = load <8 x i32> addrspace(1)* %1, align 4, !tbaa !3
 
25
  ret <8 x i32> %2
 
26
}
 
27
 
 
28
define <16 x i32> @__clc_vload16_i32__addr1(i32 addrspace(1)* nocapture %addr) nounwind readonly alwaysinline {
 
29
  %1 = bitcast i32 addrspace(1)* %addr to <16 x i32> addrspace(1)*
 
30
  %2 = load <16 x i32> addrspace(1)* %1, align 4, !tbaa !3
 
31
  ret <16 x i32> %2
 
32
}
 
33
 
 
34
define <2 x i32> @__clc_vload2_i32__addr2(i32 addrspace(2)* nocapture %addr) nounwind readonly alwaysinline {
 
35
  %1 = bitcast i32 addrspace(2)* %addr to <2 x i32> addrspace(2)*
 
36
  %2 = load <2 x i32> addrspace(2)* %1, align 4, !tbaa !3
 
37
  ret <2 x i32> %2
 
38
}
 
39
 
 
40
define <3 x i32> @__clc_vload3_i32__addr2(i32 addrspace(2)* nocapture %addr) nounwind readonly alwaysinline {
 
41
  %1 = bitcast i32 addrspace(2)* %addr to <3 x i32> addrspace(2)*
 
42
  %2 = load <3 x i32> addrspace(2)* %1, align 4, !tbaa !3
 
43
  ret <3 x i32> %2
 
44
}
 
45
 
 
46
define <4 x i32> @__clc_vload4_i32__addr2(i32 addrspace(2)* nocapture %addr) nounwind readonly alwaysinline {
 
47
  %1 = bitcast i32 addrspace(2)* %addr to <4 x i32> addrspace(2)*
 
48
  %2 = load <4 x i32> addrspace(2)* %1, align 4, !tbaa !3
 
49
  ret <4 x i32> %2
 
50
}
 
51
 
 
52
define <8 x i32> @__clc_vload8_i32__addr2(i32 addrspace(2)* nocapture %addr) nounwind readonly alwaysinline {
 
53
  %1 = bitcast i32 addrspace(2)* %addr to <8 x i32> addrspace(2)*
 
54
  %2 = load <8 x i32> addrspace(2)* %1, align 4, !tbaa !3
 
55
  ret <8 x i32> %2
 
56
}
 
57
 
 
58
define <16 x i32> @__clc_vload16_i32__addr2(i32 addrspace(2)* nocapture %addr) nounwind readonly alwaysinline {
 
59
  %1 = bitcast i32 addrspace(2)* %addr to <16 x i32> addrspace(2)*
 
60
  %2 = load <16 x i32> addrspace(2)* %1, align 4, !tbaa !3
 
61
  ret <16 x i32> %2
 
62
}
 
63
 
 
64
define <2 x i32> @__clc_vload2_i32__addr3(i32 addrspace(3)* nocapture %addr) nounwind readonly alwaysinline {
 
65
  %1 = bitcast i32 addrspace(3)* %addr to <2 x i32> addrspace(3)*
 
66
  %2 = load <2 x i32> addrspace(3)* %1, align 4, !tbaa !3
 
67
  ret <2 x i32> %2
 
68
}
 
69
 
 
70
define <3 x i32> @__clc_vload3_i32__addr3(i32 addrspace(3)* nocapture %addr) nounwind readonly alwaysinline {
 
71
  %1 = bitcast i32 addrspace(3)* %addr to <3 x i32> addrspace(3)*
 
72
  %2 = load <3 x i32> addrspace(3)* %1, align 4, !tbaa !3
 
73
  ret <3 x i32> %2
 
74
}
 
75
 
 
76
define <4 x i32> @__clc_vload4_i32__addr3(i32 addrspace(3)* nocapture %addr) nounwind readonly alwaysinline {
 
77
  %1 = bitcast i32 addrspace(3)* %addr to <4 x i32> addrspace(3)*
 
78
  %2 = load <4 x i32> addrspace(3)* %1, align 4, !tbaa !3
 
79
  ret <4 x i32> %2
 
80
}
 
81
 
 
82
define <8 x i32> @__clc_vload8_i32__addr3(i32 addrspace(3)* nocapture %addr) nounwind readonly alwaysinline {
 
83
  %1 = bitcast i32 addrspace(3)* %addr to <8 x i32> addrspace(3)*
 
84
  %2 = load <8 x i32> addrspace(3)* %1, align 4, !tbaa !3
 
85
  ret <8 x i32> %2
 
86
}
 
87
 
 
88
define <16 x i32> @__clc_vload16_i32__addr3(i32 addrspace(3)* nocapture %addr) nounwind readonly alwaysinline {
 
89
  %1 = bitcast i32 addrspace(3)* %addr to <16 x i32> addrspace(3)*
 
90
  %2 = load <16 x i32> addrspace(3)* %1, align 4, !tbaa !3
 
91
  ret <16 x i32> %2
 
92
}
 
93
 
 
94
define <2 x i32> @__clc_vload2_i32__addr4(i32 addrspace(4)* nocapture %addr) nounwind readonly alwaysinline {
 
95
  %1 = bitcast i32 addrspace(4)* %addr to <2 x i32> addrspace(4)*
 
96
  %2 = load <2 x i32> addrspace(4)* %1, align 4, !tbaa !3
 
97
  ret <2 x i32> %2
 
98
}
 
99
 
 
100
define <3 x i32> @__clc_vload3_i32__addr4(i32 addrspace(4)* nocapture %addr) nounwind readonly alwaysinline {
 
101
  %1 = bitcast i32 addrspace(4)* %addr to <3 x i32> addrspace(4)*
 
102
  %2 = load <3 x i32> addrspace(4)* %1, align 4, !tbaa !3
 
103
  ret <3 x i32> %2
 
104
}
 
105
 
 
106
define <4 x i32> @__clc_vload4_i32__addr4(i32 addrspace(4)* nocapture %addr) nounwind readonly alwaysinline {
 
107
  %1 = bitcast i32 addrspace(4)* %addr to <4 x i32> addrspace(4)*
 
108
  %2 = load <4 x i32> addrspace(4)* %1, align 4, !tbaa !3
 
109
  ret <4 x i32> %2
 
110
}
 
111
 
 
112
define <8 x i32> @__clc_vload8_i32__addr4(i32 addrspace(4)* nocapture %addr) nounwind readonly alwaysinline {
 
113
  %1 = bitcast i32 addrspace(4)* %addr to <8 x i32> addrspace(4)*
 
114
  %2 = load <8 x i32> addrspace(4)* %1, align 4, !tbaa !3
 
115
  ret <8 x i32> %2
 
116
}
 
117
 
 
118
define <16 x i32> @__clc_vload16_i32__addr4(i32 addrspace(4)* nocapture %addr) nounwind readonly alwaysinline {
 
119
  %1 = bitcast i32 addrspace(4)* %addr to <16 x i32> addrspace(4)*
 
120
  %2 = load <16 x i32> addrspace(4)* %1, align 4, !tbaa !3
 
121
  ret <16 x i32> %2
 
122
}
 
123
 
 
124
!1 = metadata !{metadata !"char", metadata !5}
 
125
!2 = metadata !{metadata !"short", metadata !5}
 
126
!3 = metadata !{metadata !"int", metadata !5}
 
127
!4 = metadata !{metadata !"long", metadata !5}
 
128
!5 = metadata !{metadata !"omnipotent char", metadata !6}
 
129
!6 = metadata !{metadata !"Simple C/C++ TBAA"}
 
130