blob: 9777c0d85e9bd3a27ffdff355456c3110695b6c3 [file] [log] [blame]
NAKAMURA Takumifb3bd712015-05-25 01:43:23 +00001//===-- X86ShuffleDecode.cpp - X86 shuffle decode logic -------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// Define several functions to decode x86 specific shuffle semantics into a
11// generic vector mask.
12//
13//===----------------------------------------------------------------------===//
14
15#include "X86ShuffleDecode.h"
16#include "llvm/IR/Constants.h"
17#include "llvm/CodeGen/MachineValueType.h"
18
19//===----------------------------------------------------------------------===//
20// Vector Mask Decoding
21//===----------------------------------------------------------------------===//
22
23namespace llvm {
24
25void DecodeINSERTPSMask(unsigned Imm, SmallVectorImpl<int> &ShuffleMask) {
26 // Defaults the copying the dest value.
27 ShuffleMask.push_back(0);
28 ShuffleMask.push_back(1);
29 ShuffleMask.push_back(2);
30 ShuffleMask.push_back(3);
31
32 // Decode the immediate.
33 unsigned ZMask = Imm & 15;
34 unsigned CountD = (Imm >> 4) & 3;
35 unsigned CountS = (Imm >> 6) & 3;
36
37 // CountS selects which input element to use.
NAKAMURA Takumi5582a6a2015-05-25 01:43:34 +000038 unsigned InVal = 4 + CountS;
NAKAMURA Takumifb3bd712015-05-25 01:43:23 +000039 // CountD specifies which element of destination to update.
40 ShuffleMask[CountD] = InVal;
41 // ZMask zaps values, potentially overriding the CountD elt.
42 if (ZMask & 1) ShuffleMask[0] = SM_SentinelZero;
43 if (ZMask & 2) ShuffleMask[1] = SM_SentinelZero;
44 if (ZMask & 4) ShuffleMask[2] = SM_SentinelZero;
45 if (ZMask & 8) ShuffleMask[3] = SM_SentinelZero;
46}
47
48// <3,1> or <6,7,2,3>
49void DecodeMOVHLPSMask(unsigned NElts, SmallVectorImpl<int> &ShuffleMask) {
NAKAMURA Takumi5582a6a2015-05-25 01:43:34 +000050 for (unsigned i = NElts / 2; i != NElts; ++i)
51 ShuffleMask.push_back(NElts + i);
NAKAMURA Takumifb3bd712015-05-25 01:43:23 +000052
NAKAMURA Takumi5582a6a2015-05-25 01:43:34 +000053 for (unsigned i = NElts / 2; i != NElts; ++i)
NAKAMURA Takumifb3bd712015-05-25 01:43:23 +000054 ShuffleMask.push_back(i);
55}
56
57// <0,2> or <0,1,4,5>
58void DecodeMOVLHPSMask(unsigned NElts, SmallVectorImpl<int> &ShuffleMask) {
NAKAMURA Takumi5582a6a2015-05-25 01:43:34 +000059 for (unsigned i = 0; i != NElts / 2; ++i)
NAKAMURA Takumifb3bd712015-05-25 01:43:23 +000060 ShuffleMask.push_back(i);
61
NAKAMURA Takumi5582a6a2015-05-25 01:43:34 +000062 for (unsigned i = 0; i != NElts / 2; ++i)
63 ShuffleMask.push_back(NElts + i);
NAKAMURA Takumifb3bd712015-05-25 01:43:23 +000064}
65
66void DecodeMOVSLDUPMask(MVT VT, SmallVectorImpl<int> &ShuffleMask) {
67 unsigned NumElts = VT.getVectorNumElements();
68 for (int i = 0, e = NumElts / 2; i < e; ++i) {
69 ShuffleMask.push_back(2 * i);
70 ShuffleMask.push_back(2 * i);
71 }
72}
73
74void DecodeMOVSHDUPMask(MVT VT, SmallVectorImpl<int> &ShuffleMask) {
75 unsigned NumElts = VT.getVectorNumElements();
76 for (int i = 0, e = NumElts / 2; i < e; ++i) {
77 ShuffleMask.push_back(2 * i + 1);
78 ShuffleMask.push_back(2 * i + 1);
79 }
80}
81
82void DecodeMOVDDUPMask(MVT VT, SmallVectorImpl<int> &ShuffleMask) {
83 unsigned VectorSizeInBits = VT.getSizeInBits();
84 unsigned ScalarSizeInBits = VT.getScalarSizeInBits();
85 unsigned NumElts = VT.getVectorNumElements();
86 unsigned NumLanes = VectorSizeInBits / 128;
87 unsigned NumLaneElts = NumElts / NumLanes;
88 unsigned NumLaneSubElts = 64 / ScalarSizeInBits;
89
90 for (unsigned l = 0; l < NumElts; l += NumLaneElts)
91 for (unsigned i = 0; i < NumLaneElts; i += NumLaneSubElts)
92 for (unsigned s = 0; s != NumLaneSubElts; s++)
93 ShuffleMask.push_back(l + s);
94}
95
96void DecodePSLLDQMask(MVT VT, unsigned Imm, SmallVectorImpl<int> &ShuffleMask) {
97 unsigned VectorSizeInBits = VT.getSizeInBits();
98 unsigned NumElts = VectorSizeInBits / 8;
99 unsigned NumLanes = VectorSizeInBits / 128;
100 unsigned NumLaneElts = NumElts / NumLanes;
101
102 for (unsigned l = 0; l < NumElts; l += NumLaneElts)
103 for (unsigned i = 0; i < NumLaneElts; ++i) {
104 int M = SM_SentinelZero;
105 if (i >= Imm) M = i - Imm + l;
106 ShuffleMask.push_back(M);
107 }
108}
109
110void DecodePSRLDQMask(MVT VT, unsigned Imm, SmallVectorImpl<int> &ShuffleMask) {
111 unsigned VectorSizeInBits = VT.getSizeInBits();
112 unsigned NumElts = VectorSizeInBits / 8;
113 unsigned NumLanes = VectorSizeInBits / 128;
114 unsigned NumLaneElts = NumElts / NumLanes;
115
116 for (unsigned l = 0; l < NumElts; l += NumLaneElts)
117 for (unsigned i = 0; i < NumLaneElts; ++i) {
118 unsigned Base = i + Imm;
119 int M = Base + l;
120 if (Base >= NumLaneElts) M = SM_SentinelZero;
121 ShuffleMask.push_back(M);
122 }
123}
124
125void DecodePALIGNRMask(MVT VT, unsigned Imm,
126 SmallVectorImpl<int> &ShuffleMask) {
127 unsigned NumElts = VT.getVectorNumElements();
128 unsigned Offset = Imm * (VT.getVectorElementType().getSizeInBits() / 8);
129
130 unsigned NumLanes = VT.getSizeInBits() / 128;
131 unsigned NumLaneElts = NumElts / NumLanes;
132
133 for (unsigned l = 0; l != NumElts; l += NumLaneElts) {
134 for (unsigned i = 0; i != NumLaneElts; ++i) {
135 unsigned Base = i + Offset;
136 // if i+offset is out of this lane then we actually need the other source
137 if (Base >= NumLaneElts) Base += NumElts - NumLaneElts;
138 ShuffleMask.push_back(Base + l);
139 }
140 }
141}
142
143/// DecodePSHUFMask - This decodes the shuffle masks for pshufd, and vpermilp*.
144/// VT indicates the type of the vector allowing it to handle different
145/// datatypes and vector widths.
146void DecodePSHUFMask(MVT VT, unsigned Imm, SmallVectorImpl<int> &ShuffleMask) {
147 unsigned NumElts = VT.getVectorNumElements();
148
149 unsigned NumLanes = VT.getSizeInBits() / 128;
150 unsigned NumLaneElts = NumElts / NumLanes;
151
152 unsigned NewImm = Imm;
153 for (unsigned l = 0; l != NumElts; l += NumLaneElts) {
154 for (unsigned i = 0; i != NumLaneElts; ++i) {
155 ShuffleMask.push_back(NewImm % NumLaneElts + l);
156 NewImm /= NumLaneElts;
157 }
158 if (NumLaneElts == 4) NewImm = Imm; // reload imm
159 }
160}
161
162void DecodePSHUFHWMask(MVT VT, unsigned Imm,
163 SmallVectorImpl<int> &ShuffleMask) {
164 unsigned NumElts = VT.getVectorNumElements();
165
166 for (unsigned l = 0; l != NumElts; l += 8) {
167 unsigned NewImm = Imm;
168 for (unsigned i = 0, e = 4; i != e; ++i) {
169 ShuffleMask.push_back(l + i);
170 }
171 for (unsigned i = 4, e = 8; i != e; ++i) {
172 ShuffleMask.push_back(l + 4 + (NewImm & 3));
173 NewImm >>= 2;
174 }
175 }
176}
177
178void DecodePSHUFLWMask(MVT VT, unsigned Imm,
179 SmallVectorImpl<int> &ShuffleMask) {
180 unsigned NumElts = VT.getVectorNumElements();
181
182 for (unsigned l = 0; l != NumElts; l += 8) {
183 unsigned NewImm = Imm;
184 for (unsigned i = 0, e = 4; i != e; ++i) {
185 ShuffleMask.push_back(l + (NewImm & 3));
186 NewImm >>= 2;
187 }
188 for (unsigned i = 4, e = 8; i != e; ++i) {
189 ShuffleMask.push_back(l + i);
190 }
191 }
192}
193
194/// DecodeSHUFPMask - This decodes the shuffle masks for shufp*. VT indicates
195/// the type of the vector allowing it to handle different datatypes and vector
196/// widths.
197void DecodeSHUFPMask(MVT VT, unsigned Imm, SmallVectorImpl<int> &ShuffleMask) {
198 unsigned NumElts = VT.getVectorNumElements();
199
200 unsigned NumLanes = VT.getSizeInBits() / 128;
201 unsigned NumLaneElts = NumElts / NumLanes;
202
203 unsigned NewImm = Imm;
204 for (unsigned l = 0; l != NumElts; l += NumLaneElts) {
205 // each half of a lane comes from different source
NAKAMURA Takumi5582a6a2015-05-25 01:43:34 +0000206 for (unsigned s = 0; s != NumElts * 2; s += NumElts) {
207 for (unsigned i = 0; i != NumLaneElts / 2; ++i) {
NAKAMURA Takumifb3bd712015-05-25 01:43:23 +0000208 ShuffleMask.push_back(NewImm % NumLaneElts + s + l);
209 NewImm /= NumLaneElts;
210 }
211 }
212 if (NumLaneElts == 4) NewImm = Imm; // reload imm
213 }
214}
215
216/// DecodeUNPCKHMask - This decodes the shuffle masks for unpckhps/unpckhpd
217/// and punpckh*. VT indicates the type of the vector allowing it to handle
218/// different datatypes and vector widths.
219void DecodeUNPCKHMask(MVT VT, SmallVectorImpl<int> &ShuffleMask) {
220 unsigned NumElts = VT.getVectorNumElements();
221
222 // Handle 128 and 256-bit vector lengths. AVX defines UNPCK* to operate
223 // independently on 128-bit lanes.
224 unsigned NumLanes = VT.getSizeInBits() / 128;
225 if (NumLanes == 0 ) NumLanes = 1; // Handle MMX
226 unsigned NumLaneElts = NumElts / NumLanes;
227
228 for (unsigned l = 0; l != NumElts; l += NumLaneElts) {
NAKAMURA Takumi5582a6a2015-05-25 01:43:34 +0000229 for (unsigned i = l + NumLaneElts / 2, e = l + NumLaneElts; i != e; ++i) {
230 ShuffleMask.push_back(i); // Reads from dest/src1
231 ShuffleMask.push_back(i + NumElts); // Reads from src/src2
NAKAMURA Takumifb3bd712015-05-25 01:43:23 +0000232 }
233 }
234}
235
236/// DecodeUNPCKLMask - This decodes the shuffle masks for unpcklps/unpcklpd
237/// and punpckl*. VT indicates the type of the vector allowing it to handle
238/// different datatypes and vector widths.
239void DecodeUNPCKLMask(MVT VT, SmallVectorImpl<int> &ShuffleMask) {
240 unsigned NumElts = VT.getVectorNumElements();
241
242 // Handle 128 and 256-bit vector lengths. AVX defines UNPCK* to operate
243 // independently on 128-bit lanes.
244 unsigned NumLanes = VT.getSizeInBits() / 128;
245 if (NumLanes == 0 ) NumLanes = 1; // Handle MMX
246 unsigned NumLaneElts = NumElts / NumLanes;
247
248 for (unsigned l = 0; l != NumElts; l += NumLaneElts) {
NAKAMURA Takumi5582a6a2015-05-25 01:43:34 +0000249 for (unsigned i = l, e = l + NumLaneElts / 2; i != e; ++i) {
250 ShuffleMask.push_back(i); // Reads from dest/src1
251 ShuffleMask.push_back(i + NumElts); // Reads from src/src2
NAKAMURA Takumifb3bd712015-05-25 01:43:23 +0000252 }
253 }
254}
255
256void DecodeVPERM2X128Mask(MVT VT, unsigned Imm,
257 SmallVectorImpl<int> &ShuffleMask) {
258 if (Imm & 0x88)
259 return; // Not a shuffle
260
NAKAMURA Takumi5582a6a2015-05-25 01:43:34 +0000261 unsigned HalfSize = VT.getVectorNumElements() / 2;
NAKAMURA Takumifb3bd712015-05-25 01:43:23 +0000262
263 for (unsigned l = 0; l != 2; ++l) {
NAKAMURA Takumi5582a6a2015-05-25 01:43:34 +0000264 unsigned HalfBegin = ((Imm >> (l * 4)) & 0x3) * HalfSize;
265 for (unsigned i = HalfBegin, e = HalfBegin + HalfSize; i != e; ++i)
NAKAMURA Takumifb3bd712015-05-25 01:43:23 +0000266 ShuffleMask.push_back(i);
267 }
268}
269
270void DecodePSHUFBMask(const Constant *C, SmallVectorImpl<int> &ShuffleMask) {
271 Type *MaskTy = C->getType();
272 // It is not an error for the PSHUFB mask to not be a vector of i8 because the
273 // constant pool uniques constants by their bit representation.
274 // e.g. the following take up the same space in the constant pool:
275 // i128 -170141183420855150465331762880109871104
276 //
277 // <2 x i64> <i64 -9223372034707292160, i64 -9223372034707292160>
278 //
279 // <4 x i32> <i32 -2147483648, i32 -2147483648,
280 // i32 -2147483648, i32 -2147483648>
281
282 unsigned MaskTySize = MaskTy->getPrimitiveSizeInBits();
283
284 if (MaskTySize != 128 && MaskTySize != 256) // FIXME: Add support for AVX-512.
285 return;
286
287 // This is a straightforward byte vector.
288 if (MaskTy->isVectorTy() && MaskTy->getVectorElementType()->isIntegerTy(8)) {
289 int NumElements = MaskTy->getVectorNumElements();
290 ShuffleMask.reserve(NumElements);
291
292 for (int i = 0; i < NumElements; ++i) {
293 // For AVX vectors with 32 bytes the base of the shuffle is the 16-byte
294 // lane of the vector we're inside.
295 int Base = i < 16 ? 0 : 16;
296 Constant *COp = C->getAggregateElement(i);
297 if (!COp) {
298 ShuffleMask.clear();
299 return;
300 } else if (isa<UndefValue>(COp)) {
301 ShuffleMask.push_back(SM_SentinelUndef);
302 continue;
303 }
304 uint64_t Element = cast<ConstantInt>(COp)->getZExtValue();
305 // If the high bit (7) of the byte is set, the element is zeroed.
306 if (Element & (1 << 7))
307 ShuffleMask.push_back(SM_SentinelZero);
308 else {
309 // Only the least significant 4 bits of the byte are used.
310 int Index = Base + (Element & 0xf);
311 ShuffleMask.push_back(Index);
312 }
313 }
314 }
315 // TODO: Handle funny-looking vectors too.
316}
317
318void DecodePSHUFBMask(ArrayRef<uint64_t> RawMask,
319 SmallVectorImpl<int> &ShuffleMask) {
320 for (int i = 0, e = RawMask.size(); i < e; ++i) {
321 uint64_t M = RawMask[i];
322 if (M == (uint64_t)SM_SentinelUndef) {
323 ShuffleMask.push_back(M);
324 continue;
325 }
326 // For AVX vectors with 32 bytes the base of the shuffle is the half of
327 // the vector we're inside.
328 int Base = i < 16 ? 0 : 16;
329 // If the high bit (7) of the byte is set, the element is zeroed.
330 if (M & (1 << 7))
331 ShuffleMask.push_back(SM_SentinelZero);
332 else {
333 // Only the least significant 4 bits of the byte are used.
334 int Index = Base + (M & 0xf);
335 ShuffleMask.push_back(Index);
336 }
337 }
338}
339
340void DecodeBLENDMask(MVT VT, unsigned Imm, SmallVectorImpl<int> &ShuffleMask) {
341 int ElementBits = VT.getScalarSizeInBits();
342 int NumElements = VT.getVectorNumElements();
343 for (int i = 0; i < NumElements; ++i) {
344 // If there are more than 8 elements in the vector, then any immediate blend
345 // mask applies to each 128-bit lane. There can never be more than
346 // 8 elements in a 128-bit lane with an immediate blend.
347 int Bit = NumElements > 8 ? i % (128 / ElementBits) : i;
348 assert(Bit < 8 &&
349 "Immediate blends only operate over 8 elements at a time!");
350 ShuffleMask.push_back(((Imm >> Bit) & 1) ? NumElements + i : i);
351 }
352}
353
354/// DecodeVPERMMask - this decodes the shuffle masks for VPERMQ/VPERMPD.
355/// No VT provided since it only works on 256-bit, 4 element vectors.
356void DecodeVPERMMask(unsigned Imm, SmallVectorImpl<int> &ShuffleMask) {
357 for (unsigned i = 0; i != 4; ++i) {
NAKAMURA Takumi5582a6a2015-05-25 01:43:34 +0000358 ShuffleMask.push_back((Imm >> (2 * i)) & 3);
NAKAMURA Takumifb3bd712015-05-25 01:43:23 +0000359 }
360}
361
362void DecodeVPERMILPMask(const Constant *C, SmallVectorImpl<int> &ShuffleMask) {
363 Type *MaskTy = C->getType();
364 assert(MaskTy->isVectorTy() && "Expected a vector constant mask!");
365 assert(MaskTy->getVectorElementType()->isIntegerTy() &&
366 "Expected integer constant mask elements!");
367 int ElementBits = MaskTy->getScalarSizeInBits();
368 int NumElements = MaskTy->getVectorNumElements();
369 assert((NumElements == 2 || NumElements == 4 || NumElements == 8) &&
370 "Unexpected number of vector elements.");
371 ShuffleMask.reserve(NumElements);
372 if (auto *CDS = dyn_cast<ConstantDataSequential>(C)) {
373 assert((unsigned)NumElements == CDS->getNumElements() &&
374 "Constant mask has a different number of elements!");
375
376 for (int i = 0; i < NumElements; ++i) {
377 int Base = (i * ElementBits / 128) * (128 / ElementBits);
378 uint64_t Element = CDS->getElementAsInteger(i);
379 // Only the least significant 2 bits of the integer are used.
380 int Index = Base + (Element & 0x3);
381 ShuffleMask.push_back(Index);
382 }
383 } else if (auto *CV = dyn_cast<ConstantVector>(C)) {
384 assert((unsigned)NumElements == C->getNumOperands() &&
385 "Constant mask has a different number of elements!");
386
387 for (int i = 0; i < NumElements; ++i) {
388 int Base = (i * ElementBits / 128) * (128 / ElementBits);
389 Constant *COp = CV->getOperand(i);
390 if (isa<UndefValue>(COp)) {
391 ShuffleMask.push_back(SM_SentinelUndef);
392 continue;
393 }
394 uint64_t Element = cast<ConstantInt>(COp)->getZExtValue();
395 // Only the least significant 2 bits of the integer are used.
396 int Index = Base + (Element & 0x3);
397 ShuffleMask.push_back(Index);
398 }
399 }
400}
401
402void DecodeZeroExtendMask(MVT SrcVT, MVT DstVT, SmallVectorImpl<int> &Mask) {
403 unsigned NumDstElts = DstVT.getVectorNumElements();
404 unsigned SrcScalarBits = SrcVT.getScalarSizeInBits();
405 unsigned DstScalarBits = DstVT.getScalarSizeInBits();
406 unsigned Scale = DstScalarBits / SrcScalarBits;
407 assert(SrcScalarBits < DstScalarBits &&
408 "Expected zero extension mask to increase scalar size");
409 assert(SrcVT.getVectorNumElements() >= NumDstElts &&
410 "Too many zero extension lanes");
411
412 for (unsigned i = 0; i != NumDstElts; i++) {
413 Mask.push_back(i);
414 for (unsigned j = 1; j != Scale; j++)
415 Mask.push_back(SM_SentinelZero);
416 }
417}
418
419void DecodeZeroMoveLowMask(MVT VT, SmallVectorImpl<int> &ShuffleMask) {
420 unsigned NumElts = VT.getVectorNumElements();
421 ShuffleMask.push_back(0);
422 for (unsigned i = 1; i < NumElts; i++)
423 ShuffleMask.push_back(SM_SentinelZero);
424}
425
426void DecodeScalarMoveMask(MVT VT, bool IsLoad, SmallVectorImpl<int> &Mask) {
427 // First element comes from the first element of second source.
428 // Remaining elements: Load zero extends / Move copies from first source.
429 unsigned NumElts = VT.getVectorNumElements();
430 Mask.push_back(NumElts);
431 for (unsigned i = 1; i < NumElts; i++)
432 Mask.push_back(IsLoad ? static_cast<int>(SM_SentinelZero) : i);
433}
Simon Pilgrimd85cae32015-07-06 20:46:41 +0000434
435void DecodeEXTRQIMask(int Len, int Idx,
436 SmallVectorImpl<int> &ShuffleMask) {
437 // Only the bottom 6 bits are valid for each immediate.
438 Len &= 0x3F;
439 Idx &= 0x3F;
440
441 // We can only decode this bit extraction instruction as a shuffle if both the
442 // length and index work with whole bytes.
443 if (0 != (Len % 8) || 0 != (Idx % 8))
444 return;
445
446 // A length of zero is equivalent to a bit length of 64.
447 if (Len == 0)
448 Len = 64;
449
450 // If the length + index exceeds the bottom 64 bits the result is undefined.
451 if ((Len + Idx) > 64) {
452 ShuffleMask.append(16, SM_SentinelUndef);
453 return;
454 }
455
456 // Convert index and index to work with bytes.
457 Len /= 8;
458 Idx /= 8;
459
460 // EXTRQ: Extract Len bytes starting from Idx. Zero pad the remaining bytes
461 // of the lower 64-bits. The upper 64-bits are undefined.
462 for (int i = 0; i != Len; ++i)
463 ShuffleMask.push_back(i + Idx);
464 for (int i = Len; i != 8; ++i)
465 ShuffleMask.push_back(SM_SentinelZero);
466 for (int i = 8; i != 16; ++i)
467 ShuffleMask.push_back(SM_SentinelUndef);
468}
469
470void DecodeINSERTQIMask(int Len, int Idx,
471 SmallVectorImpl<int> &ShuffleMask) {
472 // Only the bottom 6 bits are valid for each immediate.
473 Len &= 0x3F;
474 Idx &= 0x3F;
475
476 // We can only decode this bit insertion instruction as a shuffle if both the
477 // length and index work with whole bytes.
478 if (0 != (Len % 8) || 0 != (Idx % 8))
479 return;
480
481 // A length of zero is equivalent to a bit length of 64.
482 if (Len == 0)
483 Len = 64;
484
485 // If the length + index exceeds the bottom 64 bits the result is undefined.
486 if ((Len + Idx) > 64) {
487 ShuffleMask.append(16, SM_SentinelUndef);
488 return;
489 }
490
491 // Convert index and index to work with bytes.
492 Len /= 8;
493 Idx /= 8;
494
495 // INSERTQ: Extract lowest Len bytes from lower half of second source and
496 // insert over first source starting at Idx byte. The upper 64-bits are
497 // undefined.
498 for (int i = 0; i != Idx; ++i)
499 ShuffleMask.push_back(i);
500 for (int i = 0; i != Len; ++i)
501 ShuffleMask.push_back(i + 16);
502 for (int i = Idx + Len; i != 8; ++i)
503 ShuffleMask.push_back(i);
504 for (int i = 8; i != 16; ++i)
505 ShuffleMask.push_back(SM_SentinelUndef);
506}
507
Alexander Kornienkof00654e2015-06-23 09:49:53 +0000508} // llvm namespace