1 //===- NeonEmitter.cpp - Generate arm_neon.h for use with clang -*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This tablegen backend is responsible for emitting arm_neon.h, which includes
11 // a declaration and definition of each function specified by the ARM NEON
12 // compiler interface. See ARM document DUI0348B.
14 // Each NEON instruction is implemented in terms of 1 or more functions which
15 // are suffixed with the element type of the input vectors. Functions may be
16 // implemented in terms of generic vector operations such as +, *, -, etc. or
17 // by calling a __builtin_-prefixed function which will be handled by clang's
20 // Additional validation code can be generated by this file when runHeader() is
21 // called, rather than the normal run() entry point.
23 //===----------------------------------------------------------------------===//
25 #include "NeonEmitter.h"
26 #include "llvm/ADT/SmallString.h"
27 #include "llvm/ADT/SmallVector.h"
28 #include "llvm/ADT/StringExtras.h"
33 /// ParseTypes - break down a string such as "fQf" into a vector of StringRefs,
34 /// which each StringRef representing a single type declared in the string.
35 /// for "fQf" we would end up with 2 StringRefs, "f", and "Qf", representing
36 /// 2xfloat and 4xfloat respectively.
37 static void ParseTypes(Record *r, std::string &s,
38 SmallVectorImpl<StringRef> &TV) {
39 const char *data = s.data();
42 for (unsigned i = 0, e = s.size(); i != e; ++i, ++len) {
43 if (data[len] == 'P' || data[len] == 'Q' || data[len] == 'U')
55 throw TGError(r->getLoc(),
56 "Unexpected letter: " + std::string(data + len, 1));
59 TV.push_back(StringRef(data, len + 1));
65 /// Widen - Convert a type code into the next wider type. char -> short,
66 /// short -> int, etc.
67 static char Widen(const char t) {
75 default: throw "unhandled type in widen!";
80 /// Narrow - Convert a type code into the next smaller type. short -> char,
81 /// float -> half float, etc.
82 static char Narrow(const char t) {
92 default: throw "unhandled type in widen!";
97 /// For a particular StringRef, return the base type code, and whether it has
98 /// the quad-vector, polynomial, or unsigned modifiers set.
99 static char ClassifyType(StringRef ty, bool &quad, bool &poly, bool &usgn) {
103 if (ty[off] == 'Q') {
109 if (ty[off] == 'P') {
114 // remember unsigned.
115 if (ty[off] == 'U') {
120 // base type to get the type string for.
124 /// ModType - Transform a type code and its modifiers based on a mod code. The
125 /// mod code definitions may be found at the top of arm_neon.td.
126 static char ModType(const char mod, char type, bool &quad, bool &poly,
127 bool &usgn, bool &scal, bool &cnst, bool &pntr) {
191 /// TypeString - for a modifier and type, generate the name of the typedef for
192 /// that type. QUc -> uint8x8_t.
193 static std::string TypeString(const char mod, StringRef typestr) {
206 // base type to get the type string for.
207 char type = ClassifyType(typestr, quad, poly, usgn);
209 // Based on the modifying character, change the type and width if necessary.
210 type = ModType(mod, type, quad, poly, usgn, scal, cnst, pntr);
219 s += poly ? "poly8" : "int8";
222 s += quad ? "x16" : "x8";
225 s += poly ? "poly16" : "int16";
228 s += quad ? "x8" : "x4";
234 s += quad ? "x4" : "x2";
240 s += quad ? "x2" : "x1";
246 s += quad ? "x8" : "x4";
252 s += quad ? "x4" : "x2";
255 throw "unhandled type!";
266 // Append _t, finishing the type string typedef type.
278 /// BuiltinTypeString - for a modifier and type, generate the clang
279 /// BuiltinsARM.def prototype code for the function. See the top of clang's
280 /// Builtins.def for a description of the type strings.
281 static std::string BuiltinTypeString(const char mod, StringRef typestr,
282 ClassKind ck, bool ret) {
295 // base type to get the type string for.
296 char type = ClassifyType(typestr, quad, poly, usgn);
298 // Based on the modifying character, change the type and width if necessary.
299 type = ModType(mod, type, quad, poly, usgn, scal, cnst, pntr);
310 usgn = usgn | poly | ((ck == ClassI || ck == ClassW) && scal && type != 'f');
330 // Since the return value must be one type, return a vector type of the
331 // appropriate width which we will bitcast. An exception is made for
332 // returning structs of 2, 3, or 4 vectors which are returned in a sret-like
333 // fashion, storing them to a pointer arg.
335 if (mod == '2' || mod == '3' || mod == '4')
337 if (mod == 'f' || (ck != ClassB && type == 'f'))
338 return quad ? "V4f" : "V2f";
339 if (ck != ClassB && type == 's')
340 return quad ? "V8s" : "V4s";
341 if (ck != ClassB && type == 'i')
342 return quad ? "V4i" : "V2i";
343 if (ck != ClassB && type == 'l')
344 return quad ? "V2LLi" : "V1LLi";
346 return quad ? "V16c" : "V8c";
349 // Non-return array types are passed as individual vectors.
351 return quad ? "V16cV16c" : "V8cV8c";
353 return quad ? "V16cV16cV16c" : "V8cV8cV8c";
355 return quad ? "V16cV16cV16cV16c" : "V8cV8cV8cV8c";
357 if (mod == 'f' || (ck != ClassB && type == 'f'))
358 return quad ? "V4f" : "V2f";
359 if (ck != ClassB && type == 's')
360 return quad ? "V8s" : "V4s";
361 if (ck != ClassB && type == 'i')
362 return quad ? "V4i" : "V2i";
363 if (ck != ClassB && type == 'l')
364 return quad ? "V2LLi" : "V1LLi";
366 return quad ? "V16c" : "V8c";
369 /// MangleName - Append a type or width suffix to a base neon function name,
370 /// and insert a 'q' in the appropriate location if the operation works on
371 /// 128b rather than 64b. E.g. turn "vst2_lane" into "vst2q_lane_f32", etc.
372 static std::string MangleName(const std::string &name, StringRef typestr,
374 if (name == "vcvt_f32_f16")
380 char type = ClassifyType(typestr, quad, poly, usgn);
382 std::string s = name;
387 case ClassS: s += poly ? "_p8" : usgn ? "_u8" : "_s8"; break;
388 case ClassI: s += "_i8"; break;
389 case ClassW: s += "_8"; break;
395 case ClassS: s += poly ? "_p16" : usgn ? "_u16" : "_s16"; break;
396 case ClassI: s += "_i16"; break;
397 case ClassW: s += "_16"; break;
403 case ClassS: s += usgn ? "_u32" : "_s32"; break;
404 case ClassI: s += "_i32"; break;
405 case ClassW: s += "_32"; break;
411 case ClassS: s += usgn ? "_u64" : "_s64"; break;
412 case ClassI: s += "_i64"; break;
413 case ClassW: s += "_64"; break;
420 case ClassI: s += "_f16"; break;
421 case ClassW: s += "_16"; break;
428 case ClassI: s += "_f32"; break;
429 case ClassW: s += "_32"; break;
434 throw "unhandled type!";
440 // Insert a 'q' before the first '_' character so that it ends up before
441 // _lane or _n on vector-scalar operations.
443 size_t pos = s.find('_');
444 s = s.insert(pos, "q");
449 // Generate the string "(argtype a, argtype b, ...)"
450 static std::string GenArgs(const std::string &proto, StringRef typestr) {
451 bool define = proto.find('i') != std::string::npos;
457 for (unsigned i = 1, e = proto.size(); i != e; ++i, ++arg) {
459 s += TypeString(proto[i], typestr);
471 static std::string Duplicate(unsigned nElts, StringRef typestr,
472 const std::string &a) {
475 s = "(" + TypeString('d', typestr) + "){ ";
476 for (unsigned i = 0; i != nElts; ++i) {
486 static unsigned GetNumElements(StringRef typestr, bool &quad) {
489 char type = ClassifyType(typestr, quad, dummy, dummy);
492 case 'c': nElts = 8; break;
493 case 's': nElts = 4; break;
494 case 'i': nElts = 2; break;
495 case 'l': nElts = 1; break;
496 case 'h': nElts = 4; break;
497 case 'f': nElts = 2; break;
499 throw "unhandled type!";
502 if (quad) nElts <<= 1;
506 // Generate the definition for this intrinsic, e.g. "a + b" for OpAdd.
507 static std::string GenOpString(OpKind op, const std::string &proto,
510 unsigned nElts = GetNumElements(typestr, quad);
512 std::string ts = TypeString(proto[0], typestr);
514 if (op == OpHi || op == OpLo) {
515 s = "union { " + ts + " r; double d; } u; u.d";
530 s += "a * " + Duplicate(nElts, typestr, "b");
536 s += "a + (b * " + Duplicate(nElts, typestr, "c") + ")";
542 s += "a - (b * " + Duplicate(nElts, typestr, "c") + ")";
548 s += "(" + ts + ")(a == b)";
551 s += "(" + ts + ")(a >= b)";
554 s += "(" + ts + ")(a <= b)";
557 s += "(" + ts + ")(a > b)";
560 s += "(" + ts + ")(a < b)";
584 s += "(" + ts + ")a";
587 s += "__builtin_shufflevector((int64x1_t)a";
588 s += ", (int64x1_t)b, 0, 1)";
591 s += "(((float64x2_t)a)[1])";
594 s += "(((float64x2_t)a)[0])";
597 s += Duplicate(nElts, typestr, "a");
600 // ((0 & 1) | (~0 & 2))
601 ts = TypeString(proto[1], typestr);
602 s += "(a & (" + ts + ")b) | ";
603 s += "(~a & (" + ts + ")c)";
606 s += "__builtin_shufflevector(a, a";
607 for (unsigned i = 2; i <= nElts; i += 2)
608 for (unsigned j = 0; j != 2; ++j)
609 s += ", " + utostr(i - j - 1);
613 unsigned WordElts = nElts >> (1 + (int)quad);
614 s += "__builtin_shufflevector(a, a";
615 for (unsigned i = WordElts; i <= nElts; i += WordElts)
616 for (unsigned j = 0; j != WordElts; ++j)
617 s += ", " + utostr(i - j - 1);
622 unsigned DblWordElts = nElts >> (int)quad;
623 s += "__builtin_shufflevector(a, a";
624 for (unsigned i = DblWordElts; i <= nElts; i += DblWordElts)
625 for (unsigned j = 0; j != DblWordElts; ++j)
626 s += ", " + utostr(i - j - 1);
631 throw "unknown OpKind!";
634 if (op == OpHi || op == OpLo)
635 s += "; return u.r;";
641 static unsigned GetNeonEnum(const std::string &proto, StringRef typestr) {
642 unsigned mod = proto[0];
645 if (mod == 'v' || mod == 'f')
655 // Base type to get the type string for.
656 char type = ClassifyType(typestr, quad, poly, usgn);
658 // Based on the modifying character, change the type and width if necessary.
659 type = ModType(mod, type, quad, poly, usgn, scal, cnst, pntr);
663 if (quad && proto[1] != 'g')
686 throw "unhandled type!";
692 // Generate the definition for this intrinsic, e.g. __builtin_neon_cls(a)
693 static std::string GenBuiltin(const std::string &name, const std::string &proto,
694 StringRef typestr, ClassKind ck) {
696 unsigned nElts = GetNumElements(typestr, quad);
700 // If this builtin returns a struct 2, 3, or 4 vectors, pass it as an implicit
701 // sret-like argument.
702 bool sret = (proto[0] == '2' || proto[0] == '3' || proto[0] == '4');
704 // If this builtin takes an immediate argument, we need to #define it rather
705 // than use a standard declaration, so that SemaChecking can range check
706 // the immediate passed by the user.
707 bool define = proto.find('i') != std::string::npos;
709 // If all types are the same size, bitcasting the args will take care
710 // of arg checking. The actual signedness etc. will be taken care of with
712 if (proto.find('s') == std::string::npos)
715 if (proto[0] != 'v') {
716 std::string ts = TypeString(proto[0], typestr);
720 s += "({ " + ts + " r; ";
721 else if (proto[0] != 's')
726 s += ts + " r; r = ";
730 bool splat = proto.find('a') != std::string::npos;
732 s += "__builtin_neon_";
734 std::string vname(name, 0, name.size()-2);
735 s += MangleName(vname, typestr, ck);
737 s += MangleName(name, typestr, ck);
741 // Pass the address of the return variable as the first argument to sret-like
746 for (unsigned i = 1, e = proto.size(); i != e; ++i, ++arg) {
747 std::string args = std::string(&arg, 1);
749 args = "(" + args + ")";
751 // Handle multiple-vector values specially, emitting each subvector as an
752 // argument to the __builtin.
753 if (proto[i] == '2' || proto[i] == '3' || proto[i] == '4') {
754 for (unsigned vi = 0, ve = proto[i] - '0'; vi != ve; ++vi) {
755 s += args + ".val[" + utostr(vi) + "]";
765 if (splat && (i + 1) == e)
766 s += Duplicate(nElts, typestr, args);
773 // Extra constant integer to hold type class enum for this function, e.g. s8
775 s += ", " + utostr(GetNeonEnum(proto, typestr));
782 if (proto[0] != 'v') {
793 static std::string GenBuiltinDef(const std::string &name,
794 const std::string &proto,
795 StringRef typestr, ClassKind ck) {
796 std::string s("BUILTIN(__builtin_neon_");
798 // If all types are the same size, bitcasting the args will take care
799 // of arg checking. The actual signedness etc. will be taken care of with
801 if (proto.find('s') == std::string::npos)
804 s += MangleName(name, typestr, ck);
807 for (unsigned i = 0, e = proto.size(); i != e; ++i)
808 s += BuiltinTypeString(proto[i], typestr, ck, i == 0);
810 // Extra constant integer to hold type class enum for this function, e.g. s8
818 /// run - Read the records in arm_neon.td and output arm_neon.h. arm_neon.h
819 /// is comprised of type definitions and function declarations.
820 void NeonEmitter::run(raw_ostream &OS) {
821 EmitSourceFileHeader("ARM NEON Header", OS);
823 // FIXME: emit license into file?
825 OS << "#ifndef __ARM_NEON_H\n";
826 OS << "#define __ARM_NEON_H\n\n";
828 OS << "#ifndef __ARM_NEON__\n";
829 OS << "#error \"NEON support not enabled\"\n";
832 OS << "#include <stdint.h>\n\n";
834 // Emit NEON-specific scalar typedefs.
835 OS << "typedef float float32_t;\n";
836 OS << "typedef int8_t poly8_t;\n";
837 OS << "typedef int16_t poly16_t;\n";
838 OS << "typedef uint16_t float16_t;\n";
840 // Emit Neon vector typedefs.
841 std::string TypedefTypes("cQcsQsiQilQlUcQUcUsQUsUiQUiUlQUlhQhfQfPcQPcPsQPs");
842 SmallVector<StringRef, 24> TDTypeVec;
843 ParseTypes(0, TypedefTypes, TDTypeVec);
845 // Emit vector typedefs.
846 for (unsigned i = 0, e = TDTypeVec.size(); i != e; ++i) {
847 bool dummy, quad = false;
848 (void) ClassifyType(TDTypeVec[i], quad, dummy, dummy);
849 OS << "typedef __attribute__(( __vector_size__(";
851 OS << utostr(8*(quad ? 2 : 1)) << ") )) ";
855 OS << TypeString('s', TDTypeVec[i]);
856 OS << " " << TypeString('d', TDTypeVec[i]) << ";\n";
859 OS << "typedef __attribute__(( __vector_size__(8) )) "
860 "double float64x1_t;\n";
861 OS << "typedef __attribute__(( __vector_size__(16) )) "
862 "double float64x2_t;\n";
865 // Emit struct typedefs.
866 for (unsigned vi = 2; vi != 5; ++vi) {
867 for (unsigned i = 0, e = TDTypeVec.size(); i != e; ++i) {
868 std::string ts = TypeString('d', TDTypeVec[i]);
869 std::string vs = TypeString('0' + vi, TDTypeVec[i]);
870 OS << "typedef struct " << vs << " {\n";
871 OS << " " << ts << " val";
872 OS << "[" << utostr(vi) << "]";
878 OS << "#define __ai static __attribute__((__always_inline__))\n\n";
880 std::vector<Record*> RV = Records.getAllDerivedDefinitions("Inst");
882 // Unique the return+pattern types, and assign them.
883 for (unsigned i = 0, e = RV.size(); i != e; ++i) {
885 std::string name = LowercaseString(R->getName());
886 std::string Proto = R->getValueAsString("Prototype");
887 std::string Types = R->getValueAsString("Types");
889 SmallVector<StringRef, 16> TypeVec;
890 ParseTypes(R, Types, TypeVec);
892 OpKind k = OpMap[R->getValueAsDef("Operand")->getName()];
894 bool define = Proto.find('i') != std::string::npos;
896 for (unsigned ti = 0, te = TypeVec.size(); ti != te; ++ti) {
897 assert(!Proto.empty() && "");
899 // static always inline + return type
903 OS << "__ai " << TypeString(Proto[0], TypeVec[ti]);
905 // Function name with type suffix
906 OS << " " << MangleName(name, TypeVec[ti], ClassS);
908 // Function arguments
909 OS << GenArgs(Proto, TypeVec[ti]);
918 OS << GenOpString(k, Proto, TypeVec[ti]);
920 if (R->getSuperClasses().size() < 2)
921 throw TGError(R->getLoc(), "Builtin has no class kind");
923 ClassKind ck = ClassMap[R->getSuperClasses()[1]];
926 throw TGError(R->getLoc(), "Builtin has no class kind");
927 OS << GenBuiltin(name, Proto, TypeVec[ti], ck);
935 OS << "#undef __ai\n\n";
936 OS << "#endif /* __ARM_NEON_H */\n";
939 static unsigned RangeFromType(StringRef typestr) {
940 // base type to get the type string for.
941 bool quad = false, dummy = false;
942 char type = ClassifyType(typestr, quad, dummy, dummy);
946 return (8 << (int)quad) - 1;
949 return (4 << (int)quad) - 1;
952 return (2 << (int)quad) - 1;
954 return (1 << (int)quad) - 1;
956 throw "unhandled type!";
959 assert(0 && "unreachable");
963 /// runHeader - Emit a file with sections defining:
964 /// 1. the NEON section of BuiltinsARM.def.
965 /// 2. the SemaChecking code for the type overload checking.
966 /// 3. the SemaChecking code for validation of intrinsic immedate arguments.
967 void NeonEmitter::runHeader(raw_ostream &OS) {
968 std::vector<Record*> RV = Records.getAllDerivedDefinitions("Inst");
970 StringMap<OpKind> EmittedMap;
972 // Generate BuiltinsARM.def for NEON
973 OS << "#ifdef GET_NEON_BUILTINS\n";
974 for (unsigned i = 0, e = RV.size(); i != e; ++i) {
976 OpKind k = OpMap[R->getValueAsDef("Operand")->getName()];
980 std::string Proto = R->getValueAsString("Prototype");
982 // Functions with 'a' (the splat code) in the type prototype should not get
983 // their own builtin as they use the non-splat variant.
984 if (Proto.find('a') != std::string::npos)
987 std::string Types = R->getValueAsString("Types");
988 SmallVector<StringRef, 16> TypeVec;
989 ParseTypes(R, Types, TypeVec);
991 if (R->getSuperClasses().size() < 2)
992 throw TGError(R->getLoc(), "Builtin has no class kind");
994 std::string name = LowercaseString(R->getName());
995 ClassKind ck = ClassMap[R->getSuperClasses()[1]];
997 for (unsigned ti = 0, te = TypeVec.size(); ti != te; ++ti) {
998 // Generate the BuiltinsARM.def declaration for this builtin, ensuring
999 // that each unique BUILTIN() macro appears only once in the output
1001 std::string bd = GenBuiltinDef(name, Proto, TypeVec[ti], ck);
1002 if (EmittedMap.count(bd))
1005 EmittedMap[bd] = OpNone;
1011 // Generate the overloaded type checking code for SemaChecking.cpp
1012 OS << "#ifdef GET_NEON_OVERLOAD_CHECK\n";
1013 for (unsigned i = 0, e = RV.size(); i != e; ++i) {
1015 OpKind k = OpMap[R->getValueAsDef("Operand")->getName()];
1019 std::string Proto = R->getValueAsString("Prototype");
1020 std::string Types = R->getValueAsString("Types");
1021 std::string name = LowercaseString(R->getName());
1023 // Functions with 'a' (the splat code) in the type prototype should not get
1024 // their own builtin as they use the non-splat variant.
1025 if (Proto.find('a') != std::string::npos)
1028 // Functions which have a scalar argument cannot be overloaded, no need to
1029 // check them if we are emitting the type checking code.
1030 if (Proto.find('s') != std::string::npos)
1033 SmallVector<StringRef, 16> TypeVec;
1034 ParseTypes(R, Types, TypeVec);
1036 if (R->getSuperClasses().size() < 2)
1037 throw TGError(R->getLoc(), "Builtin has no class kind");
1039 int si = -1, qi = -1;
1040 unsigned mask = 0, qmask = 0;
1041 for (unsigned ti = 0, te = TypeVec.size(); ti != te; ++ti) {
1042 // Generate the switch case(s) for this builtin for the type validation.
1043 bool quad = false, poly = false, usgn = false;
1044 (void) ClassifyType(TypeVec[ti], quad, poly, usgn);
1048 qmask |= 1 << GetNeonEnum(Proto, TypeVec[ti]);
1051 mask |= 1 << GetNeonEnum(Proto, TypeVec[ti]);
1055 OS << "case ARM::BI__builtin_neon_"
1056 << MangleName(name, TypeVec[si], ClassB)
1057 << ": mask = " << "0x" << utohexstr(mask) << "; break;\n";
1059 OS << "case ARM::BI__builtin_neon_"
1060 << MangleName(name, TypeVec[qi], ClassB)
1061 << ": mask = " << "0x" << utohexstr(qmask) << "; break;\n";
1065 // Generate the intrinsic range checking code for shift/lane immediates.
1066 OS << "#ifdef GET_NEON_IMMEDIATE_CHECK\n";
1067 for (unsigned i = 0, e = RV.size(); i != e; ++i) {
1070 OpKind k = OpMap[R->getValueAsDef("Operand")->getName()];
1074 std::string name = LowercaseString(R->getName());
1075 std::string Proto = R->getValueAsString("Prototype");
1076 std::string Types = R->getValueAsString("Types");
1078 // Functions with 'a' (the splat code) in the type prototype should not get
1079 // their own builtin as they use the non-splat variant.
1080 if (Proto.find('a') != std::string::npos)
1083 // Functions which do not have an immediate do not need to have range
1084 // checking code emitted.
1085 if (Proto.find('i') == std::string::npos)
1088 SmallVector<StringRef, 16> TypeVec;
1089 ParseTypes(R, Types, TypeVec);
1091 if (R->getSuperClasses().size() < 2)
1092 throw TGError(R->getLoc(), "Builtin has no class kind");
1094 ClassKind ck = ClassMap[R->getSuperClasses()[1]];
1096 for (unsigned ti = 0, te = TypeVec.size(); ti != te; ++ti) {
1097 std::string namestr, shiftstr, rangestr;
1099 // Builtins which are overloaded by type will need to have their upper
1100 // bound computed at Sema time based on the type constant.
1101 if (Proto.find('s') == std::string::npos) {
1103 if (R->getValueAsBit("isShift")) {
1104 shiftstr = ", true";
1106 // Right shifts have an 'r' in the name, left shifts do not.
1107 if (name.find('r') != std::string::npos)
1108 rangestr = "l = 1; ";
1110 rangestr += "u = RFT(TV" + shiftstr + ")";
1112 rangestr = "u = " + utostr(RangeFromType(TypeVec[ti]));
1114 // Make sure cases appear only once by uniquing them in a string map.
1115 namestr = MangleName(name, TypeVec[ti], ck);
1116 if (EmittedMap.count(namestr))
1118 EmittedMap[namestr] = OpNone;
1120 // Calculate the index of the immediate that should be range checked.
1121 unsigned immidx = 0;
1123 // Builtins that return a struct of multiple vectors have an extra
1124 // leading arg for the struct return.
1125 if (Proto[0] == '2' || Proto[0] == '3' || Proto[0] == '4')
1128 // Add one to the index for each argument until we reach the immediate
1129 // to be checked. Structs of vectors are passed as multiple arguments.
1130 for (unsigned ii = 1, ie = Proto.size(); ii != ie; ++ii) {
1131 switch (Proto[ii]) {
1132 default: immidx += 1; break;
1133 case '2': immidx += 2; break;
1134 case '3': immidx += 3; break;
1135 case '4': immidx += 4; break;
1136 case 'i': ie = ii + 1; break;
1139 OS << "case ARM::BI__builtin_neon_" << MangleName(name, TypeVec[ti], ck)
1140 << ": i = " << immidx << "; " << rangestr << "; break;\n";