]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/Bitcode/binaryIntInstructions.3.2.ll
Vendor import of llvm RELEASE_350/final tag r216957 (effectively, 3.5.0 release):
[FreeBSD/FreeBSD.git] / test / Bitcode / binaryIntInstructions.3.2.ll
1 ; RUN:  llvm-dis < %s.bc| FileCheck %s\r
2 \r
3 ; BinaryIntOperation.3.2.ll.bc was generated by passing this file to llvm-as-3.2.\r
4 ; The test checks that LLVM does not misread binary integer instructions from\r
5 ; older bitcode files.\r
6 \r
7 define void @add(i1 %x1, i8 %x2 ,i16 %x3, i32 %x4, i64 %x5){\r
8 entry:\r
9 ; CHECK: %res1 = add i1 %x1, %x1\r
10   %res1 = add i1 %x1, %x1\r
11 \r
12 ; CHECK-NEXT: %res2 = add i8 %x2, %x2\r
13   %res2 = add i8 %x2, %x2\r
14 \r
15 ; CHECK-NEXT: %res3 = add i16 %x3, %x3\r
16   %res3 = add i16 %x3, %x3\r
17 \r
18 ; CHECK-NEXT: %res4 = add i32 %x4, %x4\r
19   %res4 = add i32 %x4, %x4\r
20 \r
21 ; CHECK-NEXT: %res5 = add i64 %x5, %x5\r
22   %res5 = add i64 %x5, %x5\r
23   \r
24 ; CHECK: %res6 = add nuw i1 %x1, %x1\r
25   %res6 = add nuw i1 %x1, %x1\r
26   \r
27 ; CHECK: %res7 = add nsw i1 %x1, %x1\r
28   %res7 = add nsw i1 %x1, %x1\r
29   \r
30 ; CHECK: %res8 = add nuw nsw i1 %x1, %x1\r
31   %res8 = add nuw nsw i1 %x1, %x1\r
32   \r
33   ret void\r
34 }\r
35 \r
36 define void @addvec8NuwNsw(<2 x i8> %x1, <3 x i8> %x2 ,<4 x i8> %x3, <8 x i8> %x4, <16 x i8> %x5){\r
37 entry:\r
38 ; CHECK: %res1 = add nuw nsw <2 x i8> %x1, %x1\r
39   %res1 = add nuw nsw <2 x i8> %x1, %x1\r
40 \r
41 ; CHECK-NEXT: %res2 = add nuw nsw <3 x i8> %x2, %x2\r
42   %res2 = add nuw nsw <3 x i8> %x2, %x2\r
43 \r
44 ; CHECK-NEXT: %res3 = add nuw nsw <4 x i8> %x3, %x3\r
45   %res3 = add nuw nsw <4 x i8> %x3, %x3\r
46 \r
47 ; CHECK-NEXT: %res4 = add nuw nsw <8 x i8> %x4, %x4\r
48   %res4 = add nuw nsw <8 x i8> %x4, %x4\r
49   \r
50 ; CHECK-NEXT: %res5 = add nuw nsw <16 x i8> %x5, %x5\r
51   %res5 = add nuw nsw <16 x i8> %x5, %x5\r
52   \r
53   ret void\r
54 }\r
55 \r
56 define void @addvec16NuwNsw(<2 x i16> %x1, <3 x i16> %x2 ,<4 x i16> %x3, <8 x i16> %x4, <16 x i16> %x5){\r
57 entry:\r
58 ; CHECK: %res1 = add nuw nsw <2 x i16> %x1, %x1\r
59   %res1 = add nuw nsw <2 x i16> %x1, %x1\r
60 \r
61 ; CHECK-NEXT: %res2 = add nuw nsw <3 x i16> %x2, %x2\r
62   %res2 = add nuw nsw <3 x i16> %x2, %x2\r
63 \r
64 ; CHECK-NEXT: %res3 = add nuw nsw <4 x i16> %x3, %x3\r
65   %res3 = add nuw nsw <4 x i16> %x3, %x3\r
66 \r
67 ; CHECK-NEXT: %res4 = add nuw nsw <8 x i16> %x4, %x4\r
68   %res4 = add nuw nsw <8 x i16> %x4, %x4\r
69   \r
70 ; CHECK-NEXT: %res5 = add nuw nsw <16 x i16> %x5, %x5\r
71   %res5 = add nuw nsw <16 x i16> %x5, %x5\r
72   \r
73   ret void\r
74 }\r
75 \r
76 define void @addvec32NuwNsw(<2 x i32> %x1, <3 x i32> %x2 ,<4 x i32> %x3, <8 x i32> %x4, <16 x i32> %x5){\r
77 entry:\r
78 ; CHECK: %res1 = add nuw nsw <2 x i32> %x1, %x1\r
79   %res1 = add nuw nsw <2 x i32> %x1, %x1\r
80 \r
81 ; CHECK-NEXT: %res2 = add nuw nsw <3 x i32> %x2, %x2\r
82   %res2 = add nuw nsw <3 x i32> %x2, %x2\r
83 \r
84 ; CHECK-NEXT: %res3 = add nuw nsw <4 x i32> %x3, %x3\r
85   %res3 = add nuw nsw <4 x i32> %x3, %x3\r
86 \r
87 ; CHECK-NEXT: %res4 = add nuw nsw <8 x i32> %x4, %x4\r
88   %res4 = add nuw nsw <8 x i32> %x4, %x4\r
89   \r
90 ; CHECK-NEXT: %res5 = add nuw nsw <16 x i32> %x5, %x5\r
91   %res5 = add nuw nsw <16 x i32> %x5, %x5\r
92   \r
93   ret void\r
94 }\r
95 \r
96 define void @addvec64NuwNsw(<2 x i64> %x1, <3 x i64> %x2 ,<4 x i64> %x3, <8 x i64> %x4, <16 x i64> %x5){\r
97 entry:\r
98 ; CHECK: %res1 = add nuw nsw <2 x i64> %x1, %x1\r
99   %res1 = add nuw nsw <2 x i64> %x1, %x1\r
100 \r
101 ; CHECK-NEXT: %res2 = add nuw nsw <3 x i64> %x2, %x2\r
102   %res2 = add nuw nsw <3 x i64> %x2, %x2\r
103 \r
104 ; CHECK-NEXT: %res3 = add nuw nsw <4 x i64> %x3, %x3\r
105   %res3 = add nuw nsw <4 x i64> %x3, %x3\r
106 \r
107 ; CHECK-NEXT: %res4 = add nuw nsw <8 x i64> %x4, %x4\r
108   %res4 = add nuw nsw <8 x i64> %x4, %x4\r
109   \r
110 ; CHECK-NEXT: %res5 = add nuw nsw <16 x i64> %x5, %x5\r
111   %res5 = add nuw nsw <16 x i64> %x5, %x5\r
112   \r
113   ret void\r
114 }\r
115 \r
116 define void @sub(i8 %x1){\r
117 entry:\r
118 ; CHECK: %res1 = sub i8 %x1, %x1\r
119   %res1 = sub i8 %x1, %x1\r
120   \r
121 ; CHECK: %res2 = sub nuw i8 %x1, %x1\r
122   %res2 = sub nuw i8 %x1, %x1\r
123   \r
124 ; CHECK: %res3 = sub nsw i8 %x1, %x1\r
125   %res3 = sub nsw i8 %x1, %x1\r
126   \r
127 ; CHECK: %res4 = sub nuw nsw i8 %x1, %x1\r
128   %res4 = sub nuw nsw i8 %x1, %x1\r
129   \r
130   ret void\r
131 }\r
132 \r
133 define void @mul(i8 %x1){\r
134 entry:\r
135 ; CHECK: %res1 = mul i8 %x1, %x1\r
136   %res1 = mul i8 %x1, %x1\r
137   \r
138   ret void\r
139 }\r
140 \r
141 define void @udiv(i8 %x1){\r
142 entry:\r
143 ; CHECK: %res1 = udiv i8 %x1, %x1\r
144   %res1 = udiv i8 %x1, %x1\r
145   \r
146 ; CHECK-NEXT: %res2 = udiv exact i8 %x1, %x1\r
147   %res2 = udiv exact i8 %x1, %x1\r
148 \r
149   ret void\r
150 }\r
151 \r
152 define void @sdiv(i8 %x1){\r
153 entry:\r
154 ; CHECK: %res1 = sdiv i8 %x1, %x1\r
155   %res1 = sdiv i8 %x1, %x1\r
156   \r
157 ; CHECK-NEXT: %res2 = sdiv exact i8 %x1, %x1\r
158   %res2 = sdiv exact i8 %x1, %x1\r
159 \r
160   ret void\r
161 }\r
162 \r
163 define void @urem(i32 %x1){\r
164 entry:\r
165 ; CHECK: %res1 = urem i32 %x1, %x1\r
166   %res1 = urem i32 %x1, %x1\r
167   \r
168   ret void\r
169 }\r
170 \r
171 define void @srem(i32 %x1){\r
172 entry:\r
173 ; CHECK: %res1 = srem i32 %x1, %x1\r
174   %res1 = srem i32 %x1, %x1\r
175   \r
176   ret void\r
177 }\r