summaryrefslogtreecommitdiff
path: root/include/clang/Basic
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-12-30 11:49:41 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-12-30 11:49:41 +0000
commit45b533945f0851ec234ca846e1af5ee1e4df0b6e (patch)
tree0a5b74c0b9ca73aded34df95c91fcaf3815230d8 /include/clang/Basic
parent7e86edd64bfae4e324224452e4ea879b3371a4bd (diff)
Notes
Diffstat (limited to 'include/clang/Basic')
-rw-r--r--include/clang/Basic/Attr.td204
-rw-r--r--include/clang/Basic/AttrDocs.td278
-rw-r--r--include/clang/Basic/Attributes.h4
-rw-r--r--include/clang/Basic/Builtins.def48
-rw-r--r--include/clang/Basic/Builtins.h128
-rw-r--r--include/clang/Basic/BuiltinsAArch64.def1
-rw-r--r--include/clang/Basic/BuiltinsARM.def12
-rw-r--r--include/clang/Basic/BuiltinsNVPTX.def5
-rw-r--r--include/clang/Basic/BuiltinsPPC.def11
-rw-r--r--include/clang/Basic/BuiltinsWebAssembly.def24
-rw-r--r--include/clang/Basic/BuiltinsX86.def2602
-rw-r--r--include/clang/Basic/DeclNodes.td1
-rw-r--r--include/clang/Basic/Diagnostic.h20
-rw-r--r--include/clang/Basic/DiagnosticCommonKinds.td10
-rw-r--r--include/clang/Basic/DiagnosticDriverKinds.td28
-rw-r--r--include/clang/Basic/DiagnosticFrontendKinds.td35
-rw-r--r--include/clang/Basic/DiagnosticGroups.td83
-rw-r--r--include/clang/Basic/DiagnosticLexKinds.td78
-rw-r--r--include/clang/Basic/DiagnosticParseKinds.td119
-rw-r--r--include/clang/Basic/DiagnosticSemaKinds.td707
-rw-r--r--include/clang/Basic/DiagnosticSerializationKinds.td25
-rw-r--r--include/clang/Basic/FileManager.h18
-rw-r--r--include/clang/Basic/IdentifierTable.h23
-rw-r--r--include/clang/Basic/LangOptions.def8
-rw-r--r--include/clang/Basic/Module.h20
-rw-r--r--include/clang/Basic/ObjCRuntime.h22
-rw-r--r--include/clang/Basic/OpenCLExtensions.def3
-rw-r--r--include/clang/Basic/OpenMPKinds.def148
-rw-r--r--include/clang/Basic/OpenMPKinds.h44
-rw-r--r--include/clang/Basic/OperatorKinds.def1
-rw-r--r--include/clang/Basic/PartialDiagnostic.h2
-rw-r--r--include/clang/Basic/Sanitizers.def4
-rw-r--r--include/clang/Basic/SourceLocation.h3
-rw-r--r--include/clang/Basic/SourceManager.h51
-rw-r--r--include/clang/Basic/Specifiers.h21
-rw-r--r--include/clang/Basic/StmtNodes.td15
-rw-r--r--include/clang/Basic/TargetBuiltins.h11
-rw-r--r--include/clang/Basic/TargetCXXABI.h67
-rw-r--r--include/clang/Basic/TargetInfo.h141
-rw-r--r--include/clang/Basic/TokenKinds.def15
-rw-r--r--include/clang/Basic/VirtualFileSystem.h76
-rw-r--r--include/clang/Basic/arm_neon.td77
42 files changed, 3482 insertions, 1711 deletions
diff --git a/include/clang/Basic/Attr.td b/include/clang/Basic/Attr.td
index 6187bcb2c4bfe..d5ba722616444 100644
--- a/include/clang/Basic/Attr.td
+++ b/include/clang/Basic/Attr.td
@@ -113,7 +113,7 @@ def GlobalVar : SubsetSubject<Var,
// the case of a SubsetSubject, there's no way to express it without this hack.
def DeclBase : AttrSubject;
def FunctionLike : SubsetSubject<DeclBase,
- [{S->getFunctionType(false) != NULL}]>;
+ [{S->getFunctionType(false) != nullptr}]>;
def OpenCLKernelFunction : SubsetSubject<Function, [{
S->hasAttr<OpenCLKernelAttr>()
@@ -123,15 +123,19 @@ def OpenCLKernelFunction : SubsetSubject<Function, [{
// never be specified in a Subjects list along with FunctionLike (due to the
// inclusive nature of subject testing).
def HasFunctionProto : SubsetSubject<DeclBase,
- [{(S->getFunctionType(true) != NULL &&
+ [{(S->getFunctionType(true) != nullptr &&
isa<FunctionProtoType>(S->getFunctionType())) ||
isa<ObjCMethodDecl>(S) ||
isa<BlockDecl>(S)}]>;
// A single argument to an attribute
-class Argument<string name, bit optional> {
+class Argument<string name, bit optional, bit fake = 0> {
string Name = name;
bit Optional = optional;
+
+ /// A fake argument is used to store and serialize additional information
+ /// in an attribute without actually changing its parsing or pretty-printing.
+ bit Fake = fake;
}
class BoolArgument<string name, bit opt = 0> : Argument<name, opt>;
@@ -167,7 +171,8 @@ class DefaultIntArgument<string name, int default> : IntArgument<name, 1> {
// This argument is more complex, it includes the enumerator type name,
// a list of strings to accept, and a list of enumerators to map them to.
class EnumArgument<string name, string type, list<string> values,
- list<string> enums, bit opt = 0> : Argument<name, opt> {
+ list<string> enums, bit opt = 0, bit fake = 0>
+ : Argument<name, opt, fake> {
string Type = type;
list<string> Values = values;
list<string> Enums = enums;
@@ -241,14 +246,18 @@ def COnly : LangOpt<"CPlusPlus", 1>;
class TargetArch<list<string> arches> {
list<string> Arches = arches;
list<string> OSes;
+ list<string> CXXABIs;
}
def TargetARM : TargetArch<["arm", "thumb"]>;
+def TargetMips : TargetArch<["mips", "mipsel"]>;
def TargetMSP430 : TargetArch<["msp430"]>;
def TargetX86 : TargetArch<["x86"]>;
def TargetWindows : TargetArch<["x86", "x86_64", "arm", "thumb"]> {
let OSes = ["Win32"];
}
-def TargetMips : TargetArch<["mips", "mipsel"]>;
+def TargetMicrosoftCXXABI : TargetArch<["x86", "x86_64", "arm", "thumb"]> {
+ let CXXABIs = ["Microsoft"];
+}
class Attr {
// The various ways in which an attribute can be spelled in source
@@ -286,6 +295,8 @@ class Attr {
// attribute to be applicable. If empty, no language options are required.
list<LangOpt> LangOpts = [];
// Any additional text that should be included verbatim in the class.
+ // Note: Any additional data members will leak and should be constructed
+ // externally on the ASTContext.
code AdditionalMembers = [{}];
// Any documentation that should be associated with the attribute. Since an
// attribute may be documented under multiple categories, more than one
@@ -415,8 +426,8 @@ def Annotate : InheritableParamAttr {
}
def ARMInterrupt : InheritableAttr, TargetSpecificAttr<TargetARM> {
- // NOTE: If you add any additional spellings, MSP430Interrupt's spellings
- // must match.
+ // NOTE: If you add any additional spellings, MSP430Interrupt's and
+ // MipsInterrupt's spellings must match.
let Spellings = [GNU<"interrupt">];
let Args = [EnumArgument<"Interrupt", "InterruptType",
["IRQ", "FIQ", "SWI", "ABORT", "UNDEF", ""],
@@ -445,8 +456,12 @@ def Availability : InheritableAttr {
.Case("android", "Android")
.Case("ios", "iOS")
.Case("macosx", "OS X")
+ .Case("tvos", "tvOS")
+ .Case("watchos", "watchOS")
.Case("ios_app_extension", "iOS (App Extension)")
.Case("macosx_app_extension", "OS X (App Extension)")
+ .Case("tvos_app_extension", "tvOS (App Extension)")
+ .Case("watchos_app_extension", "watchOS (App Extension)")
.Default(llvm::StringRef());
} }];
let HasCustomParsing = 1;
@@ -553,6 +568,11 @@ def CUDAConstant : InheritableAttr {
let Documentation = [Undocumented];
}
+def CUDACudartBuiltin : IgnoredAttr {
+ let Spellings = [GNU<"cudart_builtin">];
+ let LangOpts = [CUDA];
+}
+
def CUDADevice : InheritableAttr {
let Spellings = [GNU<"device">];
let Subjects = SubjectList<[Function, Var]>;
@@ -560,6 +580,21 @@ def CUDADevice : InheritableAttr {
let Documentation = [Undocumented];
}
+def CUDADeviceBuiltin : IgnoredAttr {
+ let Spellings = [GNU<"device_builtin">];
+ let LangOpts = [CUDA];
+}
+
+def CUDADeviceBuiltinSurfaceType : IgnoredAttr {
+ let Spellings = [GNU<"device_builtin_surface_type">];
+ let LangOpts = [CUDA];
+}
+
+def CUDADeviceBuiltinTextureType : IgnoredAttr {
+ let Spellings = [GNU<"device_builtin_texture_type">];
+ let LangOpts = [CUDA];
+}
+
def CUDAGlobal : InheritableAttr {
let Spellings = [GNU<"global">];
let Subjects = SubjectList<[Function]>;
@@ -721,18 +756,6 @@ def FlagEnum : InheritableAttr {
let Subjects = SubjectList<[Enum]>;
let Documentation = [FlagEnumDocs];
let LangOpts = [COnly];
- let AdditionalMembers = [{
-private:
- llvm::APInt FlagBits;
-public:
- llvm::APInt &getFlagBits() {
- return FlagBits;
- }
-
- const llvm::APInt &getFlagBits() const {
- return FlagBits;
- }
-}];
}
def Flatten : InheritableAttr {
@@ -746,7 +769,7 @@ def Format : InheritableAttr {
let Args = [IdentifierArgument<"Type">, IntArgument<"FormatIdx">,
IntArgument<"FirstArg">];
let Subjects = SubjectList<[ObjCMethod, Block, HasFunctionProto], WarnDiag,
- "ExpectedFunction">;
+ "ExpectedFunctionWithProtoType">;
let Documentation = [FormatDocs];
}
@@ -754,7 +777,7 @@ def FormatArg : InheritableAttr {
let Spellings = [GCC<"format_arg">];
let Args = [IntArgument<"FormatIdx">];
let Subjects = SubjectList<[ObjCMethod, HasFunctionProto], WarnDiag,
- "ExpectedFunction">;
+ "ExpectedFunctionWithProtoType">;
let Documentation = [Undocumented];
}
@@ -822,8 +845,8 @@ def MSABI : InheritableAttr {
}
def MSP430Interrupt : InheritableAttr, TargetSpecificAttr<TargetMSP430> {
- // NOTE: If you add any additional spellings, ARMInterrupt's spellings must
- // match.
+ // NOTE: If you add any additional spellings, ARMInterrupt's and
+ // MipsInterrupt's spellings must match.
let Spellings = [GNU<"interrupt">];
let Args = [UnsignedArgument<"Number">];
let ParseKind = "Interrupt";
@@ -837,6 +860,22 @@ def Mips16 : InheritableAttr, TargetSpecificAttr<TargetMips> {
let Documentation = [Undocumented];
}
+def MipsInterrupt : InheritableAttr, TargetSpecificAttr<TargetMips> {
+ // NOTE: If you add any additional spellings, ARMInterrupt's and
+ // MSP430Interrupt's spellings must match.
+ let Spellings = [GNU<"interrupt">];
+ let Subjects = SubjectList<[Function]>;
+ let Args = [EnumArgument<"Interrupt", "InterruptType",
+ ["vector=sw0", "vector=sw1", "vector=hw0",
+ "vector=hw1", "vector=hw2", "vector=hw3",
+ "vector=hw4", "vector=hw5", "eic", ""],
+ ["sw0", "sw1", "hw0", "hw1", "hw2", "hw3",
+ "hw4", "hw5", "eic", "eic"]
+ >];
+ let ParseKind = "Interrupt";
+ let Documentation = [MipsInterruptDocs];
+}
+
def Mode : Attr {
let Spellings = [GCC<"mode">];
let Args = [IdentifierArgument<"Mode">];
@@ -867,6 +906,19 @@ def ReturnsTwice : InheritableAttr {
let Documentation = [Undocumented];
}
+def DisableTailCalls : InheritableAttr {
+ let Spellings = [GNU<"disable_tail_calls">,
+ CXX11<"clang", "disable_tail_calls">];
+ let Subjects = SubjectList<[Function, ObjCMethod]>;
+ let Documentation = [DisableTailCallsDocs];
+}
+
+def NoAlias : InheritableAttr {
+ let Spellings = [Declspec<"noalias">];
+ let Subjects = SubjectList<[Function]>;
+ let Documentation = [NoAliasDocs];
+}
+
def NoCommon : InheritableAttr {
let Spellings = [GCC<"nocommon">];
let Subjects = SubjectList<[Var]>;
@@ -960,6 +1012,15 @@ def ReturnsNonNull : InheritableAttr {
let Documentation = [ReturnsNonNullDocs];
}
+// pass_object_size(N) indicates that the parameter should have
+// __builtin_object_size with Type=N evaluated on the parameter at the callsite.
+def PassObjectSize : InheritableParamAttr {
+ let Spellings = [GNU<"pass_object_size">];
+ let Args = [IntArgument<"Type">];
+ let Subjects = SubjectList<[ParmVar]>;
+ let Documentation = [PassObjectSizeDocs];
+}
+
// Nullability type attributes.
def TypeNonNull : TypeAttr {
let Spellings = [Keyword<"_Nonnull">];
@@ -1000,11 +1061,22 @@ def NoInstrumentFunction : InheritableAttr {
let Documentation = [Undocumented];
}
+def NotTailCalled : InheritableAttr {
+ let Spellings = [GNU<"not_tail_called">, CXX11<"clang", "not_tail_called">];
+ let Subjects = SubjectList<[Function]>;
+ let Documentation = [NotTailCalledDocs];
+}
+
def NoThrow : InheritableAttr {
let Spellings = [GCC<"nothrow">, Declspec<"nothrow">];
let Documentation = [Undocumented];
}
+def NvWeak : IgnoredAttr {
+ let Spellings = [GNU<"nv_weak">];
+ let LangOpts = [CUDA];
+}
+
def ObjCBridge : InheritableAttr {
let Spellings = [GNU<"objc_bridge">];
let Subjects = SubjectList<[Record, TypedefName], ErrorDiag,
@@ -1024,8 +1096,8 @@ def ObjCBridgeRelated : InheritableAttr {
let Spellings = [GNU<"objc_bridge_related">];
let Subjects = SubjectList<[Record], ErrorDiag>;
let Args = [IdentifierArgument<"RelatedClass">,
- IdentifierArgument<"ClassMethod">,
- IdentifierArgument<"InstanceMethod">];
+ IdentifierArgument<"ClassMethod", 1>,
+ IdentifierArgument<"InstanceMethod", 1>];
let HasCustomParsing = 1;
let Documentation = [Undocumented];
}
@@ -1169,7 +1241,8 @@ def Ownership : InheritableAttr {
}
}];
let Args = [IdentifierArgument<"Module">, VariadicUnsignedArgument<"Args">];
- let Subjects = SubjectList<[HasFunctionProto], WarnDiag, "ExpectedFunction">;
+ let Subjects = SubjectList<[HasFunctionProto], WarnDiag,
+ "ExpectedFunctionWithProtoType">;
let Documentation = [Undocumented];
}
@@ -1280,9 +1353,41 @@ def Pascal : InheritableAttr {
def Target : InheritableAttr {
let Spellings = [GCC<"target">];
- let Args = [StringArgument<"features">];
+ let Args = [StringArgument<"featuresStr">];
let Subjects = SubjectList<[Function], ErrorDiag>;
let Documentation = [TargetDocs];
+ let AdditionalMembers = [{
+ typedef std::pair<std::vector<std::string>, StringRef> ParsedTargetAttr;
+ ParsedTargetAttr parse() const {
+ ParsedTargetAttr Ret;
+ SmallVector<StringRef, 1> AttrFeatures;
+ getFeaturesStr().split(AttrFeatures, ",");
+
+ // Grab the various features and prepend a "+" to turn on the feature to
+ // the backend and add them to our existing set of features.
+ for (auto &Feature : AttrFeatures) {
+ // Go ahead and trim whitespace rather than either erroring or
+ // accepting it weirdly.
+ Feature = Feature.trim();
+
+ // We don't support cpu tuning this way currently.
+ // TODO: Support the fpmath option. It will require checking
+ // overall feature validity for the function with the rest of the
+ // attributes on the function.
+ if (Feature.startswith("fpmath=") || Feature.startswith("tune="))
+ continue;
+
+ // While we're here iterating check for a different target cpu.
+ if (Feature.startswith("arch="))
+ Ret.second = Feature.split("=").second.trim();
+ else if (Feature.startswith("no-"))
+ Ret.first.push_back("-" + Feature.split("-").second.str());
+ else
+ Ret.first.push_back("+" + Feature.str());
+ }
+ return Ret;
+ }
+ }];
}
def TransparentUnion : InheritableAttr {
@@ -1293,7 +1398,15 @@ def TransparentUnion : InheritableAttr {
def Unavailable : InheritableAttr {
let Spellings = [GNU<"unavailable">];
- let Args = [StringArgument<"Message", 1>];
+ let Args = [StringArgument<"Message", 1>,
+ EnumArgument<"ImplicitReason", "ImplicitReason",
+ ["", "", "", ""],
+ ["IR_None",
+ "IR_ARCForbiddenType",
+ "IR_ForbiddenWeak",
+ "IR_ARCForbiddenConversion",
+ "IR_ARCInitReturnsUnrelated",
+ "IR_ARCFieldWithOwnership"], 1, /*fake*/ 1>];
let Documentation = [Undocumented];
}
@@ -1486,8 +1599,8 @@ def Capability : InheritableAttr {
let Spellings = [GNU<"capability">, CXX11<"clang", "capability">,
GNU<"shared_capability">,
CXX11<"clang", "shared_capability">];
- let Subjects = SubjectList<[Struct, TypedefName], ErrorDiag,
- "ExpectedStructOrTypedef">;
+ let Subjects = SubjectList<[Record, TypedefName], ErrorDiag,
+ "ExpectedStructOrUnionOrTypedef">;
let Args = [StringArgument<"Name">];
let Accessors = [Accessor<"isShared",
[GNU<"shared_capability">,
@@ -1814,7 +1927,7 @@ def TypeTagForDatatype : InheritableAttr {
// Microsoft-related attributes
-def MSNoVTable : InheritableAttr {
+def MSNoVTable : InheritableAttr, TargetSpecificAttr<TargetMicrosoftCXXABI> {
let Spellings = [Declspec<"novtable">];
let Subjects = SubjectList<[CXXRecord]>;
let Documentation = [MSNoVTableDocs];
@@ -1970,8 +2083,8 @@ def LoopHint : Attr {
["Vectorize", "VectorizeWidth", "Interleave", "InterleaveCount",
"Unroll", "UnrollCount"]>,
EnumArgument<"State", "LoopHintState",
- ["default", "enable", "disable", "assume_safety"],
- ["Default", "Enable", "Disable", "AssumeSafety"]>,
+ ["enable", "disable", "numeric", "assume_safety", "full"],
+ ["Enable", "Disable", "Numeric", "AssumeSafety", "Full"]>,
ExprArgument<"Value">];
let AdditionalMembers = [{
@@ -1991,17 +2104,15 @@ def LoopHint : Attr {
unsigned SpellingIndex = getSpellingListIndex();
// For "#pragma unroll" and "#pragma nounroll" the string "unroll" or
// "nounroll" is already emitted as the pragma name.
- if (SpellingIndex == Pragma_nounroll) {
- OS << "\n";
+ if (SpellingIndex == Pragma_nounroll)
return;
- }
else if (SpellingIndex == Pragma_unroll) {
- OS << getValueString(Policy) << "\n";
+ OS << getValueString(Policy);
return;
}
assert(SpellingIndex == Pragma_clang_loop && "Unexpected spelling");
- OS << getOptionName(option) << getValueString(Policy) << "\n";
+ OS << getOptionName(option) << getValueString(Policy);
}
// Return a string containing the loop hint argument including the
@@ -2010,13 +2121,12 @@ def LoopHint : Attr {
std::string ValueName;
llvm::raw_string_ostream OS(ValueName);
OS << "(";
- if (option == VectorizeWidth || option == InterleaveCount ||
- option == UnrollCount)
+ if (state == Numeric)
value->printPretty(OS, nullptr, Policy);
- else if (state == Default)
- return "";
else if (state == Enable)
- OS << (option == Unroll ? "full" : "enable");
+ OS << "enable";
+ else if (state == Full)
+ OS << "full";
else if (state == AssumeSafety)
OS << "assume_safety";
else
@@ -2031,7 +2141,7 @@ def LoopHint : Attr {
if (SpellingIndex == Pragma_nounroll)
return "#pragma nounroll";
else if (SpellingIndex == Pragma_unroll)
- return "#pragma unroll" + getValueString(Policy);
+ return "#pragma unroll" + (option == UnrollCount ? getValueString(Policy) : "");
assert(SpellingIndex == Pragma_clang_loop && "Unexpected spelling");
return getOptionName(option) + getValueString(Policy);
@@ -2054,3 +2164,9 @@ def OMPThreadPrivateDecl : InheritableAttr {
let SemaHandler = 0;
let Documentation = [Undocumented];
}
+
+def InternalLinkage : InheritableAttr {
+ let Spellings = [GNU<"internal_linkage">, CXX11<"clang", "internal_linkage">];
+ let Subjects = SubjectList<[Var, Function, CXXRecord]>;
+ let Documentation = [InternalLinkageDocs];
+}
diff --git a/include/clang/Basic/AttrDocs.td b/include/clang/Basic/AttrDocs.td
index 48660166f6c6b..2567d55eb7e0d 100644
--- a/include/clang/Basic/AttrDocs.td
+++ b/include/clang/Basic/AttrDocs.td
@@ -181,9 +181,9 @@ to enforce the provided alignment assumption.
def EnableIfDocs : Documentation {
let Category = DocCatFunction;
let Content = [{
-.. Note:: Some features of this attribute are experimental. The meaning of
- multiple enable_if attributes on a single declaration is subject to change in
- a future version of clang. Also, the ABI is not standardized and the name
+.. Note:: Some features of this attribute are experimental. The meaning of
+ multiple enable_if attributes on a single declaration is subject to change in
+ a future version of clang. Also, the ABI is not standardized and the name
mangling may change in future versions. To avoid that, use asm labels.
The ``enable_if`` attribute can be placed on function declarations to control
@@ -263,6 +263,103 @@ Query for this feature with ``__has_attribute(enable_if)``.
}];
}
+def PassObjectSizeDocs : Documentation {
+ let Category = DocCatVariable; // Technically it's a parameter doc, but eh.
+ let Content = [{
+.. Note:: The mangling of functions with parameters that are annotated with
+ ``pass_object_size`` is subject to change. You can get around this by
+ using ``__asm__("foo")`` to explicitly name your functions, thus preserving
+ your ABI; also, non-overloadable C functions with ``pass_object_size`` are
+ not mangled.
+
+The ``pass_object_size(Type)`` attribute can be placed on function parameters to
+instruct clang to call ``__builtin_object_size(param, Type)`` at each callsite
+of said function, and implicitly pass the result of this call in as an invisible
+argument of type ``size_t`` directly after the parameter annotated with
+``pass_object_size``. Clang will also replace any calls to
+``__builtin_object_size(param, Type)`` in the function by said implicit
+parameter.
+
+Example usage:
+
+.. code-block:: c
+
+ int bzero1(char *const p __attribute__((pass_object_size(0))))
+ __attribute__((noinline)) {
+ int i = 0;
+ for (/**/; i < (int)__builtin_object_size(p, 0); ++i) {
+ p[i] = 0;
+ }
+ return i;
+ }
+
+ int main() {
+ char chars[100];
+ int n = bzero1(&chars[0]);
+ assert(n == sizeof(chars));
+ return 0;
+ }
+
+If successfully evaluating ``__builtin_object_size(param, Type)`` at the
+callsite is not possible, then the "failed" value is passed in. So, using the
+definition of ``bzero1`` from above, the following code would exit cleanly:
+
+.. code-block:: c
+
+ int main2(int argc, char *argv[]) {
+ int n = bzero1(argv);
+ assert(n == -1);
+ return 0;
+ }
+
+``pass_object_size`` plays a part in overload resolution. If two overload
+candidates are otherwise equally good, then the overload with one or more
+parameters with ``pass_object_size`` is preferred. This implies that the choice
+between two identical overloads both with ``pass_object_size`` on one or more
+parameters will always be ambiguous; for this reason, having two such overloads
+is illegal. For example:
+
+.. code-block:: c++
+
+ #define PS(N) __attribute__((pass_object_size(N)))
+ // OK
+ void Foo(char *a, char *b); // Overload A
+ // OK -- overload A has no parameters with pass_object_size.
+ void Foo(char *a PS(0), char *b PS(0)); // Overload B
+ // Error -- Same signature (sans pass_object_size) as overload B, and both
+ // overloads have one or more parameters with the pass_object_size attribute.
+ void Foo(void *a PS(0), void *b);
+
+ // OK
+ void Bar(void *a PS(0)); // Overload C
+ // OK
+ void Bar(char *c PS(1)); // Overload D
+
+ void main() {
+ char known[10], *unknown;
+ Foo(unknown, unknown); // Calls overload B
+ Foo(known, unknown); // Calls overload B
+ Foo(unknown, known); // Calls overload B
+ Foo(known, known); // Calls overload B
+
+ Bar(known); // Calls overload D
+ Bar(unknown); // Calls overload D
+ }
+
+Currently, ``pass_object_size`` is a bit restricted in terms of its usage:
+
+* Only one use of ``pass_object_size`` is allowed per parameter.
+
+* It is an error to take the address of a function with ``pass_object_size`` on
+ any of its parameters. If you wish to do this, you can create an overload
+ without ``pass_object_size`` on any parameters.
+
+* It is an error to apply the ``pass_object_size`` attribute to parameters that
+ are not pointers. Additionally, any parameter that ``pass_object_size`` is
+ applied to must be marked ``const`` at its function's definition.
+ }];
+}
+
def OverloadableDocs : Documentation {
let Category = DocCatFunction;
let Content = [{
@@ -580,6 +677,14 @@ are:
Apple's Mac OS X operating system. The minimum deployment target is
specified by the ``-mmacosx-version-min=*version*`` command-line argument.
+``tvos``
+ Apple's tvOS operating system. The minimum deployment target is specified by
+ the ``-mtvos-version-min=*version*`` command-line argument.
+
+``watchos``
+ Apple's watchOS operating system. The minimum deployment target is specified by
+ the ``-mwatchos-version-min=*version*`` command-line argument.
+
A declaration can be used even when deploying back to a platform version prior
to when the declaration was introduced. When this happens, the declaration is
`weakly linked
@@ -706,6 +811,46 @@ The semantics are as follows:
}];
}
+def MipsInterruptDocs : Documentation {
+ let Category = DocCatFunction;
+ let Content = [{
+Clang supports the GNU style ``__attribute__((interrupt("ARGUMENT")))`` attribute on
+MIPS targets. This attribute may be attached to a function definition and instructs
+the backend to generate appropriate function entry/exit code so that it can be used
+directly as an interrupt service routine.
+
+By default, the compiler will produce a function prologue and epilogue suitable for
+an interrupt service routine that handles an External Interrupt Controller (eic)
+generated interrupt. This behaviour can be explicitly requested with the "eic"
+argument.
+
+Otherwise, for use with vectored interrupt mode, the argument passed should be
+of the form "vector=LEVEL" where LEVEL is one of the following values:
+"sw0", "sw1", "hw0", "hw1", "hw2", "hw3", "hw4", "hw5". The compiler will
+then set the interrupt mask to the corresponding level which will mask all
+interrupts up to and including the argument.
+
+The semantics are as follows:
+
+- The prologue is modified so that the Exception Program Counter (EPC) and
+ Status coprocessor registers are saved to the stack. The interrupt mask is
+ set so that the function can only be interrupted by a higher priority
+ interrupt. The epilogue will restore the previous values of EPC and Status.
+
+- The prologue and epilogue are modified to save and restore all non-kernel
+ registers as necessary.
+
+- The FPU is disabled in the prologue, as the floating pointer registers are not
+ spilled to the stack.
+
+- The function return sequence is changed to use an exception return instruction.
+
+- The parameter sets the interrupt mask for the function corresponding to the
+ interrupt level specified. If no mask is specified the interrupt mask
+ defaults to "eic".
+ }];
+}
+
def TargetDocs : Documentation {
let Category = DocCatFunction;
let Content = [{
@@ -1328,7 +1473,7 @@ def MSNoVTableDocs : Documentation {
let Content = [{
This attribute can be added to a class declaration or definition to signal to
the compiler that constructors and destructors will not reference the virtual
-function table.
+function table. It is only supported when using the Microsoft C++ ABI.
}];
}
@@ -1371,7 +1516,9 @@ Loop unrolling optimization hints can be specified with ``#pragma unroll`` and
do-while, or c++11 range-based for loop.
Specifying ``#pragma unroll`` without a parameter directs the loop unroller to
-attempt to fully unroll the loop if the trip count is known at compile time:
+attempt to fully unroll the loop if the trip count is known at compile time and
+attempt to partially unroll the loop if the trip count is not known at compile
+time:
.. code-block:: c++
@@ -1439,7 +1586,6 @@ More details can be found in the OpenCL C language Spec v2.0, Section 6.5.
def OpenCLAddressSpaceGenericDocs : Documentation {
let Category = DocOpenCLAddressSpaces;
- let Heading = "__generic(generic)";
let Content = [{
The generic address space attribute is only available with OpenCL v2.0 and later.
It can be used with pointer types. Variables in global and local scope and
@@ -1452,7 +1598,6 @@ spaces.
def OpenCLAddressSpaceConstantDocs : Documentation {
let Category = DocOpenCLAddressSpaces;
- let Heading = "__constant(constant)";
let Content = [{
The constant address space attribute signals that an object is located in
a constant (non-modifiable) memory region. It is available to all work items.
@@ -1464,7 +1609,6 @@ have an initializer.
def OpenCLAddressSpaceGlobalDocs : Documentation {
let Category = DocOpenCLAddressSpaces;
- let Heading = "__global(global)";
let Content = [{
The global address space attribute specifies that an object is allocated in
global memory, which is accessible by all work items. The content stored in this
@@ -1477,7 +1621,6 @@ scope) variables and static local variable as well.
def OpenCLAddressSpaceLocalDocs : Documentation {
let Category = DocOpenCLAddressSpaces;
- let Heading = "__local(local)";
let Content = [{
The local address space specifies that an object is allocated in the local (work
group) memory area, which is accessible to all work items in the same work
@@ -1490,7 +1633,6 @@ space are allowed. Local address space variables cannot have an initializer.
def OpenCLAddressSpacePrivateDocs : Documentation {
let Category = DocOpenCLAddressSpaces;
- let Heading = "__private(private)";
let Content = [{
The private address space specifies that an object is allocated in the private
(work item) memory. Other work items cannot access the same memory area and its
@@ -1534,7 +1676,6 @@ In Objective-C, there is an alternate spelling for the nullability qualifiers th
def TypeNonNullDocs : Documentation {
let Category = NullabilityDocs;
- let Heading = "_Nonnull";
let Content = [{
The ``_Nonnull`` nullability qualifier indicates that null is not a meaningful value for a value of the ``_Nonnull`` pointer type. For example, given a declaration such as:
@@ -1548,7 +1689,6 @@ a caller of ``fetch`` should not provide a null value, and the compiler will pro
def TypeNullableDocs : Documentation {
let Category = NullabilityDocs;
- let Heading = "_Nullable";
let Content = [{
The ``_Nullable`` nullability qualifier indicates that a value of the ``_Nullable`` pointer type can be null. For example, given:
@@ -1562,7 +1702,6 @@ a caller of ``fetch_or_zero`` can provide null.
def TypeNullUnspecifiedDocs : Documentation {
let Category = NullabilityDocs;
- let Heading = "_Null_unspecified";
let Content = [{
The ``_Null_unspecified`` nullability qualifier indicates that neither the ``_Nonnull`` nor ``_Nullable`` qualifiers make sense for a particular pointer type. It is used primarily to indicate that the role of null with specific pointers in a nullability-annotated header is unclear, e.g., due to overly-complex implementations or historical factors with a long-lived API.
}];
@@ -1570,7 +1709,6 @@ The ``_Null_unspecified`` nullability qualifier indicates that neither the ``_No
def NonNullDocs : Documentation {
let Category = NullabilityDocs;
- let Heading = "nonnull";
let Content = [{
The ``nonnull`` attribute indicates that some function parameters must not be null, and can be used in several different ways. It's original usage (`from GCC <https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#Common-Function-Attributes>`_) is as a function (or Objective-C method) attribute that specifies which parameters of the function are nonnull in a comma-separated list. For example:
@@ -1600,7 +1738,6 @@ Note that the ``nonnull`` attribute indicates that passing null to a non-null pa
def ReturnsNonNullDocs : Documentation {
let Category = NullabilityDocs;
- let Heading = "returns_nonnull";
let Content = [{
The ``returns_nonnull`` attribute indicates that a particular function (or Objective-C method) always returns a non-null pointer. For example, a particular system ``malloc`` might be defined to terminate a process when memory is not available rather than returning a null pointer:
@@ -1611,3 +1748,114 @@ The ``returns_nonnull`` attribute indicates that a particular function (or Objec
The ``returns_nonnull`` attribute implies that returning a null pointer is undefined behavior, which the optimizer may take advantage of. The ``_Nonnull`` type qualifier indicates that a pointer cannot be null in a more general manner (because it is part of the type system) and does not imply undefined behavior, making it more widely applicable
}];
}
+
+def NoAliasDocs : Documentation {
+ let Category = DocCatFunction;
+ let Content = [{
+The ``noalias`` attribute indicates that the only memory accesses inside
+function are loads and stores from objects pointed to by its pointer-typed
+arguments, with arbitrary offsets.
+ }];
+}
+
+def NotTailCalledDocs : Documentation {
+ let Category = DocCatFunction;
+ let Content = [{
+The ``not_tail_called`` attribute prevents tail-call optimization on statically bound calls. It has no effect on indirect calls. Virtual functions, objective-c methods, and functions marked as ``always_inline`` cannot be marked as ``not_tail_called``.
+
+For example, it prevents tail-call optimization in the following case:
+
+ .. code-block: c
+
+ int __attribute__((not_tail_called)) foo1(int);
+
+ int foo2(int a) {
+ return foo1(a); // No tail-call optimization on direct calls.
+ }
+
+However, it doesn't prevent tail-call optimization in this case:
+
+ .. code-block: c
+
+ int __attribute__((not_tail_called)) foo1(int);
+
+ int foo2(int a) {
+ int (*fn)(int) = &foo1;
+
+ // not_tail_called has no effect on an indirect call even if the call can be
+ // resolved at compile time.
+ return (*fn)(a);
+ }
+
+Marking virtual functions as ``not_tail_called`` is an error:
+
+ .. code-block: c++
+
+ class Base {
+ public:
+ // not_tail_called on a virtual function is an error.
+ [[clang::not_tail_called]] virtual int foo1();
+
+ virtual int foo2();
+
+ // Non-virtual functions can be marked ``not_tail_called``.
+ [[clang::not_tail_called]] int foo3();
+ };
+
+ class Derived1 : public Base {
+ public:
+ int foo1() override;
+
+ // not_tail_called on a virtual function is an error.
+ [[clang::not_tail_called]] int foo2() override;
+ };
+ }];
+}
+
+def InternalLinkageDocs : Documentation {
+ let Category = DocCatFunction;
+ let Content = [{
+The ``internal_linkage`` attribute changes the linkage type of the declaration to internal.
+This is similar to C-style ``static``, but can be used on classes and class methods. When applied to a class definition,
+this attribute affects all methods and static data members of that class.
+This can be used to contain the ABI of a C++ library by excluding unwanted class methods from the export tables.
+ }];
+}
+
+def DisableTailCallsDocs : Documentation {
+ let Category = DocCatFunction;
+ let Content = [{
+The ``disable_tail_calls`` attribute instructs the backend to not perform tail call optimization inside the marked function.
+
+For example:
+
+ .. code-block:: c
+
+ int callee(int);
+
+ int foo(int a) __attribute__((disable_tail_calls)) {
+ return callee(a); // This call is not tail-call optimized.
+ }
+
+Marking virtual functions as ``disable_tail_calls`` is legal.
+
+ .. code-block: c++
+
+ int callee(int);
+
+ class Base {
+ public:
+ [[clang::disable_tail_calls]] virtual int foo1() {
+ return callee(); // This call is not tail-call optimized.
+ }
+ };
+
+ class Derived1 : public Base {
+ public:
+ int foo1() override {
+ return callee(); // This call is tail-call optimized.
+ }
+ };
+
+ }];
+}
diff --git a/include/clang/Basic/Attributes.h b/include/clang/Basic/Attributes.h
index a64dd5666b73a..a2b86841cddf6 100644
--- a/include/clang/Basic/Attributes.h
+++ b/include/clang/Basic/Attributes.h
@@ -11,7 +11,7 @@
#define LLVM_CLANG_BASIC_ATTRIBUTES_H
#include "clang/Basic/LangOptions.h"
-#include "llvm/ADT/Triple.h"
+#include "clang/Basic/TargetInfo.h"
namespace clang {
@@ -31,7 +31,7 @@ enum class AttrSyntax {
/// \brief Return the version number associated with the attribute if we
/// recognize and implement the attribute specified by the given information.
int hasAttribute(AttrSyntax Syntax, const IdentifierInfo *Scope,
- const IdentifierInfo *Attr, const llvm::Triple &T,
+ const IdentifierInfo *Attr, const TargetInfo &Target,
const LangOptions &LangOpts);
} // end namespace clang
diff --git a/include/clang/Basic/Builtins.def b/include/clang/Basic/Builtins.def
index bf65b5fa2ea80..4f474ebe42ba5 100644
--- a/include/clang/Basic/Builtins.def
+++ b/include/clang/Basic/Builtins.def
@@ -357,25 +357,25 @@ BUILTIN(__builtin_ctanhf, "XfXf", "Fnc")
BUILTIN(__builtin_ctanhl, "XLdXLd", "Fnc")
// FP Comparisons.
-BUILTIN(__builtin_isgreater , "i.", "nc")
-BUILTIN(__builtin_isgreaterequal, "i.", "nc")
-BUILTIN(__builtin_isless , "i.", "nc")
-BUILTIN(__builtin_islessequal , "i.", "nc")
-BUILTIN(__builtin_islessgreater , "i.", "nc")
-BUILTIN(__builtin_isunordered , "i.", "nc")
+BUILTIN(__builtin_isgreater , "i.", "Fnc")
+BUILTIN(__builtin_isgreaterequal, "i.", "Fnc")
+BUILTIN(__builtin_isless , "i.", "Fnc")
+BUILTIN(__builtin_islessequal , "i.", "Fnc")
+BUILTIN(__builtin_islessgreater , "i.", "Fnc")
+BUILTIN(__builtin_isunordered , "i.", "Fnc")
// Unary FP classification
-BUILTIN(__builtin_fpclassify, "iiiii.", "nc")
-BUILTIN(__builtin_isfinite, "i.", "nc")
-BUILTIN(__builtin_isinf, "i.", "nc")
-BUILTIN(__builtin_isinf_sign, "i.", "nc")
-BUILTIN(__builtin_isnan, "i.", "nc")
-BUILTIN(__builtin_isnormal, "i.", "nc")
+BUILTIN(__builtin_fpclassify, "iiiii.", "Fnc")
+BUILTIN(__builtin_isfinite, "i.", "Fnc")
+BUILTIN(__builtin_isinf, "i.", "Fnc")
+BUILTIN(__builtin_isinf_sign, "i.", "Fnc")
+BUILTIN(__builtin_isnan, "i.", "Fnc")
+BUILTIN(__builtin_isnormal, "i.", "Fnc")
// FP signbit builtins
-BUILTIN(__builtin_signbit, "id", "nc")
-BUILTIN(__builtin_signbitf, "if", "nc")
-BUILTIN(__builtin_signbitl, "iLd", "nc")
+BUILTIN(__builtin_signbit, "i.", "Fnc")
+BUILTIN(__builtin_signbitf, "if", "Fnc")
+BUILTIN(__builtin_signbitl, "iLd", "Fnc")
// Builtins for arithmetic.
BUILTIN(__builtin_clzs , "iUs" , "nc")
@@ -388,9 +388,9 @@ BUILTIN(__builtin_ctz , "iUi" , "nc")
BUILTIN(__builtin_ctzl , "iULi" , "nc")
BUILTIN(__builtin_ctzll, "iULLi", "nc")
// TODO: int ctzimax(uintmax_t)
-BUILTIN(__builtin_ffs , "ii" , "nc")
-BUILTIN(__builtin_ffsl , "iLi" , "nc")
-BUILTIN(__builtin_ffsll, "iLLi", "nc")
+BUILTIN(__builtin_ffs , "ii" , "Fnc")
+BUILTIN(__builtin_ffsl , "iLi" , "Fnc")
+BUILTIN(__builtin_ffsll, "iLLi", "Fnc")
BUILTIN(__builtin_parity , "iUi" , "nc")
BUILTIN(__builtin_parityl , "iULi" , "nc")
BUILTIN(__builtin_parityll, "iULLi", "nc")
@@ -414,7 +414,7 @@ BUILTIN(__builtin_va_end, "vA", "n")
BUILTIN(__builtin_va_copy, "vAA", "n")
BUILTIN(__builtin_stdarg_start, "vA.", "n")
BUILTIN(__builtin_assume_aligned, "v*vC*z.", "nc")
-BUILTIN(__builtin_bcmp, "iv*v*z", "n")
+BUILTIN(__builtin_bcmp, "iv*v*z", "Fn")
BUILTIN(__builtin_bcopy, "vv*v*z", "n")
BUILTIN(__builtin_bzero, "vv*z", "nF")
BUILTIN(__builtin_fprintf, "iP*cC*.", "Fp:1:")
@@ -489,6 +489,7 @@ BUILTIN(__builtin___printf_chk, "iicC*.", "Fp:1:")
BUILTIN(__builtin___vfprintf_chk, "iP*icC*a", "FP:2:")
BUILTIN(__builtin___vprintf_chk, "iicC*a", "FP:1:")
+BUILTIN(__builtin_unpredictable, "LiLi" , "nc")
BUILTIN(__builtin_expect, "LiLiLi" , "nc")
BUILTIN(__builtin_prefetch, "vvC*.", "nc")
BUILTIN(__builtin_readcyclecounter, "ULLi", "n")
@@ -497,7 +498,7 @@ BUILTIN(__builtin_debugtrap, "v", "n")
BUILTIN(__builtin_unreachable, "v", "nr")
BUILTIN(__builtin_shufflevector, "v." , "nc")
BUILTIN(__builtin_convertvector, "v." , "nct")
-BUILTIN(__builtin_alloca, "v*z" , "n")
+BUILTIN(__builtin_alloca, "v*z" , "Fn")
BUILTIN(__builtin_call_with_static_chain, "v.", "nt")
// "Overloaded" Atomic operator builtins. These are overloaded to support data
@@ -1216,6 +1217,9 @@ BUILTIN(__builtin_subcl, "ULiULiCULiCULiCULi*", "n")
BUILTIN(__builtin_subcll, "ULLiULLiCULLiCULLiCULLi*", "n")
// Checked Arithmetic Builtins for Security.
+BUILTIN(__builtin_add_overflow, "v.", "nt")
+BUILTIN(__builtin_sub_overflow, "v.", "nt")
+BUILTIN(__builtin_mul_overflow, "v.", "nt")
BUILTIN(__builtin_uadd_overflow, "bUiCUiCUi*", "n")
BUILTIN(__builtin_uaddl_overflow, "bULiCULiCULi*", "n")
BUILTIN(__builtin_uaddll_overflow, "bULLiCULLiCULLi*", "n")
@@ -1244,6 +1248,10 @@ BUILTIN(__builtin_operator_delete, "vv*", "n")
BUILTIN(__builtin___get_unsafe_stack_start, "v*", "Fn")
BUILTIN(__builtin___get_unsafe_stack_ptr, "v*", "Fn")
+// Nontemporal loads/stores builtins
+BUILTIN(__builtin_nontemporal_store, "v.", "t")
+BUILTIN(__builtin_nontemporal_load, "v.", "t")
+
#undef BUILTIN
#undef LIBBUILTIN
#undef LANGBUILTIN
diff --git a/include/clang/Basic/Builtins.h b/include/clang/Basic/Builtins.h
index 27428ad81cb8b..41f19e7cbfe05 100644
--- a/include/clang/Basic/Builtins.h
+++ b/include/clang/Basic/Builtins.h
@@ -16,7 +16,7 @@
#ifndef LLVM_CLANG_BASIC_BUILTINS_H
#define LLVM_CLANG_BASIC_BUILTINS_H
-#include "clang/Basic/LLVM.h"
+#include "llvm/ADT/ArrayRef.h"
#include <cstring>
// VC++ defines 'alloca' as an object-like macro, which interferes with our
@@ -24,22 +24,22 @@
#undef alloca
namespace clang {
- class TargetInfo;
- class IdentifierTable;
- class ASTContext;
- class QualType;
- class LangOptions;
-
- enum LanguageID {
- GNU_LANG = 0x1, // builtin requires GNU mode.
- C_LANG = 0x2, // builtin for c only.
- CXX_LANG = 0x4, // builtin for cplusplus only.
- OBJC_LANG = 0x8, // builtin for objective-c and objective-c++
- MS_LANG = 0x10, // builtin requires MS mode.
- ALL_LANGUAGES = C_LANG | CXX_LANG | OBJC_LANG, // builtin for all languages.
- ALL_GNU_LANGUAGES = ALL_LANGUAGES | GNU_LANG, // builtin requires GNU mode.
- ALL_MS_LANGUAGES = ALL_LANGUAGES | MS_LANG // builtin requires MS mode.
- };
+class TargetInfo;
+class IdentifierTable;
+class ASTContext;
+class QualType;
+class LangOptions;
+
+enum LanguageID {
+ GNU_LANG = 0x1, // builtin requires GNU mode.
+ C_LANG = 0x2, // builtin for c only.
+ CXX_LANG = 0x4, // builtin for cplusplus only.
+ OBJC_LANG = 0x8, // builtin for objective-c and objective-c++
+ MS_LANG = 0x10, // builtin requires MS mode.
+ ALL_LANGUAGES = C_LANG | CXX_LANG | OBJC_LANG, // builtin for all languages.
+ ALL_GNU_LANGUAGES = ALL_LANGUAGES | GNU_LANG, // builtin requires GNU mode.
+ ALL_MS_LANGUAGES = ALL_LANGUAGES | MS_LANG // builtin requires MS mode.
+};
namespace Builtin {
enum ID {
@@ -51,112 +51,114 @@ enum ID {
struct Info {
const char *Name, *Type, *Attributes, *HeaderName;
- LanguageID builtin_lang;
-
- bool operator==(const Info &RHS) const {
- return !strcmp(Name, RHS.Name) &&
- !strcmp(Type, RHS.Type) &&
- !strcmp(Attributes, RHS.Attributes);
- }
- bool operator!=(const Info &RHS) const { return !(*this == RHS); }
+ LanguageID Langs;
+ const char *Features;
};
/// \brief Holds information about both target-independent and
/// target-specific builtins, allowing easy queries by clients.
+///
+/// Builtins from an optional auxiliary target are stored in
+/// AuxTSRecords. Their IDs are shifted up by TSRecords.size() and need to
+/// be translated back with getAuxBuiltinID() before use.
class Context {
- const Info *TSRecords;
- unsigned NumTSRecords;
+ llvm::ArrayRef<Info> TSRecords;
+ llvm::ArrayRef<Info> AuxTSRecords;
+
public:
- Context();
+ Context() {}
/// \brief Perform target-specific initialization
- void InitializeTarget(const TargetInfo &Target);
-
+ /// \param AuxTarget Target info to incorporate builtins from. May be nullptr.
+ void InitializeTarget(const TargetInfo &Target, const TargetInfo *AuxTarget);
+
/// \brief Mark the identifiers for all the builtins with their
/// appropriate builtin ID # and mark any non-portable builtin identifiers as
/// such.
- void InitializeBuiltins(IdentifierTable &Table, const LangOptions& LangOpts);
-
- /// \brief Populate the vector with the names of all of the builtins.
- void GetBuiltinNames(SmallVectorImpl<const char *> &Names);
+ void initializeBuiltins(IdentifierTable &Table, const LangOptions& LangOpts);
/// \brief Return the identifier name for the specified builtin,
/// e.g. "__builtin_abs".
- const char *GetName(unsigned ID) const {
- return GetRecord(ID).Name;
+ const char *getName(unsigned ID) const {
+ return getRecord(ID).Name;
}
/// \brief Get the type descriptor string for the specified builtin.
- const char *GetTypeString(unsigned ID) const {
- return GetRecord(ID).Type;
+ const char *getTypeString(unsigned ID) const {
+ return getRecord(ID).Type;
+ }
+
+ /// \brief Return true if this function is a target-specific builtin
+ bool isTSBuiltin(unsigned ID) const {
+ return ID >= Builtin::FirstTSBuiltin;
}
/// \brief Return true if this function has no side effects and doesn't
/// read memory.
bool isConst(unsigned ID) const {
- return strchr(GetRecord(ID).Attributes, 'c') != nullptr;
+ return strchr(getRecord(ID).Attributes, 'c') != nullptr;
}
/// \brief Return true if we know this builtin never throws an exception.
bool isNoThrow(unsigned ID) const {
- return strchr(GetRecord(ID).Attributes, 'n') != nullptr;
+ return strchr(getRecord(ID).Attributes, 'n') != nullptr;
}
/// \brief Return true if we know this builtin never returns.
bool isNoReturn(unsigned ID) const {
- return strchr(GetRecord(ID).Attributes, 'r') != nullptr;
+ return strchr(getRecord(ID).Attributes, 'r') != nullptr;
}
/// \brief Return true if we know this builtin can return twice.
bool isReturnsTwice(unsigned ID) const {
- return strchr(GetRecord(ID).Attributes, 'j') != nullptr;
+ return strchr(getRecord(ID).Attributes, 'j') != nullptr;
}
/// \brief Returns true if this builtin does not perform the side-effects
/// of its arguments.
bool isUnevaluated(unsigned ID) const {
- return strchr(GetRecord(ID).Attributes, 'u') != nullptr;
+ return strchr(getRecord(ID).Attributes, 'u') != nullptr;
}
/// \brief Return true if this is a builtin for a libc/libm function,
/// with a "__builtin_" prefix (e.g. __builtin_abs).
bool isLibFunction(unsigned ID) const {
- return strchr(GetRecord(ID).Attributes, 'F') != nullptr;
+ return strchr(getRecord(ID).Attributes, 'F') != nullptr;
}
/// \brief Determines whether this builtin is a predefined libc/libm
/// function, such as "malloc", where we know the signature a
/// priori.
bool isPredefinedLibFunction(unsigned ID) const {
- return strchr(GetRecord(ID).Attributes, 'f') != nullptr;
+ return strchr(getRecord(ID).Attributes, 'f') != nullptr;
}
/// \brief Determines whether this builtin is a predefined compiler-rt/libgcc
/// function, such as "__clear_cache", where we know the signature a
/// priori.
bool isPredefinedRuntimeFunction(unsigned ID) const {
- return strchr(GetRecord(ID).Attributes, 'i') != nullptr;
+ return strchr(getRecord(ID).Attributes, 'i') != nullptr;
}
/// \brief Determines whether this builtin has custom typechecking.
bool hasCustomTypechecking(unsigned ID) const {
- return strchr(GetRecord(ID).Attributes, 't') != nullptr;
+ return strchr(getRecord(ID).Attributes, 't') != nullptr;
}
/// \brief Determines whether this builtin has a result or any arguments which
/// are pointer types.
bool hasPtrArgsOrResult(unsigned ID) const {
- return strchr(GetRecord(ID).Type, '*') != nullptr;
+ return strchr(getRecord(ID).Type, '*') != nullptr;
}
/// \brief Completely forget that the given ID was ever considered a builtin,
/// e.g., because the user provided a conflicting signature.
- void ForgetBuiltin(unsigned ID, IdentifierTable &Table);
+ void forgetBuiltin(unsigned ID, IdentifierTable &Table);
/// \brief If this is a library function that comes from a specific
/// header, retrieve that header name.
const char *getHeaderName(unsigned ID) const {
- return GetRecord(ID).HeaderName;
+ return getRecord(ID).HeaderName;
}
/// \brief Determine whether this builtin is like printf in its
@@ -174,14 +176,27 @@ public:
///
/// Such functions can be const when the MathErrno lang option is disabled.
bool isConstWithoutErrno(unsigned ID) const {
- return strchr(GetRecord(ID).Attributes, 'e') != nullptr;
+ return strchr(getRecord(ID).Attributes, 'e') != nullptr;
+ }
+
+ const char *getRequiredFeatures(unsigned ID) const {
+ return getRecord(ID).Features;
+ }
+
+ /// \brief Return true if builtin ID belongs to AuxTarget.
+ bool isAuxBuiltinID(unsigned ID) const {
+ return ID >= (Builtin::FirstTSBuiltin + TSRecords.size());
}
+ /// Return real buitin ID (i.e. ID it would have furing compilation
+ /// for AuxTarget).
+ unsigned getAuxBuiltinID(unsigned ID) const { return ID - TSRecords.size(); }
+
private:
- const Info &GetRecord(unsigned ID) const;
+ const Info &getRecord(unsigned ID) const;
/// \brief Is this builtin supported according to the given language options?
- bool BuiltinIsSupported(const Builtin::Info &BuiltinInfo,
+ bool builtinIsSupported(const Builtin::Info &BuiltinInfo,
const LangOptions &LangOpts);
/// \brief Helper function for isPrintfLike and isScanfLike.
@@ -190,5 +205,12 @@ private:
};
}
+
+/// \brief Kinds of BuiltinTemplateDecl.
+enum BuiltinTemplateKind : int {
+ /// \brief This names the __make_integer_seq BuiltinTemplateDecl.
+ BTK__make_integer_seq
+};
+
} // end namespace clang
#endif
diff --git a/include/clang/Basic/BuiltinsAArch64.def b/include/clang/Basic/BuiltinsAArch64.def
index 1db4c1471029b..b4404434e7a82 100644
--- a/include/clang/Basic/BuiltinsAArch64.def
+++ b/include/clang/Basic/BuiltinsAArch64.def
@@ -60,5 +60,6 @@ BUILTIN(__builtin_arm_rsrp, "v*cC*", "nc")
BUILTIN(__builtin_arm_wsr, "vcC*Ui", "nc")
BUILTIN(__builtin_arm_wsr64, "vcC*LUi", "nc")
BUILTIN(__builtin_arm_wsrp, "vcC*vC*", "nc")
+BUILTIN(__builtin_thread_pointer, "v*", "nc")
#undef BUILTIN
diff --git a/include/clang/Basic/BuiltinsARM.def b/include/clang/Basic/BuiltinsARM.def
index c9cdb4b675bcb..3e8e2bf912ad1 100644
--- a/include/clang/Basic/BuiltinsARM.def
+++ b/include/clang/Basic/BuiltinsARM.def
@@ -48,14 +48,14 @@ BUILTIN(__builtin_arm_vcvtr_f, "ffi", "nc")
BUILTIN(__builtin_arm_vcvtr_d, "fdi", "nc")
// Coprocessor
-BUILTIN(__builtin_arm_mcr, "vUiUiUiUiUiUi", "")
-BUILTIN(__builtin_arm_mcr2, "vUiUiUiUiUiUi", "")
-BUILTIN(__builtin_arm_mrc, "UiUiUiUiUiUi", "")
-BUILTIN(__builtin_arm_mrc2, "UiUiUiUiUiUi", "")
+BUILTIN(__builtin_arm_mcr, "vUIiUIiUiUIiUIiUIi", "")
+BUILTIN(__builtin_arm_mcr2, "vUIiUIiUiUIiUIiUIi", "")
+BUILTIN(__builtin_arm_mrc, "UiUIiUIiUIiUIiUIi", "")
+BUILTIN(__builtin_arm_mrc2, "UiUIiUIiUIiUIiUIi", "")
BUILTIN(__builtin_arm_cdp, "vUiUiUiUiUiUi", "")
BUILTIN(__builtin_arm_cdp2, "vUiUiUiUiUiUi", "")
-BUILTIN(__builtin_arm_mcrr, "vUiUiUiUiUi", "")
-BUILTIN(__builtin_arm_mcrr2, "vUiUiUiUiUi", "")
+BUILTIN(__builtin_arm_mcrr, "vUIiUIiUiUiUIi", "")
+BUILTIN(__builtin_arm_mcrr2, "vUIiUIiUiUiUIi", "")
// CRC32
BUILTIN(__builtin_arm_crc32b, "UiUiUc", "nc")
diff --git a/include/clang/Basic/BuiltinsNVPTX.def b/include/clang/Basic/BuiltinsNVPTX.def
index 970f55fe223c3..3ab6413bb0ec3 100644
--- a/include/clang/Basic/BuiltinsNVPTX.def
+++ b/include/clang/Basic/BuiltinsNVPTX.def
@@ -50,7 +50,7 @@ BUILTIN(__builtin_ptx_read_lanemask_ge, "i", "nc")
BUILTIN(__builtin_ptx_read_lanemask_gt, "i", "nc")
BUILTIN(__builtin_ptx_read_clock, "i", "n")
-BUILTIN(__builtin_ptx_read_clock64, "Li", "n")
+BUILTIN(__builtin_ptx_read_clock64, "LLi", "n")
BUILTIN(__builtin_ptx_read_pm0, "i", "n")
BUILTIN(__builtin_ptx_read_pm1, "i", "n")
@@ -453,6 +453,9 @@ BUILTIN(__nvvm_atom_add_gen_ll, "LLiLLiD*LLi", "n")
BUILTIN(__nvvm_atom_add_g_f, "ffD*1f", "n")
BUILTIN(__nvvm_atom_add_s_f, "ffD*3f", "n")
BUILTIN(__nvvm_atom_add_gen_f, "ffD*f", "n")
+BUILTIN(__nvvm_atom_add_g_d, "ddD*1d", "n")
+BUILTIN(__nvvm_atom_add_s_d, "ddD*3d", "n")
+BUILTIN(__nvvm_atom_add_gen_d, "ddD*d", "n")
BUILTIN(__nvvm_atom_sub_g_i, "iiD*1i", "n")
BUILTIN(__nvvm_atom_sub_s_i, "iiD*3i", "n")
diff --git a/include/clang/Basic/BuiltinsPPC.def b/include/clang/Basic/BuiltinsPPC.def
index fdf1cb0b5a40a..5681c1f2ae1a0 100644
--- a/include/clang/Basic/BuiltinsPPC.def
+++ b/include/clang/Basic/BuiltinsPPC.def
@@ -17,6 +17,8 @@
// The format of this database matches clang/Basic/Builtins.def.
+BUILTIN(__builtin_ppc_get_timebase, "ULLi", "n")
+
// This is just a placeholder, the types and attributes are wrong.
BUILTIN(__builtin_altivec_vaddcuw, "V4UiV4UiV4Ui", "")
@@ -278,12 +280,21 @@ BUILTIN(__builtin_vsx_xvrspip, "V4fV4f", "")
BUILTIN(__builtin_vsx_xvcmpeqdp, "V2ULLiV2dV2d", "")
BUILTIN(__builtin_vsx_xvcmpeqsp, "V4UiV4fV4f", "")
+BUILTIN(__builtin_vsx_xvcmpeqdp_p, "iiV2dV2d", "")
+BUILTIN(__builtin_vsx_xvcmpeqsp_p, "iiV4fV4f", "")
+
BUILTIN(__builtin_vsx_xvcmpgedp, "V2ULLiV2dV2d", "")
BUILTIN(__builtin_vsx_xvcmpgesp, "V4UiV4fV4f", "")
+BUILTIN(__builtin_vsx_xvcmpgedp_p, "iiV2dV2d", "")
+BUILTIN(__builtin_vsx_xvcmpgesp_p, "iiV4fV4f", "")
+
BUILTIN(__builtin_vsx_xvcmpgtdp, "V2ULLiV2dV2d", "")
BUILTIN(__builtin_vsx_xvcmpgtsp, "V4UiV4fV4f", "")
+BUILTIN(__builtin_vsx_xvcmpgtdp_p, "iiV2dV2d", "")
+BUILTIN(__builtin_vsx_xvcmpgtsp_p, "iiV4fV4f", "")
+
BUILTIN(__builtin_vsx_xvrdpim, "V2dV2d", "")
BUILTIN(__builtin_vsx_xvrspim, "V4fV4f", "")
diff --git a/include/clang/Basic/BuiltinsWebAssembly.def b/include/clang/Basic/BuiltinsWebAssembly.def
new file mode 100644
index 0000000000000..975433523ada9
--- /dev/null
+++ b/include/clang/Basic/BuiltinsWebAssembly.def
@@ -0,0 +1,24 @@
+// BuiltinsWebAssembly.def - WebAssembly builtin function database -*- C++ -*-//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+///
+/// \file
+/// \brief This file defines the WebAssembly-specific builtin function database.
+/// Users of this file must define the BUILTIN macro to make use of this
+/// information.
+///
+//===----------------------------------------------------------------------===//
+
+// The format of this database matches clang/Basic/Builtins.def.
+
+// Note that memory_size is not "c" (readnone) because it must be sequenced with
+// respect to grow_memory calls.
+BUILTIN(__builtin_wasm_memory_size, "z", "n")
+BUILTIN(__builtin_wasm_grow_memory, "vz", "n")
+
+#undef BUILTIN
diff --git a/include/clang/Basic/BuiltinsX86.def b/include/clang/Basic/BuiltinsX86.def
index 1cd8973cbd6da..91111f6cbf09a 100644
--- a/include/clang/Basic/BuiltinsX86.def
+++ b/include/clang/Basic/BuiltinsX86.def
@@ -14,14 +14,15 @@
// The format of this database matches clang/Basic/Builtins.def.
-// FIXME: In GCC, these builtins are defined depending on whether support for
-// MMX/SSE/etc is turned on. We should do this too.
-
// FIXME: Ideally we would be able to pull this information from what
// LLVM already knows about X86 builtins. We need to match the LLVM
// definition anyway, since code generation will lower to the
// intrinsic if one exists.
+#if defined(BUILTIN) && !defined(TARGET_BUILTIN)
+# define TARGET_BUILTIN(ID, TYPE, ATTRS, FEATURE) BUILTIN(ID, TYPE, ATTRS)
+#endif
+
// FIXME: Are these nothrow/const?
// Miscellaneous builtin for checking x86 cpu features.
@@ -29,35 +30,46 @@
// can use it?
BUILTIN(__builtin_cpu_supports, "bcC*", "nc")
+// Win64-compatible va_list functions
+BUILTIN(__builtin_ms_va_start, "vc*&.", "nt")
+BUILTIN(__builtin_ms_va_end, "vc*&", "n")
+BUILTIN(__builtin_ms_va_copy, "vc*&c*&", "n")
+
+// Undefined Values
+//
+TARGET_BUILTIN(__builtin_ia32_undef128, "V2d", "nc", "")
+TARGET_BUILTIN(__builtin_ia32_undef256, "V4d", "nc", "")
+TARGET_BUILTIN(__builtin_ia32_undef512, "V8d", "nc", "")
+
// 3DNow!
//
-BUILTIN(__builtin_ia32_femms, "v", "")
-BUILTIN(__builtin_ia32_pavgusb, "V8cV8cV8c", "nc")
-BUILTIN(__builtin_ia32_pf2id, "V2iV2f", "nc")
-BUILTIN(__builtin_ia32_pfacc, "V2fV2fV2f", "nc")
-BUILTIN(__builtin_ia32_pfadd, "V2fV2fV2f", "nc")
-BUILTIN(__builtin_ia32_pfcmpeq, "V2iV2fV2f", "nc")
-BUILTIN(__builtin_ia32_pfcmpge, "V2iV2fV2f", "nc")
-BUILTIN(__builtin_ia32_pfcmpgt, "V2iV2fV2f", "nc")
-BUILTIN(__builtin_ia32_pfmax, "V2fV2fV2f", "nc")
-BUILTIN(__builtin_ia32_pfmin, "V2fV2fV2f", "nc")
-BUILTIN(__builtin_ia32_pfmul, "V2fV2fV2f", "nc")
-BUILTIN(__builtin_ia32_pfrcp, "V2fV2f", "nc")
-BUILTIN(__builtin_ia32_pfrcpit1, "V2fV2fV2f", "nc")
-BUILTIN(__builtin_ia32_pfrcpit2, "V2fV2fV2f", "nc")
-BUILTIN(__builtin_ia32_pfrsqrt, "V2fV2f", "nc")
-BUILTIN(__builtin_ia32_pfrsqit1, "V2fV2fV2f", "nc")
-BUILTIN(__builtin_ia32_pfsub, "V2fV2fV2f", "nc")
-BUILTIN(__builtin_ia32_pfsubr, "V2fV2fV2f", "nc")
-BUILTIN(__builtin_ia32_pi2fd, "V2fV2i", "nc")
-BUILTIN(__builtin_ia32_pmulhrw, "V4sV4sV4s", "nc")
+TARGET_BUILTIN(__builtin_ia32_femms, "v", "", "3dnow")
+TARGET_BUILTIN(__builtin_ia32_pavgusb, "V8cV8cV8c", "nc", "3dnow")
+TARGET_BUILTIN(__builtin_ia32_pf2id, "V2iV2f", "nc", "3dnow")
+TARGET_BUILTIN(__builtin_ia32_pfacc, "V2fV2fV2f", "nc", "3dnow")
+TARGET_BUILTIN(__builtin_ia32_pfadd, "V2fV2fV2f", "nc", "3dnow")
+TARGET_BUILTIN(__builtin_ia32_pfcmpeq, "V2iV2fV2f", "nc", "3dnow")
+TARGET_BUILTIN(__builtin_ia32_pfcmpge, "V2iV2fV2f", "nc", "3dnow")
+TARGET_BUILTIN(__builtin_ia32_pfcmpgt, "V2iV2fV2f", "nc", "3dnow")
+TARGET_BUILTIN(__builtin_ia32_pfmax, "V2fV2fV2f", "nc", "3dnow")
+TARGET_BUILTIN(__builtin_ia32_pfmin, "V2fV2fV2f", "nc", "3dnow")
+TARGET_BUILTIN(__builtin_ia32_pfmul, "V2fV2fV2f", "nc", "3dnow")
+TARGET_BUILTIN(__builtin_ia32_pfrcp, "V2fV2f", "nc", "3dnow")
+TARGET_BUILTIN(__builtin_ia32_pfrcpit1, "V2fV2fV2f", "nc", "3dnow")
+TARGET_BUILTIN(__builtin_ia32_pfrcpit2, "V2fV2fV2f", "nc", "3dnow")
+TARGET_BUILTIN(__builtin_ia32_pfrsqrt, "V2fV2f", "nc", "3dnow")
+TARGET_BUILTIN(__builtin_ia32_pfrsqit1, "V2fV2fV2f", "nc", "3dnow")
+TARGET_BUILTIN(__builtin_ia32_pfsub, "V2fV2fV2f", "nc", "3dnow")
+TARGET_BUILTIN(__builtin_ia32_pfsubr, "V2fV2fV2f", "nc", "3dnow")
+TARGET_BUILTIN(__builtin_ia32_pi2fd, "V2fV2i", "nc", "3dnow")
+TARGET_BUILTIN(__builtin_ia32_pmulhrw, "V4sV4sV4s", "nc", "3dnow")
// 3DNow! Extensions (3dnowa).
-BUILTIN(__builtin_ia32_pf2iw, "V2iV2f", "nc")
-BUILTIN(__builtin_ia32_pfnacc, "V2fV2fV2f", "nc")
-BUILTIN(__builtin_ia32_pfpnacc, "V2fV2fV2f", "nc")
-BUILTIN(__builtin_ia32_pi2fw, "V2fV2i", "nc")
-BUILTIN(__builtin_ia32_pswapdsf, "V2fV2f", "nc")
-BUILTIN(__builtin_ia32_pswapdsi, "V2iV2i", "nc")
+TARGET_BUILTIN(__builtin_ia32_pf2iw, "V2iV2f", "nc", "3dnowa")
+TARGET_BUILTIN(__builtin_ia32_pfnacc, "V2fV2fV2f", "nc", "3dnowa")
+TARGET_BUILTIN(__builtin_ia32_pfpnacc, "V2fV2fV2f", "nc", "3dnowa")
+TARGET_BUILTIN(__builtin_ia32_pi2fw, "V2fV2i", "nc", "3dnowa")
+TARGET_BUILTIN(__builtin_ia32_pswapdsf, "V2fV2f", "nc", "3dnowa")
+TARGET_BUILTIN(__builtin_ia32_pswapdsi, "V2iV2i", "nc", "3dnowa")
// MMX
//
@@ -67,1155 +79,1489 @@ BUILTIN(__builtin_ia32_pswapdsi, "V2iV2i", "nc")
// FIXME: _mm_prefetch must be a built-in because it takes a compile-time constant
// argument and our prior approach of using a #define to the current built-in
// doesn't work in the presence of re-declaration of _mm_prefetch for windows.
-BUILTIN(_mm_prefetch, "vcC*i", "nc")
-BUILTIN(__builtin_ia32_emms, "v", "")
-BUILTIN(__builtin_ia32_paddb, "V8cV8cV8c", "")
-BUILTIN(__builtin_ia32_paddw, "V4sV4sV4s", "")
-BUILTIN(__builtin_ia32_paddd, "V2iV2iV2i", "")
-BUILTIN(__builtin_ia32_paddsb, "V8cV8cV8c", "")
-BUILTIN(__builtin_ia32_paddsw, "V4sV4sV4s", "")
-BUILTIN(__builtin_ia32_paddusb, "V8cV8cV8c", "")
-BUILTIN(__builtin_ia32_paddusw, "V4sV4sV4s", "")
-BUILTIN(__builtin_ia32_psubb, "V8cV8cV8c", "")
-BUILTIN(__builtin_ia32_psubw, "V4sV4sV4s", "")
-BUILTIN(__builtin_ia32_psubd, "V2iV2iV2i", "")
-BUILTIN(__builtin_ia32_psubsb, "V8cV8cV8c", "")
-BUILTIN(__builtin_ia32_psubsw, "V4sV4sV4s", "")
-BUILTIN(__builtin_ia32_psubusb, "V8cV8cV8c", "")
-BUILTIN(__builtin_ia32_psubusw, "V4sV4sV4s", "")
-BUILTIN(__builtin_ia32_pmulhw, "V4sV4sV4s", "")
-BUILTIN(__builtin_ia32_pmullw, "V4sV4sV4s", "")
-BUILTIN(__builtin_ia32_pmaddwd, "V2iV4sV4s", "")
-BUILTIN(__builtin_ia32_pand, "V1LLiV1LLiV1LLi", "")
-BUILTIN(__builtin_ia32_pandn, "V1LLiV1LLiV1LLi", "")
-BUILTIN(__builtin_ia32_por, "V1LLiV1LLiV1LLi", "")
-BUILTIN(__builtin_ia32_pxor, "V1LLiV1LLiV1LLi", "")
-BUILTIN(__builtin_ia32_psllw, "V4sV4sV1LLi", "")
-BUILTIN(__builtin_ia32_pslld, "V2iV2iV1LLi", "")
-BUILTIN(__builtin_ia32_psllq, "V1LLiV1LLiV1LLi", "")
-BUILTIN(__builtin_ia32_psrlw, "V4sV4sV1LLi", "")
-BUILTIN(__builtin_ia32_psrld, "V2iV2iV1LLi", "")
-BUILTIN(__builtin_ia32_psrlq, "V1LLiV1LLiV1LLi", "")
-BUILTIN(__builtin_ia32_psraw, "V4sV4sV1LLi", "")
-BUILTIN(__builtin_ia32_psrad, "V2iV2iV1LLi", "")
-BUILTIN(__builtin_ia32_psllwi, "V4sV4si", "")
-BUILTIN(__builtin_ia32_pslldi, "V2iV2ii", "")
-BUILTIN(__builtin_ia32_psllqi, "V1LLiV1LLii", "")
-BUILTIN(__builtin_ia32_psrlwi, "V4sV4si", "")
-BUILTIN(__builtin_ia32_psrldi, "V2iV2ii", "")
-BUILTIN(__builtin_ia32_psrlqi, "V1LLiV1LLii", "")
-BUILTIN(__builtin_ia32_psrawi, "V4sV4si", "")
-BUILTIN(__builtin_ia32_psradi, "V2iV2ii", "")
-BUILTIN(__builtin_ia32_packsswb, "V8cV4sV4s", "")
-BUILTIN(__builtin_ia32_packssdw, "V4sV2iV2i", "")
-BUILTIN(__builtin_ia32_packuswb, "V8cV4sV4s", "")
-BUILTIN(__builtin_ia32_punpckhbw, "V8cV8cV8c", "")
-BUILTIN(__builtin_ia32_punpckhwd, "V4sV4sV4s", "")
-BUILTIN(__builtin_ia32_punpckhdq, "V2iV2iV2i", "")
-BUILTIN(__builtin_ia32_punpcklbw, "V8cV8cV8c", "")
-BUILTIN(__builtin_ia32_punpcklwd, "V4sV4sV4s", "")
-BUILTIN(__builtin_ia32_punpckldq, "V2iV2iV2i", "")
-BUILTIN(__builtin_ia32_pcmpeqb, "V8cV8cV8c", "")
-BUILTIN(__builtin_ia32_pcmpeqw, "V4sV4sV4s", "")
-BUILTIN(__builtin_ia32_pcmpeqd, "V2iV2iV2i", "")
-BUILTIN(__builtin_ia32_pcmpgtb, "V8cV8cV8c", "")
-BUILTIN(__builtin_ia32_pcmpgtw, "V4sV4sV4s", "")
-BUILTIN(__builtin_ia32_pcmpgtd, "V2iV2iV2i", "")
-BUILTIN(__builtin_ia32_maskmovq, "vV8cV8cc*", "")
-BUILTIN(__builtin_ia32_movntq, "vV1LLi*V1LLi", "")
-BUILTIN(__builtin_ia32_vec_init_v2si, "V2iii", "")
-BUILTIN(__builtin_ia32_vec_init_v4hi, "V4sssss", "")
-BUILTIN(__builtin_ia32_vec_init_v8qi, "V8ccccccccc", "")
-BUILTIN(__builtin_ia32_vec_ext_v2si, "iV2ii", "")
+TARGET_BUILTIN(_mm_prefetch, "vcC*i", "nc", "mmx")
+TARGET_BUILTIN(__builtin_ia32_emms, "v", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_paddb, "V8cV8cV8c", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_paddw, "V4sV4sV4s", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_paddd, "V2iV2iV2i", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_paddsb, "V8cV8cV8c", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_paddsw, "V4sV4sV4s", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_paddusb, "V8cV8cV8c", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_paddusw, "V4sV4sV4s", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_psubb, "V8cV8cV8c", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_psubw, "V4sV4sV4s", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_psubd, "V2iV2iV2i", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_psubsb, "V8cV8cV8c", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_psubsw, "V4sV4sV4s", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_psubusb, "V8cV8cV8c", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_psubusw, "V4sV4sV4s", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_pmulhw, "V4sV4sV4s", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_pmullw, "V4sV4sV4s", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_pmaddwd, "V2iV4sV4s", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_pand, "V1LLiV1LLiV1LLi", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_pandn, "V1LLiV1LLiV1LLi", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_por, "V1LLiV1LLiV1LLi", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_pxor, "V1LLiV1LLiV1LLi", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_psllw, "V4sV4sV1LLi", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_pslld, "V2iV2iV1LLi", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_psllq, "V1LLiV1LLiV1LLi", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_psrlw, "V4sV4sV1LLi", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_psrld, "V2iV2iV1LLi", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_psrlq, "V1LLiV1LLiV1LLi", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_psraw, "V4sV4sV1LLi", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_psrad, "V2iV2iV1LLi", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_psllwi, "V4sV4si", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_pslldi, "V2iV2ii", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_psllqi, "V1LLiV1LLii", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_psrlwi, "V4sV4si", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_psrldi, "V2iV2ii", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_psrlqi, "V1LLiV1LLii", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_psrawi, "V4sV4si", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_psradi, "V2iV2ii", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_packsswb, "V8cV4sV4s", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_packssdw, "V4sV2iV2i", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_packuswb, "V8cV4sV4s", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_punpckhbw, "V8cV8cV8c", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_punpckhwd, "V4sV4sV4s", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_punpckhdq, "V2iV2iV2i", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_punpcklbw, "V8cV8cV8c", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_punpcklwd, "V4sV4sV4s", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_punpckldq, "V2iV2iV2i", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_pcmpeqb, "V8cV8cV8c", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_pcmpeqw, "V4sV4sV4s", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_pcmpeqd, "V2iV2iV2i", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_pcmpgtb, "V8cV8cV8c", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_pcmpgtw, "V4sV4sV4s", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_pcmpgtd, "V2iV2iV2i", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_maskmovq, "vV8cV8cc*", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_movntq, "vV1LLi*V1LLi", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_vec_init_v2si, "V2iii", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_vec_init_v4hi, "V4sssss", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_vec_init_v8qi, "V8ccccccccc", "", "mmx")
+TARGET_BUILTIN(__builtin_ia32_vec_ext_v2si, "iV2ii", "", "mmx")
// MMX2 (MMX+SSE) intrinsics
-BUILTIN(__builtin_ia32_cvtpi2ps, "V4fV4fV2i", "")
-BUILTIN(__builtin_ia32_cvtps2pi, "V2iV4f", "")
-BUILTIN(__builtin_ia32_cvttps2pi, "V2iV4f", "")
-BUILTIN(__builtin_ia32_pavgb, "V8cV8cV8c", "")
-BUILTIN(__builtin_ia32_pavgw, "V4sV4sV4s", "")
-BUILTIN(__builtin_ia32_pmaxsw, "V4sV4sV4s", "")
-BUILTIN(__builtin_ia32_pmaxub, "V8cV8cV8c", "")
-BUILTIN(__builtin_ia32_pminsw, "V4sV4sV4s", "")
-BUILTIN(__builtin_ia32_pminub, "V8cV8cV8c", "")
-BUILTIN(__builtin_ia32_pmovmskb, "iV8c", "")
-BUILTIN(__builtin_ia32_pmulhuw, "V4sV4sV4s", "")
-BUILTIN(__builtin_ia32_psadbw, "V4sV8cV8c", "")
-BUILTIN(__builtin_ia32_pshufw, "V4sV4sIc", "")
+TARGET_BUILTIN(__builtin_ia32_cvtpi2ps, "V4fV4fV2i", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_cvtps2pi, "V2iV4f", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_cvttps2pi, "V2iV4f", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_pavgb, "V8cV8cV8c", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_pavgw, "V4sV4sV4s", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_pmaxsw, "V4sV4sV4s", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_pmaxub, "V8cV8cV8c", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_pminsw, "V4sV4sV4s", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_pminub, "V8cV8cV8c", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_pmovmskb, "iV8c", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_pmulhuw, "V4sV4sV4s", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_psadbw, "V4sV8cV8c", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_pshufw, "V4sV4sIc", "", "sse")
// MMX+SSE2
-BUILTIN(__builtin_ia32_cvtpd2pi, "V2iV2d", "")
-BUILTIN(__builtin_ia32_cvtpi2pd, "V2dV2i", "")
-BUILTIN(__builtin_ia32_cvttpd2pi, "V2iV2d", "")
-BUILTIN(__builtin_ia32_paddq, "V1LLiV1LLiV1LLi", "")
-BUILTIN(__builtin_ia32_pmuludq, "V1LLiV2iV2i", "")
-BUILTIN(__builtin_ia32_psubq, "V1LLiV1LLiV1LLi", "")
+TARGET_BUILTIN(__builtin_ia32_cvtpd2pi, "V2iV2d", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_cvtpi2pd, "V2dV2i", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_cvttpd2pi, "V2iV2d", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_paddq, "V1LLiV1LLiV1LLi", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_pmuludq, "V1LLiV2iV2i", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_psubq, "V1LLiV1LLiV1LLi", "", "sse2")
// MMX+SSSE3
-BUILTIN(__builtin_ia32_pabsb, "V8cV8c", "")
-BUILTIN(__builtin_ia32_pabsd, "V2iV2i", "")
-BUILTIN(__builtin_ia32_pabsw, "V4sV4s", "")
-BUILTIN(__builtin_ia32_palignr, "V8cV8cV8cIc", "")
-BUILTIN(__builtin_ia32_phaddd, "V2iV2iV2i", "")
-BUILTIN(__builtin_ia32_phaddsw, "V4sV4sV4s", "")
-BUILTIN(__builtin_ia32_phaddw, "V4sV4sV4s", "")
-BUILTIN(__builtin_ia32_phsubd, "V2iV2iV2i", "")
-BUILTIN(__builtin_ia32_phsubsw, "V4sV4sV4s", "")
-BUILTIN(__builtin_ia32_phsubw, "V4sV4sV4s", "")
-BUILTIN(__builtin_ia32_pmaddubsw, "V8cV8cV8c", "")
-BUILTIN(__builtin_ia32_pmulhrsw, "V4sV4sV4s", "")
-BUILTIN(__builtin_ia32_pshufb, "V8cV8cV8c", "")
-BUILTIN(__builtin_ia32_psignw, "V4sV4sV4s", "")
-BUILTIN(__builtin_ia32_psignb, "V8cV8cV8c", "")
-BUILTIN(__builtin_ia32_psignd, "V2iV2iV2i", "")
+TARGET_BUILTIN(__builtin_ia32_pabsb, "V8cV8c", "", "ssse3")
+TARGET_BUILTIN(__builtin_ia32_pabsd, "V2iV2i", "", "ssse3")
+TARGET_BUILTIN(__builtin_ia32_pabsw, "V4sV4s", "", "ssse3")
+TARGET_BUILTIN(__builtin_ia32_palignr, "V8cV8cV8cIc", "", "ssse3")
+TARGET_BUILTIN(__builtin_ia32_phaddd, "V2iV2iV2i", "", "ssse3")
+TARGET_BUILTIN(__builtin_ia32_phaddsw, "V4sV4sV4s", "", "ssse3")
+TARGET_BUILTIN(__builtin_ia32_phaddw, "V4sV4sV4s", "", "ssse3")
+TARGET_BUILTIN(__builtin_ia32_phsubd, "V2iV2iV2i", "", "ssse3")
+TARGET_BUILTIN(__builtin_ia32_phsubsw, "V4sV4sV4s", "", "ssse3")
+TARGET_BUILTIN(__builtin_ia32_phsubw, "V4sV4sV4s", "", "ssse3")
+TARGET_BUILTIN(__builtin_ia32_pmaddubsw, "V8cV8cV8c", "", "ssse3")
+TARGET_BUILTIN(__builtin_ia32_pmulhrsw, "V4sV4sV4s", "", "ssse3")
+TARGET_BUILTIN(__builtin_ia32_pshufb, "V8cV8cV8c", "", "ssse3")
+TARGET_BUILTIN(__builtin_ia32_psignw, "V4sV4sV4s", "", "ssse3")
+TARGET_BUILTIN(__builtin_ia32_psignb, "V8cV8cV8c", "", "ssse3")
+TARGET_BUILTIN(__builtin_ia32_psignd, "V2iV2iV2i", "", "ssse3")
// SSE intrinsics.
-BUILTIN(__builtin_ia32_comieq, "iV4fV4f", "")
-BUILTIN(__builtin_ia32_comilt, "iV4fV4f", "")
-BUILTIN(__builtin_ia32_comile, "iV4fV4f", "")
-BUILTIN(__builtin_ia32_comigt, "iV4fV4f", "")
-BUILTIN(__builtin_ia32_comige, "iV4fV4f", "")
-BUILTIN(__builtin_ia32_comineq, "iV4fV4f", "")
-BUILTIN(__builtin_ia32_ucomieq, "iV4fV4f", "")
-BUILTIN(__builtin_ia32_ucomilt, "iV4fV4f", "")
-BUILTIN(__builtin_ia32_ucomile, "iV4fV4f", "")
-BUILTIN(__builtin_ia32_ucomigt, "iV4fV4f", "")
-BUILTIN(__builtin_ia32_ucomige, "iV4fV4f", "")
-BUILTIN(__builtin_ia32_ucomineq, "iV4fV4f", "")
-BUILTIN(__builtin_ia32_comisdeq, "iV2dV2d", "")
-BUILTIN(__builtin_ia32_comisdlt, "iV2dV2d", "")
-BUILTIN(__builtin_ia32_comisdle, "iV2dV2d", "")
-BUILTIN(__builtin_ia32_comisdgt, "iV2dV2d", "")
-BUILTIN(__builtin_ia32_comisdge, "iV2dV2d", "")
-BUILTIN(__builtin_ia32_comisdneq, "iV2dV2d", "")
-BUILTIN(__builtin_ia32_ucomisdeq, "iV2dV2d", "")
-BUILTIN(__builtin_ia32_ucomisdlt, "iV2dV2d", "")
-BUILTIN(__builtin_ia32_ucomisdle, "iV2dV2d", "")
-BUILTIN(__builtin_ia32_ucomisdgt, "iV2dV2d", "")
-BUILTIN(__builtin_ia32_ucomisdge, "iV2dV2d", "")
-BUILTIN(__builtin_ia32_ucomisdneq, "iV2dV2d", "")
-BUILTIN(__builtin_ia32_cmpps, "V4fV4fV4fIc", "")
-BUILTIN(__builtin_ia32_cmpeqps, "V4fV4fV4f", "")
-BUILTIN(__builtin_ia32_cmpltps, "V4fV4fV4f", "")
-BUILTIN(__builtin_ia32_cmpleps, "V4fV4fV4f", "")
-BUILTIN(__builtin_ia32_cmpunordps, "V4fV4fV4f", "")
-BUILTIN(__builtin_ia32_cmpneqps, "V4fV4fV4f", "")
-BUILTIN(__builtin_ia32_cmpnltps, "V4fV4fV4f", "")
-BUILTIN(__builtin_ia32_cmpnleps, "V4fV4fV4f", "")
-BUILTIN(__builtin_ia32_cmpordps, "V4fV4fV4f", "")
-BUILTIN(__builtin_ia32_cmpss, "V4fV4fV4fIc", "")
-BUILTIN(__builtin_ia32_cmpeqss, "V4fV4fV4f", "")
-BUILTIN(__builtin_ia32_cmpltss, "V4fV4fV4f", "")
-BUILTIN(__builtin_ia32_cmpless, "V4fV4fV4f", "")
-BUILTIN(__builtin_ia32_cmpunordss, "V4fV4fV4f", "")
-BUILTIN(__builtin_ia32_cmpneqss, "V4fV4fV4f", "")
-BUILTIN(__builtin_ia32_cmpnltss, "V4fV4fV4f", "")
-BUILTIN(__builtin_ia32_cmpnless, "V4fV4fV4f", "")
-BUILTIN(__builtin_ia32_cmpordss, "V4fV4fV4f", "")
-BUILTIN(__builtin_ia32_minps, "V4fV4fV4f", "")
-BUILTIN(__builtin_ia32_maxps, "V4fV4fV4f", "")
-BUILTIN(__builtin_ia32_minss, "V4fV4fV4f", "")
-BUILTIN(__builtin_ia32_maxss, "V4fV4fV4f", "")
-BUILTIN(__builtin_ia32_cmppd, "V2dV2dV2dIc", "")
-BUILTIN(__builtin_ia32_cmpeqpd, "V2dV2dV2d", "")
-BUILTIN(__builtin_ia32_cmpltpd, "V2dV2dV2d", "")
-BUILTIN(__builtin_ia32_cmplepd, "V2dV2dV2d", "")
-BUILTIN(__builtin_ia32_cmpunordpd, "V2dV2dV2d", "")
-BUILTIN(__builtin_ia32_cmpneqpd, "V2dV2dV2d", "")
-BUILTIN(__builtin_ia32_cmpnltpd, "V2dV2dV2d", "")
-BUILTIN(__builtin_ia32_cmpnlepd, "V2dV2dV2d", "")
-BUILTIN(__builtin_ia32_cmpordpd, "V2dV2dV2d", "")
-BUILTIN(__builtin_ia32_cmpsd, "V2dV2dV2dIc", "")
-BUILTIN(__builtin_ia32_cmpeqsd, "V2dV2dV2d", "")
-BUILTIN(__builtin_ia32_cmpltsd, "V2dV2dV2d", "")
-BUILTIN(__builtin_ia32_cmplesd, "V2dV2dV2d", "")
-BUILTIN(__builtin_ia32_cmpunordsd, "V2dV2dV2d", "")
-BUILTIN(__builtin_ia32_cmpneqsd, "V2dV2dV2d", "")
-BUILTIN(__builtin_ia32_cmpnltsd, "V2dV2dV2d", "")
-BUILTIN(__builtin_ia32_cmpnlesd, "V2dV2dV2d", "")
-BUILTIN(__builtin_ia32_cmpordsd, "V2dV2dV2d", "")
-BUILTIN(__builtin_ia32_minpd, "V2dV2dV2d", "")
-BUILTIN(__builtin_ia32_maxpd, "V2dV2dV2d", "")
-BUILTIN(__builtin_ia32_minsd, "V2dV2dV2d", "")
-BUILTIN(__builtin_ia32_maxsd, "V2dV2dV2d", "")
-BUILTIN(__builtin_ia32_paddsb128, "V16cV16cV16c", "")
-BUILTIN(__builtin_ia32_paddsw128, "V8sV8sV8s", "")
-BUILTIN(__builtin_ia32_psubsb128, "V16cV16cV16c", "")
-BUILTIN(__builtin_ia32_psubsw128, "V8sV8sV8s", "")
-BUILTIN(__builtin_ia32_paddusb128, "V16cV16cV16c", "")
-BUILTIN(__builtin_ia32_paddusw128, "V8sV8sV8s", "")
-BUILTIN(__builtin_ia32_psubusb128, "V16cV16cV16c", "")
-BUILTIN(__builtin_ia32_psubusw128, "V8sV8sV8s", "")
-BUILTIN(__builtin_ia32_pmulhw128, "V8sV8sV8s", "")
-BUILTIN(__builtin_ia32_pavgb128, "V16cV16cV16c", "")
-BUILTIN(__builtin_ia32_pavgw128, "V8sV8sV8s", "")
-BUILTIN(__builtin_ia32_pmaxub128, "V16cV16cV16c", "")
-BUILTIN(__builtin_ia32_pmaxsw128, "V8sV8sV8s", "")
-BUILTIN(__builtin_ia32_pminub128, "V16cV16cV16c", "")
-BUILTIN(__builtin_ia32_pminsw128, "V8sV8sV8s", "")
-BUILTIN(__builtin_ia32_packsswb128, "V16cV8sV8s", "")
-BUILTIN(__builtin_ia32_packssdw128, "V8sV4iV4i", "")
-BUILTIN(__builtin_ia32_packuswb128, "V16cV8sV8s", "")
-BUILTIN(__builtin_ia32_pmulhuw128, "V8sV8sV8s", "")
-BUILTIN(__builtin_ia32_addsubps, "V4fV4fV4f", "")
-BUILTIN(__builtin_ia32_addsubpd, "V2dV2dV2d", "")
-BUILTIN(__builtin_ia32_haddps, "V4fV4fV4f", "")
-BUILTIN(__builtin_ia32_haddpd, "V2dV2dV2d", "")
-BUILTIN(__builtin_ia32_hsubps, "V4fV4fV4f", "")
-BUILTIN(__builtin_ia32_hsubpd, "V2dV2dV2d", "")
-BUILTIN(__builtin_ia32_phaddw128, "V8sV8sV8s", "")
-BUILTIN(__builtin_ia32_phaddd128, "V4iV4iV4i", "")
-BUILTIN(__builtin_ia32_phaddsw128, "V8sV8sV8s", "")
-BUILTIN(__builtin_ia32_phsubw128, "V8sV8sV8s", "")
-BUILTIN(__builtin_ia32_phsubd128, "V4iV4iV4i", "")
-BUILTIN(__builtin_ia32_phsubsw128, "V8sV8sV8s", "")
-BUILTIN(__builtin_ia32_pmaddubsw128, "V8sV16cV16c", "")
-BUILTIN(__builtin_ia32_pmulhrsw128, "V8sV8sV8s", "")
-BUILTIN(__builtin_ia32_pshufb128, "V16cV16cV16c", "")
-BUILTIN(__builtin_ia32_psignb128, "V16cV16cV16c", "")
-BUILTIN(__builtin_ia32_psignw128, "V8sV8sV8s", "")
-BUILTIN(__builtin_ia32_psignd128, "V4iV4iV4i", "")
-BUILTIN(__builtin_ia32_pabsb128, "V16cV16c", "")
-BUILTIN(__builtin_ia32_pabsw128, "V8sV8s", "")
-BUILTIN(__builtin_ia32_pabsd128, "V4iV4i", "")
-BUILTIN(__builtin_ia32_ldmxcsr, "vUi", "")
-BUILTIN(__builtin_ia32_stmxcsr, "Ui", "")
-BUILTIN(__builtin_ia32_cvtss2si, "iV4f", "")
-BUILTIN(__builtin_ia32_cvtss2si64, "LLiV4f", "")
-BUILTIN(__builtin_ia32_storeups, "vf*V4f", "")
-BUILTIN(__builtin_ia32_storehps, "vV2i*V4f", "")
-BUILTIN(__builtin_ia32_storelps, "vV2i*V4f", "")
-BUILTIN(__builtin_ia32_movmskps, "iV4f", "")
-BUILTIN(__builtin_ia32_movntps, "vf*V4f", "")
-BUILTIN(__builtin_ia32_sfence, "v", "")
-BUILTIN(__builtin_ia32_rcpps, "V4fV4f", "")
-BUILTIN(__builtin_ia32_rcpss, "V4fV4f", "")
-BUILTIN(__builtin_ia32_rsqrtps, "V4fV4f", "")
-BUILTIN(__builtin_ia32_rsqrtss, "V4fV4f", "")
-BUILTIN(__builtin_ia32_sqrtps, "V4fV4f", "")
-BUILTIN(__builtin_ia32_sqrtss, "V4fV4f", "")
-BUILTIN(__builtin_ia32_maskmovdqu, "vV16cV16cc*", "")
-BUILTIN(__builtin_ia32_storeupd, "vd*V2d", "")
-BUILTIN(__builtin_ia32_movmskpd, "iV2d", "")
-BUILTIN(__builtin_ia32_pmovmskb128, "iV16c", "")
-BUILTIN(__builtin_ia32_movnti, "vi*i", "")
-BUILTIN(__builtin_ia32_movnti64, "vLLi*LLi", "")
-BUILTIN(__builtin_ia32_movntpd, "vd*V2d", "")
-BUILTIN(__builtin_ia32_movntdq, "vV2LLi*V2LLi", "")
-BUILTIN(__builtin_ia32_psadbw128, "V2LLiV16cV16c", "")
-BUILTIN(__builtin_ia32_sqrtpd, "V2dV2d", "")
-BUILTIN(__builtin_ia32_sqrtsd, "V2dV2d", "")
-BUILTIN(__builtin_ia32_cvtdq2pd, "V2dV4i", "")
-BUILTIN(__builtin_ia32_cvtdq2ps, "V4fV4i", "")
-BUILTIN(__builtin_ia32_cvtpd2dq, "V2LLiV2d", "")
-BUILTIN(__builtin_ia32_cvtpd2ps, "V4fV2d", "")
-BUILTIN(__builtin_ia32_cvttpd2dq, "V4iV2d", "")
-BUILTIN(__builtin_ia32_cvtsd2si, "iV2d", "")
-BUILTIN(__builtin_ia32_cvtsd2si64, "LLiV2d", "")
-BUILTIN(__builtin_ia32_cvtps2dq, "V4iV4f", "")
-BUILTIN(__builtin_ia32_cvtps2pd, "V2dV4f", "")
-BUILTIN(__builtin_ia32_cvttps2dq, "V4iV4f", "")
-BUILTIN(__builtin_ia32_clflush, "vvC*", "")
-BUILTIN(__builtin_ia32_lfence, "v", "")
-BUILTIN(__builtin_ia32_mfence, "v", "")
-BUILTIN(__builtin_ia32_storedqu, "vc*V16c", "")
-BUILTIN(__builtin_ia32_pmuludq128, "V2LLiV4iV4i", "")
-BUILTIN(__builtin_ia32_psraw128, "V8sV8sV8s", "")
-BUILTIN(__builtin_ia32_psrad128, "V4iV4iV4i", "")
-BUILTIN(__builtin_ia32_psrlw128, "V8sV8sV8s", "")
-BUILTIN(__builtin_ia32_psrld128, "V4iV4iV4i", "")
-BUILTIN(__builtin_ia32_psrlq128, "V2LLiV2LLiV2LLi", "")
-BUILTIN(__builtin_ia32_psllw128, "V8sV8sV8s", "")
-BUILTIN(__builtin_ia32_pslld128, "V4iV4iV4i", "")
-BUILTIN(__builtin_ia32_psllq128, "V2LLiV2LLiV2LLi", "")
-BUILTIN(__builtin_ia32_psllwi128, "V8sV8si", "")
-BUILTIN(__builtin_ia32_pslldi128, "V4iV4ii", "")
-BUILTIN(__builtin_ia32_psllqi128, "V2LLiV2LLii", "")
-BUILTIN(__builtin_ia32_psrlwi128, "V8sV8si", "")
-BUILTIN(__builtin_ia32_psrldi128, "V4iV4ii", "")
-BUILTIN(__builtin_ia32_psrlqi128, "V2LLiV2LLii", "")
-BUILTIN(__builtin_ia32_psrawi128, "V8sV8si", "")
-BUILTIN(__builtin_ia32_psradi128, "V4iV4ii", "")
-BUILTIN(__builtin_ia32_pmaddwd128, "V4iV8sV8s", "")
-BUILTIN(__builtin_ia32_monitor, "vv*UiUi", "")
-BUILTIN(__builtin_ia32_mwait, "vUiUi", "")
-BUILTIN(__builtin_ia32_lddqu, "V16ccC*", "")
-BUILTIN(__builtin_ia32_palignr128, "V16cV16cV16cIc", "")
-BUILTIN(__builtin_ia32_insertps128, "V4fV4fV4fIc", "")
-
-BUILTIN(__builtin_ia32_pblendvb128, "V16cV16cV16cV16c", "")
-BUILTIN(__builtin_ia32_blendvpd, "V2dV2dV2dV2d", "")
-BUILTIN(__builtin_ia32_blendvps, "V4fV4fV4fV4f", "")
-
-BUILTIN(__builtin_ia32_packusdw128, "V8sV4iV4i", "")
-BUILTIN(__builtin_ia32_pmaxsb128, "V16cV16cV16c", "")
-BUILTIN(__builtin_ia32_pmaxsd128, "V4iV4iV4i", "")
-BUILTIN(__builtin_ia32_pmaxud128, "V4iV4iV4i", "")
-BUILTIN(__builtin_ia32_pmaxuw128, "V8sV8sV8s", "")
-BUILTIN(__builtin_ia32_pminsb128, "V16cV16cV16c", "")
-BUILTIN(__builtin_ia32_pminsd128, "V4iV4iV4i", "")
-BUILTIN(__builtin_ia32_pminud128, "V4iV4iV4i", "")
-BUILTIN(__builtin_ia32_pminuw128, "V8sV8sV8s", "")
-BUILTIN(__builtin_ia32_pmovsxbd128, "V4iV16c", "")
-BUILTIN(__builtin_ia32_pmovsxbq128, "V2LLiV16c", "")
-BUILTIN(__builtin_ia32_pmovsxbw128, "V8sV16c", "")
-BUILTIN(__builtin_ia32_pmovsxdq128, "V2LLiV4i", "")
-BUILTIN(__builtin_ia32_pmovsxwd128, "V4iV8s", "")
-BUILTIN(__builtin_ia32_pmovsxwq128, "V2LLiV8s", "")
-BUILTIN(__builtin_ia32_pmovzxbd128, "V4iV16c", "")
-BUILTIN(__builtin_ia32_pmovzxbq128, "V2LLiV16c", "")
-BUILTIN(__builtin_ia32_pmovzxbw128, "V8sV16c", "")
-BUILTIN(__builtin_ia32_pmovzxdq128, "V2LLiV4i", "")
-BUILTIN(__builtin_ia32_pmovzxwd128, "V4iV8s", "")
-BUILTIN(__builtin_ia32_pmovzxwq128, "V2LLiV8s", "")
-BUILTIN(__builtin_ia32_pmuldq128, "V2LLiV4iV4i", "")
-BUILTIN(__builtin_ia32_pmulld128, "V4iV4iV4i", "")
-BUILTIN(__builtin_ia32_roundps, "V4fV4fi", "")
-BUILTIN(__builtin_ia32_roundss, "V4fV4fV4fi", "")
-BUILTIN(__builtin_ia32_roundsd, "V2dV2dV2di", "")
-BUILTIN(__builtin_ia32_roundpd, "V2dV2di", "")
-BUILTIN(__builtin_ia32_dpps, "V4fV4fV4fIc", "")
-BUILTIN(__builtin_ia32_dppd, "V2dV2dV2dIc", "")
-BUILTIN(__builtin_ia32_movntdqa, "V2LLiV2LLi*", "")
-BUILTIN(__builtin_ia32_ptestz128, "iV2LLiV2LLi", "")
-BUILTIN(__builtin_ia32_ptestc128, "iV2LLiV2LLi", "")
-BUILTIN(__builtin_ia32_ptestnzc128, "iV2LLiV2LLi", "")
-BUILTIN(__builtin_ia32_mpsadbw128, "V16cV16cV16cIc", "")
-BUILTIN(__builtin_ia32_phminposuw128, "V8sV8s", "")
+TARGET_BUILTIN(__builtin_ia32_comieq, "iV4fV4f", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_comilt, "iV4fV4f", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_comile, "iV4fV4f", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_comigt, "iV4fV4f", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_comige, "iV4fV4f", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_comineq, "iV4fV4f", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_ucomieq, "iV4fV4f", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_ucomilt, "iV4fV4f", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_ucomile, "iV4fV4f", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_ucomigt, "iV4fV4f", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_ucomige, "iV4fV4f", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_ucomineq, "iV4fV4f", "", "sse")
+
+TARGET_BUILTIN(__builtin_ia32_comisdeq, "iV2dV2d", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_comisdlt, "iV2dV2d", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_comisdle, "iV2dV2d", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_comisdgt, "iV2dV2d", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_comisdge, "iV2dV2d", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_comisdneq, "iV2dV2d", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_ucomisdeq, "iV2dV2d", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_ucomisdlt, "iV2dV2d", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_ucomisdle, "iV2dV2d", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_ucomisdgt, "iV2dV2d", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_ucomisdge, "iV2dV2d", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_ucomisdneq, "iV2dV2d", "", "sse2")
+
+TARGET_BUILTIN(__builtin_ia32_cmpps, "V4fV4fV4fIc", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_cmpeqps, "V4fV4fV4f", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_cmpltps, "V4fV4fV4f", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_cmpleps, "V4fV4fV4f", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_cmpunordps, "V4fV4fV4f", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_cmpneqps, "V4fV4fV4f", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_cmpnltps, "V4fV4fV4f", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_cmpnleps, "V4fV4fV4f", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_cmpordps, "V4fV4fV4f", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_cmpss, "V4fV4fV4fIc", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_cmpeqss, "V4fV4fV4f", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_cmpltss, "V4fV4fV4f", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_cmpless, "V4fV4fV4f", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_cmpunordss, "V4fV4fV4f", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_cmpneqss, "V4fV4fV4f", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_cmpnltss, "V4fV4fV4f", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_cmpnless, "V4fV4fV4f", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_cmpordss, "V4fV4fV4f", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_minps, "V4fV4fV4f", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_maxps, "V4fV4fV4f", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_minss, "V4fV4fV4f", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_maxss, "V4fV4fV4f", "", "sse")
+
+TARGET_BUILTIN(__builtin_ia32_cmppd, "V2dV2dV2dIc", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_cmpeqpd, "V2dV2dV2d", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_cmpltpd, "V2dV2dV2d", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_cmplepd, "V2dV2dV2d", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_cmpunordpd, "V2dV2dV2d", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_cmpneqpd, "V2dV2dV2d", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_cmpnltpd, "V2dV2dV2d", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_cmpnlepd, "V2dV2dV2d", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_cmpordpd, "V2dV2dV2d", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_cmpsd, "V2dV2dV2dIc", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_cmpeqsd, "V2dV2dV2d", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_cmpltsd, "V2dV2dV2d", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_cmplesd, "V2dV2dV2d", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_cmpunordsd, "V2dV2dV2d", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_cmpneqsd, "V2dV2dV2d", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_cmpnltsd, "V2dV2dV2d", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_cmpnlesd, "V2dV2dV2d", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_cmpordsd, "V2dV2dV2d", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_minpd, "V2dV2dV2d", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_maxpd, "V2dV2dV2d", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_minsd, "V2dV2dV2d", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_maxsd, "V2dV2dV2d", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_paddsb128, "V16cV16cV16c", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_paddsw128, "V8sV8sV8s", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_psubsb128, "V16cV16cV16c", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_psubsw128, "V8sV8sV8s", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_paddusb128, "V16cV16cV16c", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_paddusw128, "V8sV8sV8s", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_psubusb128, "V16cV16cV16c", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_psubusw128, "V8sV8sV8s", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_pmulhw128, "V8sV8sV8s", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_pavgb128, "V16cV16cV16c", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_pavgw128, "V8sV8sV8s", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_pmaxub128, "V16cV16cV16c", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_pmaxsw128, "V8sV8sV8s", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_pminub128, "V16cV16cV16c", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_pminsw128, "V8sV8sV8s", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_packsswb128, "V16cV8sV8s", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_packssdw128, "V8sV4iV4i", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_packuswb128, "V16cV8sV8s", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_pmulhuw128, "V8sV8sV8s", "", "sse2")
+
+TARGET_BUILTIN(__builtin_ia32_addsubps, "V4fV4fV4f", "", "sse3")
+TARGET_BUILTIN(__builtin_ia32_addsubpd, "V2dV2dV2d", "", "sse3")
+TARGET_BUILTIN(__builtin_ia32_haddps, "V4fV4fV4f", "", "sse3")
+TARGET_BUILTIN(__builtin_ia32_haddpd, "V2dV2dV2d", "", "sse3")
+TARGET_BUILTIN(__builtin_ia32_hsubps, "V4fV4fV4f", "", "sse3")
+TARGET_BUILTIN(__builtin_ia32_hsubpd, "V2dV2dV2d", "", "sse3")
+TARGET_BUILTIN(__builtin_ia32_phaddw128, "V8sV8sV8s", "", "ssse3")
+TARGET_BUILTIN(__builtin_ia32_phaddd128, "V4iV4iV4i", "", "ssse3")
+TARGET_BUILTIN(__builtin_ia32_phaddsw128, "V8sV8sV8s", "", "ssse3")
+TARGET_BUILTIN(__builtin_ia32_phsubw128, "V8sV8sV8s", "", "ssse3")
+TARGET_BUILTIN(__builtin_ia32_phsubd128, "V4iV4iV4i", "", "ssse3")
+TARGET_BUILTIN(__builtin_ia32_phsubsw128, "V8sV8sV8s", "", "ssse3")
+TARGET_BUILTIN(__builtin_ia32_pmaddubsw128, "V8sV16cV16c", "", "ssse3")
+TARGET_BUILTIN(__builtin_ia32_pmulhrsw128, "V8sV8sV8s", "", "ssse3")
+TARGET_BUILTIN(__builtin_ia32_pshufb128, "V16cV16cV16c", "", "ssse3")
+TARGET_BUILTIN(__builtin_ia32_psignb128, "V16cV16cV16c", "", "ssse3")
+TARGET_BUILTIN(__builtin_ia32_psignw128, "V8sV8sV8s", "", "ssse3")
+TARGET_BUILTIN(__builtin_ia32_psignd128, "V4iV4iV4i", "", "ssse3")
+TARGET_BUILTIN(__builtin_ia32_pabsb128, "V16cV16c", "", "ssse3")
+TARGET_BUILTIN(__builtin_ia32_pabsw128, "V8sV8s", "", "ssse3")
+TARGET_BUILTIN(__builtin_ia32_pabsd128, "V4iV4i", "", "ssse3")
+
+TARGET_BUILTIN(__builtin_ia32_ldmxcsr, "vUi", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_stmxcsr, "Ui", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_cvtss2si, "iV4f", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_cvtss2si64, "LLiV4f", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_storeups, "vf*V4f", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_storehps, "vV2i*V4f", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_storelps, "vV2i*V4f", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_movmskps, "iV4f", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_movntps, "vf*V4f", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_sfence, "v", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_rcpps, "V4fV4f", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_rcpss, "V4fV4f", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_rsqrtps, "V4fV4f", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_rsqrtss, "V4fV4f", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_sqrtps, "V4fV4f", "", "sse")
+TARGET_BUILTIN(__builtin_ia32_sqrtss, "V4fV4f", "", "sse")
+
+TARGET_BUILTIN(__builtin_ia32_maskmovdqu, "vV16cV16cc*", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_storeupd, "vd*V2d", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_movmskpd, "iV2d", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_pmovmskb128, "iV16c", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_movnti, "vi*i", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_movnti64, "vLLi*LLi", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_movntpd, "vd*V2d", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_movntdq, "vV2LLi*V2LLi", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_psadbw128, "V2LLiV16cV16c", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_sqrtpd, "V2dV2d", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_sqrtsd, "V2dV2d", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_cvtdq2pd, "V2dV4i", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_cvtdq2ps, "V4fV4i", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_cvtpd2dq, "V2LLiV2d", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_cvtpd2ps, "V4fV2d", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_cvttpd2dq, "V4iV2d", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_cvtsd2si, "iV2d", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_cvtsd2si64, "LLiV2d", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_cvtps2dq, "V4iV4f", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_cvtps2pd, "V2dV4f", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_cvttps2dq, "V4iV4f", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_clflush, "vvC*", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_lfence, "v", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_mfence, "v", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_pause, "v", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_storedqu, "vc*V16c", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_pmuludq128, "V2LLiV4iV4i", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_psraw128, "V8sV8sV8s", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_psrad128, "V4iV4iV4i", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_psrlw128, "V8sV8sV8s", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_psrld128, "V4iV4iV4i", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_psrlq128, "V2LLiV2LLiV2LLi", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_psllw128, "V8sV8sV8s", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_pslld128, "V4iV4iV4i", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_psllq128, "V2LLiV2LLiV2LLi", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_psllwi128, "V8sV8si", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_pslldi128, "V4iV4ii", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_psllqi128, "V2LLiV2LLii", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_psrlwi128, "V8sV8si", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_psrldi128, "V4iV4ii", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_psrlqi128, "V2LLiV2LLii", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_psrawi128, "V8sV8si", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_psradi128, "V4iV4ii", "", "sse2")
+TARGET_BUILTIN(__builtin_ia32_pmaddwd128, "V4iV8sV8s", "", "sse2")
+
+TARGET_BUILTIN(__builtin_ia32_monitor, "vv*UiUi", "", "sse3")
+TARGET_BUILTIN(__builtin_ia32_mwait, "vUiUi", "", "sse3")
+TARGET_BUILTIN(__builtin_ia32_lddqu, "V16ccC*", "", "sse3")
+
+TARGET_BUILTIN(__builtin_ia32_palignr128, "V16cV16cV16cIc", "", "ssse3")
+
+TARGET_BUILTIN(__builtin_ia32_insertps128, "V4fV4fV4fIc", "", "sse4.1")
+TARGET_BUILTIN(__builtin_ia32_pblendvb128, "V16cV16cV16cV16c", "", "sse4.1")
+TARGET_BUILTIN(__builtin_ia32_blendvpd, "V2dV2dV2dV2d", "", "sse4.1")
+TARGET_BUILTIN(__builtin_ia32_blendvps, "V4fV4fV4fV4f", "", "sse4.1")
+TARGET_BUILTIN(__builtin_ia32_packusdw128, "V8sV4iV4i", "", "sse4.1")
+
+TARGET_BUILTIN(__builtin_ia32_pmaxsb128, "V16cV16cV16c", "", "sse4.1")
+TARGET_BUILTIN(__builtin_ia32_pmaxsd128, "V4iV4iV4i", "", "sse4.1")
+TARGET_BUILTIN(__builtin_ia32_pmaxud128, "V4iV4iV4i", "", "sse4.1")
+TARGET_BUILTIN(__builtin_ia32_pmaxuw128, "V8sV8sV8s", "", "sse4.1")
+TARGET_BUILTIN(__builtin_ia32_pminsb128, "V16cV16cV16c", "", "sse4.1")
+TARGET_BUILTIN(__builtin_ia32_pminsd128, "V4iV4iV4i", "", "sse4.1")
+TARGET_BUILTIN(__builtin_ia32_pminud128, "V4iV4iV4i", "", "sse4.1")
+TARGET_BUILTIN(__builtin_ia32_pminuw128, "V8sV8sV8s", "", "sse4.1")
+TARGET_BUILTIN(__builtin_ia32_pmovzxbd128, "V4iV16c", "", "sse4.1")
+TARGET_BUILTIN(__builtin_ia32_pmovzxbq128, "V2LLiV16c", "", "sse4.1")
+TARGET_BUILTIN(__builtin_ia32_pmovzxbw128, "V8sV16c", "", "sse4.1")
+TARGET_BUILTIN(__builtin_ia32_pmovzxdq128, "V2LLiV4i", "", "sse4.1")
+TARGET_BUILTIN(__builtin_ia32_pmovzxwd128, "V4iV8s", "", "sse4.1")
+TARGET_BUILTIN(__builtin_ia32_pmovzxwq128, "V2LLiV8s", "", "sse4.1")
+TARGET_BUILTIN(__builtin_ia32_pmuldq128, "V2LLiV4iV4i", "", "sse4.1")
+TARGET_BUILTIN(__builtin_ia32_pmulld128, "V4iV4iV4i", "", "sse4.1")
+TARGET_BUILTIN(__builtin_ia32_roundps, "V4fV4fIi", "", "sse4.1")
+TARGET_BUILTIN(__builtin_ia32_roundss, "V4fV4fV4fIi", "", "sse4.1")
+TARGET_BUILTIN(__builtin_ia32_roundsd, "V2dV2dV2dIi", "", "sse4.1")
+TARGET_BUILTIN(__builtin_ia32_roundpd, "V2dV2dIi", "", "sse4.1")
+TARGET_BUILTIN(__builtin_ia32_dpps, "V4fV4fV4fIc", "", "sse4.1")
+TARGET_BUILTIN(__builtin_ia32_dppd, "V2dV2dV2dIc", "", "sse4.1")
+TARGET_BUILTIN(__builtin_ia32_movntdqa, "V2LLiV2LLiC*", "", "sse4.1")
+TARGET_BUILTIN(__builtin_ia32_ptestz128, "iV2LLiV2LLi", "", "sse4.1")
+TARGET_BUILTIN(__builtin_ia32_ptestc128, "iV2LLiV2LLi", "", "sse4.1")
+TARGET_BUILTIN(__builtin_ia32_ptestnzc128, "iV2LLiV2LLi", "", "sse4.1")
+TARGET_BUILTIN(__builtin_ia32_mpsadbw128, "V16cV16cV16cIc", "", "sse4.1")
+TARGET_BUILTIN(__builtin_ia32_phminposuw128, "V8sV8s", "", "sse4.1")
// SSE 4.2
-BUILTIN(__builtin_ia32_pcmpistrm128, "V16cV16cV16cIc", "")
-BUILTIN(__builtin_ia32_pcmpistri128, "iV16cV16cIc", "")
-BUILTIN(__builtin_ia32_pcmpestrm128, "V16cV16ciV16ciIc", "")
-BUILTIN(__builtin_ia32_pcmpestri128, "iV16ciV16ciIc","")
-
-BUILTIN(__builtin_ia32_pcmpistria128, "iV16cV16cIc","")
-BUILTIN(__builtin_ia32_pcmpistric128, "iV16cV16cIc","")
-BUILTIN(__builtin_ia32_pcmpistrio128, "iV16cV16cIc","")
-BUILTIN(__builtin_ia32_pcmpistris128, "iV16cV16cIc","")
-BUILTIN(__builtin_ia32_pcmpistriz128, "iV16cV16cIc","")
-BUILTIN(__builtin_ia32_pcmpestria128, "iV16ciV16ciIc","")
-BUILTIN(__builtin_ia32_pcmpestric128, "iV16ciV16ciIc","")
-BUILTIN(__builtin_ia32_pcmpestrio128, "iV16ciV16ciIc","")
-BUILTIN(__builtin_ia32_pcmpestris128, "iV16ciV16ciIc","")
-BUILTIN(__builtin_ia32_pcmpestriz128, "iV16ciV16ciIc","")
-
-BUILTIN(__builtin_ia32_crc32qi, "UiUiUc", "")
-BUILTIN(__builtin_ia32_crc32hi, "UiUiUs", "")
-BUILTIN(__builtin_ia32_crc32si, "UiUiUi", "")
-BUILTIN(__builtin_ia32_crc32di, "ULLiULLiULLi", "")
+TARGET_BUILTIN(__builtin_ia32_pcmpistrm128, "V16cV16cV16cIc", "", "sse4.2")
+TARGET_BUILTIN(__builtin_ia32_pcmpistri128, "iV16cV16cIc", "", "sse4.2")
+TARGET_BUILTIN(__builtin_ia32_pcmpestrm128, "V16cV16ciV16ciIc", "", "sse4.2")
+TARGET_BUILTIN(__builtin_ia32_pcmpestri128, "iV16ciV16ciIc","", "sse4.2")
+
+TARGET_BUILTIN(__builtin_ia32_pcmpistria128, "iV16cV16cIc","", "sse4.2")
+TARGET_BUILTIN(__builtin_ia32_pcmpistric128, "iV16cV16cIc","", "sse4.2")
+TARGET_BUILTIN(__builtin_ia32_pcmpistrio128, "iV16cV16cIc","", "sse4.2")
+TARGET_BUILTIN(__builtin_ia32_pcmpistris128, "iV16cV16cIc","", "sse4.2")
+TARGET_BUILTIN(__builtin_ia32_pcmpistriz128, "iV16cV16cIc","", "sse4.2")
+TARGET_BUILTIN(__builtin_ia32_pcmpestria128, "iV16ciV16ciIc","", "sse4.2")
+TARGET_BUILTIN(__builtin_ia32_pcmpestric128, "iV16ciV16ciIc","", "sse4.2")
+TARGET_BUILTIN(__builtin_ia32_pcmpestrio128, "iV16ciV16ciIc","", "sse4.2")
+TARGET_BUILTIN(__builtin_ia32_pcmpestris128, "iV16ciV16ciIc","", "sse4.2")
+TARGET_BUILTIN(__builtin_ia32_pcmpestriz128, "iV16ciV16ciIc","", "sse4.2")
+
+TARGET_BUILTIN(__builtin_ia32_crc32qi, "UiUiUc", "", "sse4.2")
+TARGET_BUILTIN(__builtin_ia32_crc32hi, "UiUiUs", "", "sse4.2")
+TARGET_BUILTIN(__builtin_ia32_crc32si, "UiUiUi", "", "sse4.2")
+TARGET_BUILTIN(__builtin_ia32_crc32di, "ULLiULLiULLi", "", "sse4.2")
// SSE4a
-BUILTIN(__builtin_ia32_extrqi, "V2LLiV2LLiIcIc", "")
-BUILTIN(__builtin_ia32_extrq, "V2LLiV2LLiV16c", "")
-BUILTIN(__builtin_ia32_insertqi, "V2LLiV2LLiV2LLiIcIc", "")
-BUILTIN(__builtin_ia32_insertq, "V2LLiV2LLiV2LLi", "")
-BUILTIN(__builtin_ia32_movntsd, "vd*V2d", "")
-BUILTIN(__builtin_ia32_movntss, "vf*V4f", "")
+TARGET_BUILTIN(__builtin_ia32_extrqi, "V2LLiV2LLiIcIc", "", "sse4a")
+TARGET_BUILTIN(__builtin_ia32_extrq, "V2LLiV2LLiV16c", "", "sse4a")
+TARGET_BUILTIN(__builtin_ia32_insertqi, "V2LLiV2LLiV2LLiIcIc", "", "sse4a")
+TARGET_BUILTIN(__builtin_ia32_insertq, "V2LLiV2LLiV2LLi", "", "sse4a")
+TARGET_BUILTIN(__builtin_ia32_movntsd, "vd*V2d", "", "sse4a")
+TARGET_BUILTIN(__builtin_ia32_movntss, "vf*V4f", "", "sse4a")
// AES
-BUILTIN(__builtin_ia32_aesenc128, "V2LLiV2LLiV2LLi", "")
-BUILTIN(__builtin_ia32_aesenclast128, "V2LLiV2LLiV2LLi", "")
-BUILTIN(__builtin_ia32_aesdec128, "V2LLiV2LLiV2LLi", "")
-BUILTIN(__builtin_ia32_aesdeclast128, "V2LLiV2LLiV2LLi", "")
-BUILTIN(__builtin_ia32_aesimc128, "V2LLiV2LLi", "")
-BUILTIN(__builtin_ia32_aeskeygenassist128, "V2LLiV2LLiIc", "")
+TARGET_BUILTIN(__builtin_ia32_aesenc128, "V2LLiV2LLiV2LLi", "", "aes")
+TARGET_BUILTIN(__builtin_ia32_aesenclast128, "V2LLiV2LLiV2LLi", "", "aes")
+TARGET_BUILTIN(__builtin_ia32_aesdec128, "V2LLiV2LLiV2LLi", "", "aes")
+TARGET_BUILTIN(__builtin_ia32_aesdeclast128, "V2LLiV2LLiV2LLi", "", "aes")
+TARGET_BUILTIN(__builtin_ia32_aesimc128, "V2LLiV2LLi", "", "aes")
+TARGET_BUILTIN(__builtin_ia32_aeskeygenassist128, "V2LLiV2LLiIc", "", "aes")
// CLMUL
-BUILTIN(__builtin_ia32_pclmulqdq128, "V2LLiV2LLiV2LLiIc", "")
+TARGET_BUILTIN(__builtin_ia32_pclmulqdq128, "V2LLiV2LLiV2LLiIc", "", "pclmul")
// AVX
-BUILTIN(__builtin_ia32_addsubpd256, "V4dV4dV4d", "")
-BUILTIN(__builtin_ia32_addsubps256, "V8fV8fV8f", "")
-BUILTIN(__builtin_ia32_haddpd256, "V4dV4dV4d", "")
-BUILTIN(__builtin_ia32_hsubps256, "V8fV8fV8f", "")
-BUILTIN(__builtin_ia32_hsubpd256, "V4dV4dV4d", "")
-BUILTIN(__builtin_ia32_haddps256, "V8fV8fV8f", "")
-BUILTIN(__builtin_ia32_maxpd256, "V4dV4dV4d", "")
-BUILTIN(__builtin_ia32_maxps256, "V8fV8fV8f", "")
-BUILTIN(__builtin_ia32_minpd256, "V4dV4dV4d", "")
-BUILTIN(__builtin_ia32_minps256, "V8fV8fV8f", "")
-BUILTIN(__builtin_ia32_vpermilvarpd, "V2dV2dV2LLi", "")
-BUILTIN(__builtin_ia32_vpermilvarps, "V4fV4fV4i", "")
-BUILTIN(__builtin_ia32_vpermilvarpd256, "V4dV4dV4LLi", "")
-BUILTIN(__builtin_ia32_vpermilvarps256, "V8fV8fV8i", "")
-BUILTIN(__builtin_ia32_blendvpd256, "V4dV4dV4dV4d", "")
-BUILTIN(__builtin_ia32_blendvps256, "V8fV8fV8fV8f", "")
-BUILTIN(__builtin_ia32_dpps256, "V8fV8fV8fIc", "")
-BUILTIN(__builtin_ia32_cmppd256, "V4dV4dV4dIc", "")
-BUILTIN(__builtin_ia32_cmpps256, "V8fV8fV8fIc", "")
-BUILTIN(__builtin_ia32_cvtdq2pd256, "V4dV4i", "")
-BUILTIN(__builtin_ia32_cvtdq2ps256, "V8fV8i", "")
-BUILTIN(__builtin_ia32_cvtpd2ps256, "V4fV4d", "")
-BUILTIN(__builtin_ia32_cvtps2dq256, "V8iV8f", "")
-BUILTIN(__builtin_ia32_cvtps2pd256, "V4dV4f", "")
-BUILTIN(__builtin_ia32_cvttpd2dq256, "V4iV4d", "")
-BUILTIN(__builtin_ia32_cvtpd2dq256, "V4iV4d", "")
-BUILTIN(__builtin_ia32_cvttps2dq256, "V8iV8f", "")
-BUILTIN(__builtin_ia32_vperm2f128_pd256, "V4dV4dV4dIc", "")
-BUILTIN(__builtin_ia32_vperm2f128_ps256, "V8fV8fV8fIc", "")
-BUILTIN(__builtin_ia32_vperm2f128_si256, "V8iV8iV8iIc", "")
-BUILTIN(__builtin_ia32_sqrtpd256, "V4dV4d", "")
-BUILTIN(__builtin_ia32_sqrtps256, "V8fV8f", "")
-BUILTIN(__builtin_ia32_rsqrtps256, "V8fV8f", "")
-BUILTIN(__builtin_ia32_rcpps256, "V8fV8f", "")
-BUILTIN(__builtin_ia32_roundpd256, "V4dV4dIi", "")
-BUILTIN(__builtin_ia32_roundps256, "V8fV8fIi", "")
-BUILTIN(__builtin_ia32_vtestzpd, "iV2dV2d", "")
-BUILTIN(__builtin_ia32_vtestcpd, "iV2dV2d", "")
-BUILTIN(__builtin_ia32_vtestnzcpd, "iV2dV2d", "")
-BUILTIN(__builtin_ia32_vtestzps, "iV4fV4f", "")
-BUILTIN(__builtin_ia32_vtestcps, "iV4fV4f", "")
-BUILTIN(__builtin_ia32_vtestnzcps, "iV4fV4f", "")
-BUILTIN(__builtin_ia32_vtestzpd256, "iV4dV4d", "")
-BUILTIN(__builtin_ia32_vtestcpd256, "iV4dV4d", "")
-BUILTIN(__builtin_ia32_vtestnzcpd256, "iV4dV4d", "")
-BUILTIN(__builtin_ia32_vtestzps256, "iV8fV8f", "")
-BUILTIN(__builtin_ia32_vtestcps256, "iV8fV8f", "")
-BUILTIN(__builtin_ia32_vtestnzcps256, "iV8fV8f", "")
-BUILTIN(__builtin_ia32_ptestz256, "iV4LLiV4LLi", "")
-BUILTIN(__builtin_ia32_ptestc256, "iV4LLiV4LLi", "")
-BUILTIN(__builtin_ia32_ptestnzc256, "iV4LLiV4LLi", "")
-BUILTIN(__builtin_ia32_movmskpd256, "iV4d", "")
-BUILTIN(__builtin_ia32_movmskps256, "iV8f", "")
-BUILTIN(__builtin_ia32_vzeroall, "v", "")
-BUILTIN(__builtin_ia32_vzeroupper, "v", "")
-BUILTIN(__builtin_ia32_vbroadcastf128_pd256, "V4dV2dC*", "")
-BUILTIN(__builtin_ia32_vbroadcastf128_ps256, "V8fV4fC*", "")
-BUILTIN(__builtin_ia32_storeupd256, "vd*V4d", "")
-BUILTIN(__builtin_ia32_storeups256, "vf*V8f", "")
-BUILTIN(__builtin_ia32_storedqu256, "vc*V32c", "")
-BUILTIN(__builtin_ia32_lddqu256, "V32ccC*", "")
-BUILTIN(__builtin_ia32_movntdq256, "vV4LLi*V4LLi", "")
-BUILTIN(__builtin_ia32_movntpd256, "vd*V4d", "")
-BUILTIN(__builtin_ia32_movntps256, "vf*V8f", "")
-BUILTIN(__builtin_ia32_maskloadpd, "V2dV2dC*V2d", "")
-BUILTIN(__builtin_ia32_maskloadps, "V4fV4fC*V4f", "")
-BUILTIN(__builtin_ia32_maskloadpd256, "V4dV4dC*V4d", "")
-BUILTIN(__builtin_ia32_maskloadps256, "V8fV8fC*V8f", "")
-BUILTIN(__builtin_ia32_maskstorepd, "vV2d*V2dV2d", "")
-BUILTIN(__builtin_ia32_maskstoreps, "vV4f*V4fV4f", "")
-BUILTIN(__builtin_ia32_maskstorepd256, "vV4d*V4dV4d", "")
-BUILTIN(__builtin_ia32_maskstoreps256, "vV8f*V8fV8f", "")
+TARGET_BUILTIN(__builtin_ia32_addsubpd256, "V4dV4dV4d", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_addsubps256, "V8fV8fV8f", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_haddpd256, "V4dV4dV4d", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_hsubps256, "V8fV8fV8f", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_hsubpd256, "V4dV4dV4d", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_haddps256, "V8fV8fV8f", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_maxpd256, "V4dV4dV4d", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_maxps256, "V8fV8fV8f", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_minpd256, "V4dV4dV4d", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_minps256, "V8fV8fV8f", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_vpermilvarpd, "V2dV2dV2LLi", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_vpermilvarps, "V4fV4fV4i", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_vpermilvarpd256, "V4dV4dV4LLi", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_vpermilvarps256, "V8fV8fV8i", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_blendvpd256, "V4dV4dV4dV4d", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_blendvps256, "V8fV8fV8fV8f", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_dpps256, "V8fV8fV8fIc", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_cmppd256, "V4dV4dV4dIc", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_cmpps256, "V8fV8fV8fIc", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_cvtdq2pd256, "V4dV4i", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_cvtdq2ps256, "V8fV8i", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_cvtpd2ps256, "V4fV4d", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_cvtps2dq256, "V8iV8f", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_cvtps2pd256, "V4dV4f", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_cvttpd2dq256, "V4iV4d", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_cvtpd2dq256, "V4iV4d", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_cvttps2dq256, "V8iV8f", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_vperm2f128_pd256, "V4dV4dV4dIc", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_vperm2f128_ps256, "V8fV8fV8fIc", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_vperm2f128_si256, "V8iV8iV8iIc", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_sqrtpd256, "V4dV4d", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_sqrtps256, "V8fV8f", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_rsqrtps256, "V8fV8f", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_rcpps256, "V8fV8f", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_roundpd256, "V4dV4dIi", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_roundps256, "V8fV8fIi", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_vtestzpd, "iV2dV2d", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_vtestcpd, "iV2dV2d", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_vtestnzcpd, "iV2dV2d", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_vtestzps, "iV4fV4f", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_vtestcps, "iV4fV4f", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_vtestnzcps, "iV4fV4f", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_vtestzpd256, "iV4dV4d", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_vtestcpd256, "iV4dV4d", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_vtestnzcpd256, "iV4dV4d", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_vtestzps256, "iV8fV8f", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_vtestcps256, "iV8fV8f", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_vtestnzcps256, "iV8fV8f", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_ptestz256, "iV4LLiV4LLi", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_ptestc256, "iV4LLiV4LLi", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_ptestnzc256, "iV4LLiV4LLi", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_movmskpd256, "iV4d", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_movmskps256, "iV8f", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_vzeroall, "v", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_vzeroupper, "v", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_vbroadcastf128_pd256, "V4dV2dC*", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_vbroadcastf128_ps256, "V8fV4fC*", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_storeupd256, "vd*V4d", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_storeups256, "vf*V8f", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_storedqu256, "vc*V32c", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_lddqu256, "V32ccC*", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_movntdq256, "vV4LLi*V4LLi", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_movntpd256, "vd*V4d", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_movntps256, "vf*V8f", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_maskloadpd, "V2dV2dC*V2LLi", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_maskloadps, "V4fV4fC*V4i", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_maskloadpd256, "V4dV4dC*V4LLi", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_maskloadps256, "V8fV8fC*V8i", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_maskstorepd, "vV2d*V2LLiV2d", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_maskstoreps, "vV4f*V4iV4f", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_maskstorepd256, "vV4d*V4LLiV4d", "", "avx")
+TARGET_BUILTIN(__builtin_ia32_maskstoreps256, "vV8f*V8iV8f", "", "avx")
// AVX2
-BUILTIN(__builtin_ia32_mpsadbw256, "V32cV32cV32cIc", "")
-BUILTIN(__builtin_ia32_pabsb256, "V32cV32c", "")
-BUILTIN(__builtin_ia32_pabsw256, "V16sV16s", "")
-BUILTIN(__builtin_ia32_pabsd256, "V8iV8i", "")
-BUILTIN(__builtin_ia32_packsswb256, "V32cV16sV16s", "")
-BUILTIN(__builtin_ia32_packssdw256, "V16sV8iV8i", "")
-BUILTIN(__builtin_ia32_packuswb256, "V32cV16sV16s", "")
-BUILTIN(__builtin_ia32_packusdw256, "V16sV8iV8i", "")
-BUILTIN(__builtin_ia32_paddsb256, "V32cV32cV32c", "")
-BUILTIN(__builtin_ia32_paddsw256, "V16sV16sV16s", "")
-BUILTIN(__builtin_ia32_psubsb256, "V32cV32cV32c", "")
-BUILTIN(__builtin_ia32_psubsw256, "V16sV16sV16s", "")
-BUILTIN(__builtin_ia32_paddusb256, "V32cV32cV32c", "")
-BUILTIN(__builtin_ia32_paddusw256, "V16sV16sV16s", "")
-BUILTIN(__builtin_ia32_psubusb256, "V32cV32cV32c", "")
-BUILTIN(__builtin_ia32_psubusw256, "V16sV16sV16s", "")
-BUILTIN(__builtin_ia32_palignr256, "V32cV32cV32cIc", "")
-BUILTIN(__builtin_ia32_pavgb256, "V32cV32cV32c", "")
-BUILTIN(__builtin_ia32_pavgw256, "V16sV16sV16s", "")
-BUILTIN(__builtin_ia32_pblendvb256, "V32cV32cV32cV32c", "")
-BUILTIN(__builtin_ia32_phaddw256, "V16sV16sV16s", "")
-BUILTIN(__builtin_ia32_phaddd256, "V8iV8iV8i", "")
-BUILTIN(__builtin_ia32_phaddsw256, "V16sV16sV16s", "")
-BUILTIN(__builtin_ia32_phsubw256, "V16sV16sV16s", "")
-BUILTIN(__builtin_ia32_phsubd256, "V8iV8iV8i", "")
-BUILTIN(__builtin_ia32_phsubsw256, "V16sV16sV16s", "")
-BUILTIN(__builtin_ia32_pmaddubsw256, "V16sV32cV32c", "")
-BUILTIN(__builtin_ia32_pmaddwd256, "V8iV16sV16s", "")
-BUILTIN(__builtin_ia32_pmaxub256, "V32cV32cV32c", "")
-BUILTIN(__builtin_ia32_pmaxuw256, "V16sV16sV16s", "")
-BUILTIN(__builtin_ia32_pmaxud256, "V8iV8iV8i", "")
-BUILTIN(__builtin_ia32_pmaxsb256, "V32cV32cV32c", "")
-BUILTIN(__builtin_ia32_pmaxsw256, "V16sV16sV16s", "")
-BUILTIN(__builtin_ia32_pmaxsd256, "V8iV8iV8i", "")
-BUILTIN(__builtin_ia32_pminub256, "V32cV32cV32c", "")
-BUILTIN(__builtin_ia32_pminuw256, "V16sV16sV16s", "")
-BUILTIN(__builtin_ia32_pminud256, "V8iV8iV8i", "")
-BUILTIN(__builtin_ia32_pminsb256, "V32cV32cV32c", "")
-BUILTIN(__builtin_ia32_pminsw256, "V16sV16sV16s", "")
-BUILTIN(__builtin_ia32_pminsd256, "V8iV8iV8i", "")
-BUILTIN(__builtin_ia32_pmovmskb256, "iV32c", "")
-BUILTIN(__builtin_ia32_pmovsxbw256, "V16sV16c", "")
-BUILTIN(__builtin_ia32_pmovsxbd256, "V8iV16c", "")
-BUILTIN(__builtin_ia32_pmovsxbq256, "V4LLiV16c", "")
-BUILTIN(__builtin_ia32_pmovsxwd256, "V8iV8s", "")
-BUILTIN(__builtin_ia32_pmovsxwq256, "V4LLiV8s", "")
-BUILTIN(__builtin_ia32_pmovsxdq256, "V4LLiV4i", "")
-BUILTIN(__builtin_ia32_pmovzxbw256, "V16sV16c", "")
-BUILTIN(__builtin_ia32_pmovzxbd256, "V8iV16c", "")
-BUILTIN(__builtin_ia32_pmovzxbq256, "V4LLiV16c", "")
-BUILTIN(__builtin_ia32_pmovzxwd256, "V8iV8s", "")
-BUILTIN(__builtin_ia32_pmovzxwq256, "V4LLiV8s", "")
-BUILTIN(__builtin_ia32_pmovzxdq256, "V4LLiV4i", "")
-BUILTIN(__builtin_ia32_pmuldq256, "V4LLiV8iV8i", "")
-BUILTIN(__builtin_ia32_pmulhrsw256, "V16sV16sV16s", "")
-BUILTIN(__builtin_ia32_pmulhuw256, "V16sV16sV16s", "")
-BUILTIN(__builtin_ia32_pmulhw256, "V16sV16sV16s", "")
-BUILTIN(__builtin_ia32_pmuludq256, "V4LLiV8iV8i", "")
-BUILTIN(__builtin_ia32_psadbw256, "V4LLiV32cV32c", "")
-BUILTIN(__builtin_ia32_pshufb256, "V32cV32cV32c", "")
-BUILTIN(__builtin_ia32_psignb256, "V32cV32cV32c", "")
-BUILTIN(__builtin_ia32_psignw256, "V16sV16sV16s", "")
-BUILTIN(__builtin_ia32_psignd256, "V8iV8iV8i", "")
-BUILTIN(__builtin_ia32_pslldqi256, "V4LLiV4LLiIi", "")
-BUILTIN(__builtin_ia32_psllwi256, "V16sV16si", "")
-BUILTIN(__builtin_ia32_psllw256, "V16sV16sV8s", "")
-BUILTIN(__builtin_ia32_pslldi256, "V8iV8ii", "")
-BUILTIN(__builtin_ia32_pslld256, "V8iV8iV4i", "")
-BUILTIN(__builtin_ia32_psllqi256, "V4LLiV4LLii", "")
-BUILTIN(__builtin_ia32_psllq256, "V4LLiV4LLiV2LLi", "")
-BUILTIN(__builtin_ia32_psrawi256, "V16sV16si", "")
-BUILTIN(__builtin_ia32_psraw256, "V16sV16sV8s", "")
-BUILTIN(__builtin_ia32_psradi256, "V8iV8ii", "")
-BUILTIN(__builtin_ia32_psrad256, "V8iV8iV4i", "")
-BUILTIN(__builtin_ia32_psrldqi256, "V4LLiV4LLiIi", "")
-BUILTIN(__builtin_ia32_psrlwi256, "V16sV16si", "")
-BUILTIN(__builtin_ia32_psrlw256, "V16sV16sV8s", "")
-BUILTIN(__builtin_ia32_psrldi256, "V8iV8ii", "")
-BUILTIN(__builtin_ia32_psrld256, "V8iV8iV4i", "")
-BUILTIN(__builtin_ia32_psrlqi256, "V4LLiV4LLii", "")
-BUILTIN(__builtin_ia32_psrlq256, "V4LLiV4LLiV2LLi", "")
-BUILTIN(__builtin_ia32_movntdqa256, "V4LLiV4LLi*", "")
-BUILTIN(__builtin_ia32_vbroadcastss_ps, "V4fV4f", "")
-BUILTIN(__builtin_ia32_vbroadcastss_ps256, "V8fV4f", "")
-BUILTIN(__builtin_ia32_vbroadcastsd_pd256, "V4dV2d", "")
-BUILTIN(__builtin_ia32_pbroadcastb256, "V32cV16c", "")
-BUILTIN(__builtin_ia32_pbroadcastw256, "V16sV8s", "")
-BUILTIN(__builtin_ia32_pbroadcastd256, "V8iV4i", "")
-BUILTIN(__builtin_ia32_pbroadcastq256, "V4LLiV2LLi", "")
-BUILTIN(__builtin_ia32_pbroadcastb128, "V16cV16c", "")
-BUILTIN(__builtin_ia32_pbroadcastw128, "V8sV8s", "")
-BUILTIN(__builtin_ia32_pbroadcastd128, "V4iV4i", "")
-BUILTIN(__builtin_ia32_pbroadcastq128, "V2LLiV2LLi", "")
-BUILTIN(__builtin_ia32_permvarsi256, "V8iV8iV8i", "")
-BUILTIN(__builtin_ia32_permvarsf256, "V8fV8fV8f", "")
-BUILTIN(__builtin_ia32_permti256, "V4LLiV4LLiV4LLiIc", "")
-BUILTIN(__builtin_ia32_maskloadd256, "V8iV8iC*V8i", "")
-BUILTIN(__builtin_ia32_maskloadq256, "V4LLiV4LLiC*V4LLi", "")
-BUILTIN(__builtin_ia32_maskloadd, "V4iV4iC*V4i", "")
-BUILTIN(__builtin_ia32_maskloadq, "V2LLiV2LLiC*V2LLi", "")
-BUILTIN(__builtin_ia32_maskstored256, "vV8i*V8iV8i", "")
-BUILTIN(__builtin_ia32_maskstoreq256, "vV4LLi*V4LLiV4LLi", "")
-BUILTIN(__builtin_ia32_maskstored, "vV4i*V4iV4i", "")
-BUILTIN(__builtin_ia32_maskstoreq, "vV2LLi*V2LLiV2LLi", "")
-BUILTIN(__builtin_ia32_psllv8si, "V8iV8iV8i", "")
-BUILTIN(__builtin_ia32_psllv4si, "V4iV4iV4i", "")
-BUILTIN(__builtin_ia32_psllv4di, "V4LLiV4LLiV4LLi", "")
-BUILTIN(__builtin_ia32_psllv2di, "V2LLiV2LLiV2LLi", "")
-BUILTIN(__builtin_ia32_psrav8si, "V8iV8iV8i", "")
-BUILTIN(__builtin_ia32_psrav4si, "V4iV4iV4i", "")
-BUILTIN(__builtin_ia32_psrlv8si, "V8iV8iV8i", "")
-BUILTIN(__builtin_ia32_psrlv4si, "V4iV4iV4i", "")
-BUILTIN(__builtin_ia32_psrlv4di, "V4LLiV4LLiV4LLi", "")
-BUILTIN(__builtin_ia32_psrlv2di, "V2LLiV2LLiV2LLi", "")
+TARGET_BUILTIN(__builtin_ia32_mpsadbw256, "V32cV32cV32cIc", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_pabsb256, "V32cV32c", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_pabsw256, "V16sV16s", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_pabsd256, "V8iV8i", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_packsswb256, "V32cV16sV16s", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_packssdw256, "V16sV8iV8i", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_packuswb256, "V32cV16sV16s", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_packusdw256, "V16sV8iV8i", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_paddsb256, "V32cV32cV32c", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_paddsw256, "V16sV16sV16s", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_psubsb256, "V32cV32cV32c", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_psubsw256, "V16sV16sV16s", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_paddusb256, "V32cV32cV32c", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_paddusw256, "V16sV16sV16s", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_psubusb256, "V32cV32cV32c", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_psubusw256, "V16sV16sV16s", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_palignr256, "V32cV32cV32cIc", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_pavgb256, "V32cV32cV32c", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_pavgw256, "V16sV16sV16s", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_pblendvb256, "V32cV32cV32cV32c", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_phaddw256, "V16sV16sV16s", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_phaddd256, "V8iV8iV8i", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_phaddsw256, "V16sV16sV16s", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_phsubw256, "V16sV16sV16s", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_phsubd256, "V8iV8iV8i", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_phsubsw256, "V16sV16sV16s", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_pmaddubsw256, "V16sV32cV32c", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_pmaddwd256, "V8iV16sV16s", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_pmaxub256, "V32cV32cV32c", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_pmaxuw256, "V16sV16sV16s", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_pmaxud256, "V8iV8iV8i", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_pmaxsb256, "V32cV32cV32c", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_pmaxsw256, "V16sV16sV16s", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_pmaxsd256, "V8iV8iV8i", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_pminub256, "V32cV32cV32c", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_pminuw256, "V16sV16sV16s", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_pminud256, "V8iV8iV8i", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_pminsb256, "V32cV32cV32c", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_pminsw256, "V16sV16sV16s", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_pminsd256, "V8iV8iV8i", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_pmovmskb256, "iV32c", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_pmovsxbw256, "V16sV16c", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_pmovsxbd256, "V8iV16c", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_pmovsxbq256, "V4LLiV16c", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_pmovsxwd256, "V8iV8s", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_pmovsxwq256, "V4LLiV8s", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_pmovsxdq256, "V4LLiV4i", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_pmovzxbw256, "V16sV16c", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_pmovzxbd256, "V8iV16c", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_pmovzxbq256, "V4LLiV16c", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_pmovzxwd256, "V8iV8s", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_pmovzxwq256, "V4LLiV8s", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_pmovzxdq256, "V4LLiV4i", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_pmuldq256, "V4LLiV8iV8i", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_pmulhrsw256, "V16sV16sV16s", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_pmulhuw256, "V16sV16sV16s", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_pmulhw256, "V16sV16sV16s", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_pmuludq256, "V4LLiV8iV8i", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_psadbw256, "V4LLiV32cV32c", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_pshufb256, "V32cV32cV32c", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_psignb256, "V32cV32cV32c", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_psignw256, "V16sV16sV16s", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_psignd256, "V8iV8iV8i", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_pslldqi256, "V4LLiV4LLiIi", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_psllwi256, "V16sV16si", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_psllw256, "V16sV16sV8s", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_pslldi256, "V8iV8ii", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_pslld256, "V8iV8iV4i", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_psllqi256, "V4LLiV4LLii", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_psllq256, "V4LLiV4LLiV2LLi", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_psrawi256, "V16sV16si", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_psraw256, "V16sV16sV8s", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_psradi256, "V8iV8ii", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_psrad256, "V8iV8iV4i", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_psrldqi256, "V4LLiV4LLiIi", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_psrlwi256, "V16sV16si", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_psrlw256, "V16sV16sV8s", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_psrldi256, "V8iV8ii", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_psrld256, "V8iV8iV4i", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_psrlqi256, "V4LLiV4LLii", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_psrlq256, "V4LLiV4LLiV2LLi", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_movntdqa256, "V4LLiV4LLiC*", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_permvarsi256, "V8iV8iV8i", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_permvarsf256, "V8fV8fV8i", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_permti256, "V4LLiV4LLiV4LLiIc", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_maskloadd256, "V8iV8iC*V8i", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_maskloadq256, "V4LLiV4LLiC*V4LLi", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_maskloadd, "V4iV4iC*V4i", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_maskloadq, "V2LLiV2LLiC*V2LLi", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_maskstored256, "vV8i*V8iV8i", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_maskstoreq256, "vV4LLi*V4LLiV4LLi", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_maskstored, "vV4i*V4iV4i", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_maskstoreq, "vV2LLi*V2LLiV2LLi", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_psllv8si, "V8iV8iV8i", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_psllv4si, "V4iV4iV4i", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_psllv4di, "V4LLiV4LLiV4LLi", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_psllv2di, "V2LLiV2LLiV2LLi", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_psrav8si, "V8iV8iV8i", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_psrav4si, "V4iV4iV4i", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_psrlv8si, "V8iV8iV8i", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_psrlv4si, "V4iV4iV4i", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_psrlv4di, "V4LLiV4LLiV4LLi", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_psrlv2di, "V2LLiV2LLiV2LLi", "", "avx2")
// GATHER
-BUILTIN(__builtin_ia32_gatherd_pd, "V2dV2dV2dC*V4iV2dIc", "")
-BUILTIN(__builtin_ia32_gatherd_pd256, "V4dV4dV4dC*V4iV4dIc", "")
-BUILTIN(__builtin_ia32_gatherq_pd, "V2dV2dV2dC*V2LLiV2dIc", "")
-BUILTIN(__builtin_ia32_gatherq_pd256, "V4dV4dV4dC*V4LLiV4dIc", "")
-BUILTIN(__builtin_ia32_gatherd_ps, "V4fV4fV4fC*V4iV4fIc", "")
-BUILTIN(__builtin_ia32_gatherd_ps256, "V8fV8fV8fC*V8iV8fIc", "")
-BUILTIN(__builtin_ia32_gatherq_ps, "V4fV4fV4fC*V2LLiV4fIc", "")
-BUILTIN(__builtin_ia32_gatherq_ps256, "V4fV4fV4fC*V4LLiV4fIc", "")
-
-BUILTIN(__builtin_ia32_gatherd_q, "V2LLiV2LLiV2LLiC*V4iV2LLiIc", "")
-BUILTIN(__builtin_ia32_gatherd_q256, "V4LLiV4LLiV4LLiC*V4iV4LLiIc", "")
-BUILTIN(__builtin_ia32_gatherq_q, "V2LLiV2LLiV2LLiC*V2LLiV2LLiIc", "")
-BUILTIN(__builtin_ia32_gatherq_q256, "V4LLiV4LLiV4LLiC*V4LLiV4LLiIc", "")
-BUILTIN(__builtin_ia32_gatherd_d, "V4iV4iV4iC*V4iV4iIc", "")
-BUILTIN(__builtin_ia32_gatherd_d256, "V8iV8iV8iC*V8iV8iIc", "")
-BUILTIN(__builtin_ia32_gatherq_d, "V4iV4iV4iC*V2LLiV4iIc", "")
-BUILTIN(__builtin_ia32_gatherq_d256, "V4iV4iV4iC*V4LLiV4iIc", "")
+TARGET_BUILTIN(__builtin_ia32_gatherd_pd, "V2dV2ddC*V4iV2dIc", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_gatherd_pd256, "V4dV4ddC*V4iV4dIc", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_gatherq_pd, "V2dV2ddC*V2LLiV2dIc", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_gatherq_pd256, "V4dV4ddC*V4LLiV4dIc", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_gatherd_ps, "V4fV4ffC*V4iV4fIc", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_gatherd_ps256, "V8fV8ffC*V8iV8fIc", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_gatherq_ps, "V4fV4ffC*V2LLiV4fIc", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_gatherq_ps256, "V4fV4ffC*V4LLiV4fIc", "", "avx2")
+
+TARGET_BUILTIN(__builtin_ia32_gatherd_q, "V2LLiV2LLiLLiC*V4iV2LLiIc", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_gatherd_q256, "V4LLiV4LLiLLiC*V4iV4LLiIc", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_gatherq_q, "V2LLiV2LLiLLiC*V2LLiV2LLiIc", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_gatherq_q256, "V4LLiV4LLiLLiC*V4LLiV4LLiIc", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_gatherd_d, "V4iV4iiC*V4iV4iIc", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_gatherd_d256, "V8iV8iiC*V8iV8iIc", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_gatherq_d, "V4iV4iiC*V2LLiV4iIc", "", "avx2")
+TARGET_BUILTIN(__builtin_ia32_gatherq_d256, "V4iV4iiC*V4LLiV4iIc", "", "avx2")
// F16C
-BUILTIN(__builtin_ia32_vcvtps2ph, "V8sV4fIi", "")
-BUILTIN(__builtin_ia32_vcvtps2ph256, "V8sV8fIi", "")
-BUILTIN(__builtin_ia32_vcvtps2ph512, "V16sV16fIi", "")
-BUILTIN(__builtin_ia32_vcvtph2ps, "V4fV8s", "")
-BUILTIN(__builtin_ia32_vcvtph2ps256, "V8fV8s", "")
-BUILTIN(__builtin_ia32_vcvtph2ps512, "V16fV16s", "")
+TARGET_BUILTIN(__builtin_ia32_vcvtps2ph, "V8sV4fIi", "", "f16c")
+TARGET_BUILTIN(__builtin_ia32_vcvtps2ph256, "V8sV8fIi", "", "f16c")
+TARGET_BUILTIN(__builtin_ia32_vcvtps2ph512, "V16sV16fIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_vcvtph2ps, "V4fV8s", "", "f16c")
+TARGET_BUILTIN(__builtin_ia32_vcvtph2ps256, "V8fV8s", "", "f16c")
+TARGET_BUILTIN(__builtin_ia32_vcvtph2ps512, "V16fV16s", "", "avx512f")
// RDRAND
-BUILTIN(__builtin_ia32_rdrand16_step, "UiUs*", "")
-BUILTIN(__builtin_ia32_rdrand32_step, "UiUi*", "")
-BUILTIN(__builtin_ia32_rdrand64_step, "UiULLi*", "")
+TARGET_BUILTIN(__builtin_ia32_rdrand16_step, "UiUs*", "", "rdrnd")
+TARGET_BUILTIN(__builtin_ia32_rdrand32_step, "UiUi*", "", "rdrnd")
+TARGET_BUILTIN(__builtin_ia32_rdrand64_step, "UiULLi*", "", "rdrnd")
// FSGSBASE
-BUILTIN(__builtin_ia32_rdfsbase32, "Ui", "")
-BUILTIN(__builtin_ia32_rdfsbase64, "ULLi", "")
-BUILTIN(__builtin_ia32_rdgsbase32, "Ui", "")
-BUILTIN(__builtin_ia32_rdgsbase64, "ULLi", "")
-BUILTIN(__builtin_ia32_wrfsbase32, "vUi", "")
-BUILTIN(__builtin_ia32_wrfsbase64, "vULLi", "")
-BUILTIN(__builtin_ia32_wrgsbase32, "vUi", "")
-BUILTIN(__builtin_ia32_wrgsbase64, "vULLi", "")
+TARGET_BUILTIN(__builtin_ia32_rdfsbase32, "Ui", "", "fsgsbase")
+TARGET_BUILTIN(__builtin_ia32_rdfsbase64, "ULLi", "", "fsgsbase")
+TARGET_BUILTIN(__builtin_ia32_rdgsbase32, "Ui", "", "fsgsbase")
+TARGET_BUILTIN(__builtin_ia32_rdgsbase64, "ULLi", "", "fsgsbase")
+TARGET_BUILTIN(__builtin_ia32_wrfsbase32, "vUi", "", "fsgsbase")
+TARGET_BUILTIN(__builtin_ia32_wrfsbase64, "vULLi", "", "fsgsbase")
+TARGET_BUILTIN(__builtin_ia32_wrgsbase32, "vUi", "", "fsgsbase")
+TARGET_BUILTIN(__builtin_ia32_wrgsbase64, "vULLi", "", "fsgsbase")
// FXSR
-BUILTIN(__builtin_ia32_fxrstor, "vv*", "")
-BUILTIN(__builtin_ia32_fxrstor64, "vv*", "")
-BUILTIN(__builtin_ia32_fxsave, "vv*", "")
-BUILTIN(__builtin_ia32_fxsave64, "vv*", "")
+TARGET_BUILTIN(__builtin_ia32_fxrstor, "vv*", "", "fxsr")
+TARGET_BUILTIN(__builtin_ia32_fxrstor64, "vv*", "", "fxsr")
+TARGET_BUILTIN(__builtin_ia32_fxsave, "vv*", "", "fxsr")
+TARGET_BUILTIN(__builtin_ia32_fxsave64, "vv*", "", "fxsr")
+
+// XSAVE
+TARGET_BUILTIN(__builtin_ia32_xsave, "vv*ULLi", "", "xsave")
+TARGET_BUILTIN(__builtin_ia32_xsave64, "vv*ULLi", "", "xsave")
+TARGET_BUILTIN(__builtin_ia32_xrstor, "vv*ULLi", "", "xsave")
+TARGET_BUILTIN(__builtin_ia32_xrstor64, "vv*ULLi", "", "xsave")
+TARGET_BUILTIN(__builtin_ia32_xsaveopt, "vv*ULLi", "", "xsaveopt")
+TARGET_BUILTIN(__builtin_ia32_xsaveopt64, "vv*ULLi", "", "xsaveopt")
+TARGET_BUILTIN(__builtin_ia32_xrstors, "vv*ULLi", "", "xsaves")
+TARGET_BUILTIN(__builtin_ia32_xrstors64, "vv*ULLi", "", "xsaves")
+TARGET_BUILTIN(__builtin_ia32_xsavec, "vv*ULLi", "", "xsavec")
+TARGET_BUILTIN(__builtin_ia32_xsavec64, "vv*ULLi", "", "xsavec")
+TARGET_BUILTIN(__builtin_ia32_xsaves, "vv*ULLi", "", "xsaves")
+TARGET_BUILTIN(__builtin_ia32_xsaves64, "vv*ULLi", "", "xsaves")
// ADX
-BUILTIN(__builtin_ia32_addcarryx_u32, "UcUcUiUiUi*", "")
-BUILTIN(__builtin_ia32_addcarryx_u64, "UcUcULLiULLiULLi*", "")
-BUILTIN(__builtin_ia32_addcarry_u32, "UcUcUiUiUi*", "")
-BUILTIN(__builtin_ia32_addcarry_u64, "UcUcULLiULLiULLi*", "")
-BUILTIN(__builtin_ia32_subborrow_u32, "UcUcUiUiUi*", "")
-BUILTIN(__builtin_ia32_subborrow_u64, "UcUcULLiULLiULLi*", "")
+TARGET_BUILTIN(__builtin_ia32_addcarryx_u32, "UcUcUiUiUi*", "", "adx")
+TARGET_BUILTIN(__builtin_ia32_addcarryx_u64, "UcUcULLiULLiULLi*", "", "adx")
+TARGET_BUILTIN(__builtin_ia32_addcarry_u32, "UcUcUiUiUi*", "", "adx")
+TARGET_BUILTIN(__builtin_ia32_addcarry_u64, "UcUcULLiULLiULLi*", "", "adx")
+TARGET_BUILTIN(__builtin_ia32_subborrow_u32, "UcUcUiUiUi*", "", "adx")
+TARGET_BUILTIN(__builtin_ia32_subborrow_u64, "UcUcULLiULLiULLi*", "", "adx")
// RDSEED
-BUILTIN(__builtin_ia32_rdseed16_step, "UiUs*", "")
-BUILTIN(__builtin_ia32_rdseed32_step, "UiUi*", "")
-BUILTIN(__builtin_ia32_rdseed64_step, "UiULLi*", "")
+TARGET_BUILTIN(__builtin_ia32_rdseed16_step, "UiUs*", "", "rdseed")
+TARGET_BUILTIN(__builtin_ia32_rdseed32_step, "UiUi*", "", "rdseed")
+TARGET_BUILTIN(__builtin_ia32_rdseed64_step, "UiULLi*", "", "rdseed")
// BMI
-BUILTIN(__builtin_ia32_bextr_u32, "UiUiUi", "")
-BUILTIN(__builtin_ia32_bextr_u64, "ULLiULLiULLi", "")
+TARGET_BUILTIN(__builtin_ia32_bextr_u32, "UiUiUi", "", "bmi")
+TARGET_BUILTIN(__builtin_ia32_bextr_u64, "ULLiULLiULLi", "", "bmi")
// BMI2
-BUILTIN(__builtin_ia32_bzhi_si, "UiUiUi", "")
-BUILTIN(__builtin_ia32_bzhi_di, "ULLiULLiULLi", "")
-BUILTIN(__builtin_ia32_pdep_si, "UiUiUi", "")
-BUILTIN(__builtin_ia32_pdep_di, "ULLiULLiULLi", "")
-BUILTIN(__builtin_ia32_pext_si, "UiUiUi", "")
-BUILTIN(__builtin_ia32_pext_di, "ULLiULLiULLi", "")
+TARGET_BUILTIN(__builtin_ia32_bzhi_si, "UiUiUi", "", "bmi2")
+TARGET_BUILTIN(__builtin_ia32_bzhi_di, "ULLiULLiULLi", "", "bmi2")
+TARGET_BUILTIN(__builtin_ia32_pdep_si, "UiUiUi", "", "bmi2")
+TARGET_BUILTIN(__builtin_ia32_pdep_di, "ULLiULLiULLi", "", "bmi2")
+TARGET_BUILTIN(__builtin_ia32_pext_si, "UiUiUi", "", "bmi2")
+TARGET_BUILTIN(__builtin_ia32_pext_di, "ULLiULLiULLi", "", "bmi2")
// TBM
-BUILTIN(__builtin_ia32_bextri_u32, "UiUiIUi", "")
-BUILTIN(__builtin_ia32_bextri_u64, "ULLiULLiIULLi", "")
+TARGET_BUILTIN(__builtin_ia32_bextri_u32, "UiUiIUi", "", "tbm")
+TARGET_BUILTIN(__builtin_ia32_bextri_u64, "ULLiULLiIULLi", "", "tbm")
// SHA
-BUILTIN(__builtin_ia32_sha1rnds4, "V4iV4iV4iIc", "")
-BUILTIN(__builtin_ia32_sha1nexte, "V4iV4iV4i", "")
-BUILTIN(__builtin_ia32_sha1msg1, "V4iV4iV4i", "")
-BUILTIN(__builtin_ia32_sha1msg2, "V4iV4iV4i", "")
-BUILTIN(__builtin_ia32_sha256rnds2, "V4iV4iV4iV4i", "")
-BUILTIN(__builtin_ia32_sha256msg1, "V4iV4iV4i", "")
-BUILTIN(__builtin_ia32_sha256msg2, "V4iV4iV4i", "")
+TARGET_BUILTIN(__builtin_ia32_sha1rnds4, "V4iV4iV4iIc", "", "sha")
+TARGET_BUILTIN(__builtin_ia32_sha1nexte, "V4iV4iV4i", "", "sha")
+TARGET_BUILTIN(__builtin_ia32_sha1msg1, "V4iV4iV4i", "", "sha")
+TARGET_BUILTIN(__builtin_ia32_sha1msg2, "V4iV4iV4i", "", "sha")
+TARGET_BUILTIN(__builtin_ia32_sha256rnds2, "V4iV4iV4iV4i", "", "sha")
+TARGET_BUILTIN(__builtin_ia32_sha256msg1, "V4iV4iV4i", "", "sha")
+TARGET_BUILTIN(__builtin_ia32_sha256msg2, "V4iV4iV4i", "", "sha")
// FMA
-BUILTIN(__builtin_ia32_vfmaddps, "V4fV4fV4fV4f", "")
-BUILTIN(__builtin_ia32_vfmaddpd, "V2dV2dV2dV2d", "")
-BUILTIN(__builtin_ia32_vfmaddss, "V4fV4fV4fV4f", "")
-BUILTIN(__builtin_ia32_vfmaddsd, "V2dV2dV2dV2d", "")
-BUILTIN(__builtin_ia32_vfmsubps, "V4fV4fV4fV4f", "")
-BUILTIN(__builtin_ia32_vfmsubpd, "V2dV2dV2dV2d", "")
-BUILTIN(__builtin_ia32_vfmsubss, "V4fV4fV4fV4f", "")
-BUILTIN(__builtin_ia32_vfmsubsd, "V2dV2dV2dV2d", "")
-BUILTIN(__builtin_ia32_vfnmaddps, "V4fV4fV4fV4f", "")
-BUILTIN(__builtin_ia32_vfnmaddpd, "V2dV2dV2dV2d", "")
-BUILTIN(__builtin_ia32_vfnmaddss, "V4fV4fV4fV4f", "")
-BUILTIN(__builtin_ia32_vfnmaddsd, "V2dV2dV2dV2d", "")
-BUILTIN(__builtin_ia32_vfnmsubps, "V4fV4fV4fV4f", "")
-BUILTIN(__builtin_ia32_vfnmsubpd, "V2dV2dV2dV2d", "")
-BUILTIN(__builtin_ia32_vfnmsubss, "V4fV4fV4fV4f", "")
-BUILTIN(__builtin_ia32_vfnmsubsd, "V2dV2dV2dV2d", "")
-BUILTIN(__builtin_ia32_vfmaddsubps, "V4fV4fV4fV4f", "")
-BUILTIN(__builtin_ia32_vfmaddsubpd, "V2dV2dV2dV2d", "")
-BUILTIN(__builtin_ia32_vfmsubaddps, "V4fV4fV4fV4f", "")
-BUILTIN(__builtin_ia32_vfmsubaddpd, "V2dV2dV2dV2d", "")
-BUILTIN(__builtin_ia32_vfmaddps256, "V8fV8fV8fV8f", "")
-BUILTIN(__builtin_ia32_vfmaddpd256, "V4dV4dV4dV4d", "")
-BUILTIN(__builtin_ia32_vfmsubps256, "V8fV8fV8fV8f", "")
-BUILTIN(__builtin_ia32_vfmsubpd256, "V4dV4dV4dV4d", "")
-BUILTIN(__builtin_ia32_vfnmaddps256, "V8fV8fV8fV8f", "")
-BUILTIN(__builtin_ia32_vfnmaddpd256, "V4dV4dV4dV4d", "")
-BUILTIN(__builtin_ia32_vfnmsubps256, "V8fV8fV8fV8f", "")
-BUILTIN(__builtin_ia32_vfnmsubpd256, "V4dV4dV4dV4d", "")
-BUILTIN(__builtin_ia32_vfmaddsubps256, "V8fV8fV8fV8f", "")
-BUILTIN(__builtin_ia32_vfmaddsubpd256, "V4dV4dV4dV4d", "")
-BUILTIN(__builtin_ia32_vfmsubaddps256, "V8fV8fV8fV8f", "")
-BUILTIN(__builtin_ia32_vfmsubaddpd256, "V4dV4dV4dV4d", "")
-BUILTIN(__builtin_ia32_vfmaddpd128_mask, "V2dV2dV2dV2dUc", "")
-BUILTIN(__builtin_ia32_vfmaddpd128_mask3, "V2dV2dV2dV2dUc", "")
-BUILTIN(__builtin_ia32_vfmaddpd128_maskz, "V2dV2dV2dV2dUc", "")
-BUILTIN(__builtin_ia32_vfmaddpd256_mask, "V4dV4dV4dV4dUc", "")
-BUILTIN(__builtin_ia32_vfmaddpd256_mask3, "V4dV4dV4dV4dUc", "")
-BUILTIN(__builtin_ia32_vfmaddpd256_maskz, "V4dV4dV4dV4dUc", "")
-BUILTIN(__builtin_ia32_vfmaddpd512_mask, "V8dV8dV8dV8dUcIi", "")
-BUILTIN(__builtin_ia32_vfmaddpd512_mask3, "V8dV8dV8dV8dUcIi", "")
-BUILTIN(__builtin_ia32_vfmaddpd512_maskz, "V8dV8dV8dV8dUcIi", "")
-BUILTIN(__builtin_ia32_vfmaddps128_mask, "V4fV4fV4fV4fUc", "")
-BUILTIN(__builtin_ia32_vfmaddps128_mask3, "V4fV4fV4fV4fUc", "")
-BUILTIN(__builtin_ia32_vfmaddps128_maskz, "V4fV4fV4fV4fUc", "")
-BUILTIN(__builtin_ia32_vfmaddps256_mask, "V8fV8fV8fV8fUc", "")
-BUILTIN(__builtin_ia32_vfmaddps256_mask3, "V8fV8fV8fV8fUc", "")
-BUILTIN(__builtin_ia32_vfmaddps256_maskz, "V8fV8fV8fV8fUc", "")
-BUILTIN(__builtin_ia32_vfmaddps512_mask, "V16fV16fV16fV16fUsIi", "")
-BUILTIN(__builtin_ia32_vfmaddps512_mask3, "V16fV16fV16fV16fUsIi", "")
-BUILTIN(__builtin_ia32_vfmaddps512_maskz, "V16fV16fV16fV16fUsIi", "")
-BUILTIN(__builtin_ia32_vfmaddsubpd128_mask, "V2dV2dV2dV2dUc", "")
-BUILTIN(__builtin_ia32_vfmaddsubpd128_mask3, "V2dV2dV2dV2dUc", "")
-BUILTIN(__builtin_ia32_vfmaddsubpd128_maskz, "V2dV2dV2dV2dUc", "")
-BUILTIN(__builtin_ia32_vfmaddsubpd256_mask, "V4dV4dV4dV4dUc", "")
-BUILTIN(__builtin_ia32_vfmaddsubpd256_mask3, "V4dV4dV4dV4dUc", "")
-BUILTIN(__builtin_ia32_vfmaddsubpd256_maskz, "V4dV4dV4dV4dUc", "")
-BUILTIN(__builtin_ia32_vfmaddsubpd512_mask, "V8dV8dV8dV8dUcIi", "")
-BUILTIN(__builtin_ia32_vfmaddsubpd512_mask3, "V8dV8dV8dV8dUcIi", "")
-BUILTIN(__builtin_ia32_vfmaddsubpd512_maskz, "V8dV8dV8dV8dUcIi", "")
-BUILTIN(__builtin_ia32_vfmaddsubps128_mask, "V4fV4fV4fV4fUc", "")
-BUILTIN(__builtin_ia32_vfmaddsubps128_mask3, "V4fV4fV4fV4fUc", "")
-BUILTIN(__builtin_ia32_vfmaddsubps128_maskz, "V4fV4fV4fV4fUc", "")
-BUILTIN(__builtin_ia32_vfmaddsubps256_mask, "V8fV8fV8fV8fUc", "")
-BUILTIN(__builtin_ia32_vfmaddsubps256_mask3, "V8fV8fV8fV8fUc", "")
-BUILTIN(__builtin_ia32_vfmaddsubps256_maskz, "V8fV8fV8fV8fUc", "")
-BUILTIN(__builtin_ia32_vfmaddsubps512_mask, "V16fV16fV16fV16fUsIi", "")
-BUILTIN(__builtin_ia32_vfmaddsubps512_mask3, "V16fV16fV16fV16fUsIi", "")
-BUILTIN(__builtin_ia32_vfmaddsubps512_maskz, "V16fV16fV16fV16fUsIi", "")
-BUILTIN(__builtin_ia32_vfmsubpd128_mask3, "V2dV2dV2dV2dUc", "")
-BUILTIN(__builtin_ia32_vfmsubpd256_mask3, "V4dV4dV4dV4dUc", "")
-BUILTIN(__builtin_ia32_vfmsubpd512_mask3, "V8dV8dV8dV8dUcIi", "")
-BUILTIN(__builtin_ia32_vfmsubps128_mask3, "V4fV4fV4fV4fUc", "")
-BUILTIN(__builtin_ia32_vfmsubps256_mask3, "V8fV8fV8fV8fUc", "")
-BUILTIN(__builtin_ia32_vfmsubps512_mask3, "V16fV16fV16fV16fUsIi", "")
-BUILTIN(__builtin_ia32_vfmsubaddpd128_mask3, "V2dV2dV2dV2dUc", "")
-BUILTIN(__builtin_ia32_vfmsubaddpd256_mask3, "V4dV4dV4dV4dUc", "")
-BUILTIN(__builtin_ia32_vfmsubaddpd512_mask3, "V8dV8dV8dV8dUcIi", "")
-BUILTIN(__builtin_ia32_vfmsubaddps128_mask3, "V4fV4fV4fV4fUc", "")
-BUILTIN(__builtin_ia32_vfmsubaddps256_mask3, "V8fV8fV8fV8fUc", "")
-BUILTIN(__builtin_ia32_vfmsubaddps512_mask3, "V16fV16fV16fV16fUsIi", "")
-BUILTIN(__builtin_ia32_vfnmaddpd128_mask, "V2dV2dV2dV2dUc", "")
-BUILTIN(__builtin_ia32_vfnmaddpd256_mask, "V4dV4dV4dV4dUc", "")
-BUILTIN(__builtin_ia32_vfnmaddpd512_mask, "V8dV8dV8dV8dUcIi", "")
-BUILTIN(__builtin_ia32_vfnmaddps128_mask, "V4fV4fV4fV4fUc", "")
-BUILTIN(__builtin_ia32_vfnmaddps256_mask, "V8fV8fV8fV8fUc", "")
-BUILTIN(__builtin_ia32_vfnmaddps512_mask, "V16fV16fV16fV16fUsIi", "")
-BUILTIN(__builtin_ia32_vfnmsubpd128_mask, "V2dV2dV2dV2dUc", "")
-BUILTIN(__builtin_ia32_vfnmsubpd128_mask3, "V2dV2dV2dV2dUc", "")
-BUILTIN(__builtin_ia32_vfnmsubpd256_mask, "V4dV4dV4dV4dUc", "")
-BUILTIN(__builtin_ia32_vfnmsubpd256_mask3, "V4dV4dV4dV4dUc", "")
-BUILTIN(__builtin_ia32_vfnmsubpd512_mask, "V8dV8dV8dV8dUcIi", "")
-BUILTIN(__builtin_ia32_vfnmsubpd512_mask3, "V8dV8dV8dV8dUcIi", "")
-BUILTIN(__builtin_ia32_vfnmsubps128_mask, "V4fV4fV4fV4fUc", "")
-BUILTIN(__builtin_ia32_vfnmsubps128_mask3, "V4fV4fV4fV4fUc", "")
-BUILTIN(__builtin_ia32_vfnmsubps256_mask, "V8fV8fV8fV8fUc", "")
-BUILTIN(__builtin_ia32_vfnmsubps256_mask3, "V8fV8fV8fV8fUc", "")
-BUILTIN(__builtin_ia32_vfnmsubps512_mask, "V16fV16fV16fV16fUsIi", "")
-BUILTIN(__builtin_ia32_vfnmsubps512_mask3, "V16fV16fV16fV16fUsIi", "")
+TARGET_BUILTIN(__builtin_ia32_vfmaddps, "V4fV4fV4fV4f", "", "fma|fma4")
+TARGET_BUILTIN(__builtin_ia32_vfmaddpd, "V2dV2dV2dV2d", "", "fma|fma4")
+TARGET_BUILTIN(__builtin_ia32_vfmaddss, "V4fV4fV4fV4f", "", "fma|fma4")
+TARGET_BUILTIN(__builtin_ia32_vfmaddsd, "V2dV2dV2dV2d", "", "fma|fma4")
+TARGET_BUILTIN(__builtin_ia32_vfmsubps, "V4fV4fV4fV4f", "", "fma|fma4")
+TARGET_BUILTIN(__builtin_ia32_vfmsubpd, "V2dV2dV2dV2d", "", "fma|fma4")
+TARGET_BUILTIN(__builtin_ia32_vfmsubss, "V4fV4fV4fV4f", "", "fma|fma4")
+TARGET_BUILTIN(__builtin_ia32_vfmsubsd, "V2dV2dV2dV2d", "", "fma|fma4")
+TARGET_BUILTIN(__builtin_ia32_vfnmaddps, "V4fV4fV4fV4f", "", "fma|fma4")
+TARGET_BUILTIN(__builtin_ia32_vfnmaddpd, "V2dV2dV2dV2d", "", "fma|fma4")
+TARGET_BUILTIN(__builtin_ia32_vfnmaddss, "V4fV4fV4fV4f", "", "fma|fma4")
+TARGET_BUILTIN(__builtin_ia32_vfnmaddsd, "V2dV2dV2dV2d", "", "fma|fma4")
+TARGET_BUILTIN(__builtin_ia32_vfnmsubps, "V4fV4fV4fV4f", "", "fma|fma4")
+TARGET_BUILTIN(__builtin_ia32_vfnmsubpd, "V2dV2dV2dV2d", "", "fma|fma4")
+TARGET_BUILTIN(__builtin_ia32_vfnmsubss, "V4fV4fV4fV4f", "", "fma|fma4")
+TARGET_BUILTIN(__builtin_ia32_vfnmsubsd, "V2dV2dV2dV2d", "", "fma|fma4")
+TARGET_BUILTIN(__builtin_ia32_vfmaddsubps, "V4fV4fV4fV4f", "", "fma|fma4")
+TARGET_BUILTIN(__builtin_ia32_vfmaddsubpd, "V2dV2dV2dV2d", "", "fma|fma4")
+TARGET_BUILTIN(__builtin_ia32_vfmsubaddps, "V4fV4fV4fV4f", "", "fma|fma4")
+TARGET_BUILTIN(__builtin_ia32_vfmsubaddpd, "V2dV2dV2dV2d", "", "fma|fma4")
+TARGET_BUILTIN(__builtin_ia32_vfmaddps256, "V8fV8fV8fV8f", "", "fma|fma4")
+TARGET_BUILTIN(__builtin_ia32_vfmaddpd256, "V4dV4dV4dV4d", "", "fma|fma4")
+TARGET_BUILTIN(__builtin_ia32_vfmsubps256, "V8fV8fV8fV8f", "", "fma|fma4")
+TARGET_BUILTIN(__builtin_ia32_vfmsubpd256, "V4dV4dV4dV4d", "", "fma|fma4")
+TARGET_BUILTIN(__builtin_ia32_vfnmaddps256, "V8fV8fV8fV8f", "", "fma|fma4")
+TARGET_BUILTIN(__builtin_ia32_vfnmaddpd256, "V4dV4dV4dV4d", "", "fma|fma4")
+TARGET_BUILTIN(__builtin_ia32_vfnmsubps256, "V8fV8fV8fV8f", "", "fma|fma4")
+TARGET_BUILTIN(__builtin_ia32_vfnmsubpd256, "V4dV4dV4dV4d", "", "fma|fma4")
+TARGET_BUILTIN(__builtin_ia32_vfmaddsubps256, "V8fV8fV8fV8f", "", "fma|fma4")
+TARGET_BUILTIN(__builtin_ia32_vfmaddsubpd256, "V4dV4dV4dV4d", "", "fma|fma4")
+TARGET_BUILTIN(__builtin_ia32_vfmsubaddps256, "V8fV8fV8fV8f", "", "fma|fma4")
+TARGET_BUILTIN(__builtin_ia32_vfmsubaddpd256, "V4dV4dV4dV4d", "", "fma|fma4")
+
+TARGET_BUILTIN(__builtin_ia32_vfmaddpd128_mask, "V2dV2dV2dV2dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vfmaddpd128_mask3, "V2dV2dV2dV2dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vfmaddpd128_maskz, "V2dV2dV2dV2dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vfmaddpd256_mask, "V4dV4dV4dV4dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vfmaddpd256_mask3, "V4dV4dV4dV4dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vfmaddpd256_maskz, "V4dV4dV4dV4dUc", "", "avx512vl")
+
+TARGET_BUILTIN(__builtin_ia32_vfmaddpd512_mask, "V8dV8dV8dV8dUcIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_vfmaddpd512_mask3, "V8dV8dV8dV8dUcIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_vfmaddpd512_maskz, "V8dV8dV8dV8dUcIi", "", "avx512f")
+
+TARGET_BUILTIN(__builtin_ia32_vfmaddps128_mask, "V4fV4fV4fV4fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vfmaddps128_mask3, "V4fV4fV4fV4fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vfmaddps128_maskz, "V4fV4fV4fV4fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vfmaddps256_mask, "V8fV8fV8fV8fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vfmaddps256_mask3, "V8fV8fV8fV8fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vfmaddps256_maskz, "V8fV8fV8fV8fUc", "", "avx512vl")
+
+TARGET_BUILTIN(__builtin_ia32_vfmaddps512_mask, "V16fV16fV16fV16fUsIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_vfmaddps512_mask3, "V16fV16fV16fV16fUsIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_vfmaddps512_maskz, "V16fV16fV16fV16fUsIi", "", "avx512f")
+
+TARGET_BUILTIN(__builtin_ia32_vfmaddsubpd128_mask, "V2dV2dV2dV2dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vfmaddsubpd128_mask3, "V2dV2dV2dV2dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vfmaddsubpd128_maskz, "V2dV2dV2dV2dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vfmaddsubpd256_mask, "V4dV4dV4dV4dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vfmaddsubpd256_mask3, "V4dV4dV4dV4dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vfmaddsubpd256_maskz, "V4dV4dV4dV4dUc", "", "avx512vl")
+
+TARGET_BUILTIN(__builtin_ia32_vfmaddsubpd512_mask, "V8dV8dV8dV8dUcIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_vfmaddsubpd512_mask3, "V8dV8dV8dV8dUcIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_vfmaddsubpd512_maskz, "V8dV8dV8dV8dUcIi", "", "avx512f")
+
+TARGET_BUILTIN(__builtin_ia32_vfmaddsubps128_mask, "V4fV4fV4fV4fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vfmaddsubps128_mask3, "V4fV4fV4fV4fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vfmaddsubps128_maskz, "V4fV4fV4fV4fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vfmaddsubps256_mask, "V8fV8fV8fV8fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vfmaddsubps256_mask3, "V8fV8fV8fV8fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vfmaddsubps256_maskz, "V8fV8fV8fV8fUc", "", "avx512vl")
+
+TARGET_BUILTIN(__builtin_ia32_vfmaddsubps512_mask, "V16fV16fV16fV16fUsIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_vfmaddsubps512_mask3, "V16fV16fV16fV16fUsIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_vfmaddsubps512_maskz, "V16fV16fV16fV16fUsIi", "", "avx512f")
+
+TARGET_BUILTIN(__builtin_ia32_vfmsubpd128_mask3, "V2dV2dV2dV2dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vfmsubpd256_mask3, "V4dV4dV4dV4dUc", "", "avx512vl")
+
+TARGET_BUILTIN(__builtin_ia32_vfmsubpd512_mask3, "V8dV8dV8dV8dUcIi", "", "avx512f")
+
+TARGET_BUILTIN(__builtin_ia32_vfmsubps128_mask3, "V4fV4fV4fV4fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vfmsubps256_mask3, "V8fV8fV8fV8fUc", "", "avx512vl")
+
+TARGET_BUILTIN(__builtin_ia32_vfmsubps512_mask3, "V16fV16fV16fV16fUsIi", "", "avx512f")
+
+TARGET_BUILTIN(__builtin_ia32_vfmsubaddpd128_mask3, "V2dV2dV2dV2dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vfmsubaddpd256_mask3, "V4dV4dV4dV4dUc", "", "avx512vl")
+
+TARGET_BUILTIN(__builtin_ia32_vfmsubaddpd512_mask3, "V8dV8dV8dV8dUcIi", "", "avx512f")
+
+TARGET_BUILTIN(__builtin_ia32_vfmsubaddps128_mask3, "V4fV4fV4fV4fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vfmsubaddps256_mask3, "V8fV8fV8fV8fUc", "", "avx512vl")
+
+TARGET_BUILTIN(__builtin_ia32_vfmsubaddps512_mask3, "V16fV16fV16fV16fUsIi", "", "avx512f")
+
+TARGET_BUILTIN(__builtin_ia32_vfnmaddpd128_mask, "V2dV2dV2dV2dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vfnmaddpd256_mask, "V4dV4dV4dV4dUc", "", "avx512vl")
+
+TARGET_BUILTIN(__builtin_ia32_vfnmaddpd512_mask, "V8dV8dV8dV8dUcIi", "", "avx512f")
+
+TARGET_BUILTIN(__builtin_ia32_vfnmaddps128_mask, "V4fV4fV4fV4fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vfnmaddps256_mask, "V8fV8fV8fV8fUc", "", "avx512vl")
+
+TARGET_BUILTIN(__builtin_ia32_vfnmaddps512_mask, "V16fV16fV16fV16fUsIi", "", "avx512f")
+
+TARGET_BUILTIN(__builtin_ia32_vfnmsubpd128_mask, "V2dV2dV2dV2dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vfnmsubpd128_mask3, "V2dV2dV2dV2dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vfnmsubpd256_mask, "V4dV4dV4dV4dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vfnmsubpd256_mask3, "V4dV4dV4dV4dUc", "", "avx512vl")
+
+TARGET_BUILTIN(__builtin_ia32_vfnmsubpd512_mask, "V8dV8dV8dV8dUcIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_vfnmsubpd512_mask3, "V8dV8dV8dV8dUcIi", "", "avx512f")
+
+TARGET_BUILTIN(__builtin_ia32_vfnmsubps128_mask, "V4fV4fV4fV4fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vfnmsubps128_mask3, "V4fV4fV4fV4fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vfnmsubps256_mask, "V8fV8fV8fV8fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vfnmsubps256_mask3, "V8fV8fV8fV8fUc", "", "avx512vl")
+
+TARGET_BUILTIN(__builtin_ia32_vfnmsubps512_mask, "V16fV16fV16fV16fUsIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_vfnmsubps512_mask3, "V16fV16fV16fV16fUsIi", "", "avx512f")
// XOP
-BUILTIN(__builtin_ia32_vpmacssww, "V8sV8sV8sV8s", "")
-BUILTIN(__builtin_ia32_vpmacsww, "V8sV8sV8sV8s", "")
-BUILTIN(__builtin_ia32_vpmacsswd, "V4iV8sV8sV4i", "")
-BUILTIN(__builtin_ia32_vpmacswd, "V4iV8sV8sV4i", "")
-BUILTIN(__builtin_ia32_vpmacssdd, "V4iV4iV4iV4i", "")
-BUILTIN(__builtin_ia32_vpmacsdd, "V4iV4iV4iV4i", "")
-BUILTIN(__builtin_ia32_vpmacssdql, "V2LLiV4iV4iV2LLi", "")
-BUILTIN(__builtin_ia32_vpmacsdql, "V2LLiV4iV4iV2LLi", "")
-BUILTIN(__builtin_ia32_vpmacssdqh, "V2LLiV4iV4iV2LLi", "")
-BUILTIN(__builtin_ia32_vpmacsdqh, "V2LLiV4iV4iV2LLi", "")
-BUILTIN(__builtin_ia32_vpmadcsswd, "V4iV8sV8sV4i", "")
-BUILTIN(__builtin_ia32_vpmadcswd, "V4iV8sV8sV4i", "")
-
-BUILTIN(__builtin_ia32_vphaddbw, "V8sV16c", "")
-BUILTIN(__builtin_ia32_vphaddbd, "V4iV16c", "")
-BUILTIN(__builtin_ia32_vphaddbq, "V2LLiV16c", "")
-BUILTIN(__builtin_ia32_vphaddwd, "V4iV8s", "")
-BUILTIN(__builtin_ia32_vphaddwq, "V2LLiV8s", "")
-BUILTIN(__builtin_ia32_vphadddq, "V2LLiV4i", "")
-BUILTIN(__builtin_ia32_vphaddubw, "V8sV16c", "")
-BUILTIN(__builtin_ia32_vphaddubd, "V4iV16c", "")
-BUILTIN(__builtin_ia32_vphaddubq, "V2LLiV16c", "")
-BUILTIN(__builtin_ia32_vphadduwd, "V4iV8s", "")
-BUILTIN(__builtin_ia32_vphadduwq, "V2LLiV8s", "")
-BUILTIN(__builtin_ia32_vphaddudq, "V2LLiV4i", "")
-BUILTIN(__builtin_ia32_vphsubbw, "V8sV16c", "")
-BUILTIN(__builtin_ia32_vphsubwd, "V4iV8s", "")
-BUILTIN(__builtin_ia32_vphsubdq, "V2LLiV4i", "")
-BUILTIN(__builtin_ia32_vpcmov, "V2LLiV2LLiV2LLiV2LLi", "")
-BUILTIN(__builtin_ia32_vpcmov_256, "V4LLiV4LLiV4LLiV4LLi", "")
-BUILTIN(__builtin_ia32_vpperm, "V16cV16cV16cV16c", "")
-BUILTIN(__builtin_ia32_vprotb, "V16cV16cV16c", "")
-BUILTIN(__builtin_ia32_vprotw, "V8sV8sV8s", "")
-BUILTIN(__builtin_ia32_vprotd, "V4iV4iV4i", "")
-BUILTIN(__builtin_ia32_vprotq, "V2LLiV2LLiV2LLi", "")
-BUILTIN(__builtin_ia32_vprotbi, "V16cV16cIc", "")
-BUILTIN(__builtin_ia32_vprotwi, "V8sV8sIc", "")
-BUILTIN(__builtin_ia32_vprotdi, "V4iV4iIc", "")
-BUILTIN(__builtin_ia32_vprotqi, "V2LLiV2LLiIc", "")
-BUILTIN(__builtin_ia32_vpshlb, "V16cV16cV16c", "")
-BUILTIN(__builtin_ia32_vpshlw, "V8sV8sV8s", "")
-BUILTIN(__builtin_ia32_vpshld, "V4iV4iV4i", "")
-BUILTIN(__builtin_ia32_vpshlq, "V2LLiV2LLiV2LLi", "")
-BUILTIN(__builtin_ia32_vpshab, "V16cV16cV16c", "")
-BUILTIN(__builtin_ia32_vpshaw, "V8sV8sV8s", "")
-BUILTIN(__builtin_ia32_vpshad, "V4iV4iV4i", "")
-BUILTIN(__builtin_ia32_vpshaq, "V2LLiV2LLiV2LLi", "")
-BUILTIN(__builtin_ia32_vpcomub, "V16cV16cV16cIc", "")
-BUILTIN(__builtin_ia32_vpcomuw, "V8sV8sV8sIc", "")
-BUILTIN(__builtin_ia32_vpcomud, "V4iV4iV4iIc", "")
-BUILTIN(__builtin_ia32_vpcomuq, "V2LLiV2LLiV2LLiIc", "")
-BUILTIN(__builtin_ia32_vpcomb, "V16cV16cV16cIc", "")
-BUILTIN(__builtin_ia32_vpcomw, "V8sV8sV8sIc", "")
-BUILTIN(__builtin_ia32_vpcomd, "V4iV4iV4iIc", "")
-BUILTIN(__builtin_ia32_vpcomq, "V2LLiV2LLiV2LLiIc", "")
-BUILTIN(__builtin_ia32_vpermil2pd, "V2dV2dV2dV2LLiIc", "")
-BUILTIN(__builtin_ia32_vpermil2pd256, "V4dV4dV4dV4LLiIc", "")
-BUILTIN(__builtin_ia32_vpermil2ps, "V4fV4fV4fV4iIc", "")
-BUILTIN(__builtin_ia32_vpermil2ps256, "V8fV8fV8fV8iIc", "")
-BUILTIN(__builtin_ia32_vfrczss, "V4fV4f", "")
-BUILTIN(__builtin_ia32_vfrczsd, "V2dV2d", "")
-BUILTIN(__builtin_ia32_vfrczps, "V4fV4f", "")
-BUILTIN(__builtin_ia32_vfrczpd, "V2dV2d", "")
-BUILTIN(__builtin_ia32_vfrczps256, "V8fV8f", "")
-BUILTIN(__builtin_ia32_vfrczpd256, "V4dV4d", "")
-BUILTIN(__builtin_ia32_xbegin, "i", "")
-BUILTIN(__builtin_ia32_xend, "v", "")
-BUILTIN(__builtin_ia32_xabort, "vIc", "")
-BUILTIN(__builtin_ia32_xtest, "i", "")
+TARGET_BUILTIN(__builtin_ia32_vpmacssww, "V8sV8sV8sV8s", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vpmacsww, "V8sV8sV8sV8s", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vpmacsswd, "V4iV8sV8sV4i", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vpmacswd, "V4iV8sV8sV4i", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vpmacssdd, "V4iV4iV4iV4i", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vpmacsdd, "V4iV4iV4iV4i", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vpmacssdql, "V2LLiV4iV4iV2LLi", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vpmacsdql, "V2LLiV4iV4iV2LLi", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vpmacssdqh, "V2LLiV4iV4iV2LLi", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vpmacsdqh, "V2LLiV4iV4iV2LLi", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vpmadcsswd, "V4iV8sV8sV4i", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vpmadcswd, "V4iV8sV8sV4i", "", "xop")
+
+TARGET_BUILTIN(__builtin_ia32_vphaddbw, "V8sV16c", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vphaddbd, "V4iV16c", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vphaddbq, "V2LLiV16c", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vphaddwd, "V4iV8s", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vphaddwq, "V2LLiV8s", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vphadddq, "V2LLiV4i", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vphaddubw, "V8sV16c", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vphaddubd, "V4iV16c", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vphaddubq, "V2LLiV16c", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vphadduwd, "V4iV8s", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vphadduwq, "V2LLiV8s", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vphaddudq, "V2LLiV4i", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vphsubbw, "V8sV16c", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vphsubwd, "V4iV8s", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vphsubdq, "V2LLiV4i", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vpcmov, "V2LLiV2LLiV2LLiV2LLi", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vpcmov_256, "V4LLiV4LLiV4LLiV4LLi", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vpperm, "V16cV16cV16cV16c", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vprotb, "V16cV16cV16c", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vprotw, "V8sV8sV8s", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vprotd, "V4iV4iV4i", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vprotq, "V2LLiV2LLiV2LLi", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vprotbi, "V16cV16cIc", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vprotwi, "V8sV8sIc", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vprotdi, "V4iV4iIc", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vprotqi, "V2LLiV2LLiIc", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vpshlb, "V16cV16cV16c", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vpshlw, "V8sV8sV8s", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vpshld, "V4iV4iV4i", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vpshlq, "V2LLiV2LLiV2LLi", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vpshab, "V16cV16cV16c", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vpshaw, "V8sV8sV8s", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vpshad, "V4iV4iV4i", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vpshaq, "V2LLiV2LLiV2LLi", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vpcomub, "V16cV16cV16cIc", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vpcomuw, "V8sV8sV8sIc", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vpcomud, "V4iV4iV4iIc", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vpcomuq, "V2LLiV2LLiV2LLiIc", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vpcomb, "V16cV16cV16cIc", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vpcomw, "V8sV8sV8sIc", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vpcomd, "V4iV4iV4iIc", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vpcomq, "V2LLiV2LLiV2LLiIc", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vpermil2pd, "V2dV2dV2dV2LLiIc", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vpermil2pd256, "V4dV4dV4dV4LLiIc", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vpermil2ps, "V4fV4fV4fV4iIc", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vpermil2ps256, "V8fV8fV8fV8iIc", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vfrczss, "V4fV4f", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vfrczsd, "V2dV2d", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vfrczps, "V4fV4f", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vfrczpd, "V2dV2d", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vfrczps256, "V8fV8f", "", "xop")
+TARGET_BUILTIN(__builtin_ia32_vfrczpd256, "V4dV4d", "", "xop")
+
+TARGET_BUILTIN(__builtin_ia32_xbegin, "i", "", "rtm")
+TARGET_BUILTIN(__builtin_ia32_xend, "v", "", "rtm")
+TARGET_BUILTIN(__builtin_ia32_xabort, "vIc", "", "rtm")
+TARGET_BUILTIN(__builtin_ia32_xtest, "i", "", "rtm")
+
BUILTIN(__builtin_ia32_rdpmc, "ULLii", "")
BUILTIN(__builtin_ia32_rdtsc, "ULLi", "")
BUILTIN(__builtin_ia32_rdtscp, "ULLiUi*", "")
// AVX-512
-BUILTIN(__builtin_ia32_sqrtpd512_mask, "V8dV8dV8dUcIi", "")
-BUILTIN(__builtin_ia32_sqrtps512_mask, "V16fV16fV16fUsIi", "")
-BUILTIN(__builtin_ia32_rsqrt14sd_mask, "V2dV2dV2dV2dUc", "")
-BUILTIN(__builtin_ia32_rsqrt14ss_mask, "V4fV4fV4fV4fUc", "")
-BUILTIN(__builtin_ia32_rsqrt14pd512_mask, "V8dV8dV8dUc", "")
-BUILTIN(__builtin_ia32_rsqrt14ps512_mask, "V16fV16fV16fUs", "")
-BUILTIN(__builtin_ia32_rsqrt28sd_mask, "V2dV2dV2dV2dUcIi", "")
-BUILTIN(__builtin_ia32_rsqrt28ss_mask, "V4fV4fV4fV4fUcIi", "")
-BUILTIN(__builtin_ia32_rsqrt28pd_mask, "V8dV8dV8dUcIi", "")
-BUILTIN(__builtin_ia32_rsqrt28ps_mask, "V16fV16fV16fUsIi", "")
-BUILTIN(__builtin_ia32_rcp14sd_mask, "V2dV2dV2dV2dUc", "")
-BUILTIN(__builtin_ia32_rcp14ss_mask, "V4fV4fV4fV4fUc", "")
-BUILTIN(__builtin_ia32_rcp14pd512_mask, "V8dV8dV8dUc", "")
-BUILTIN(__builtin_ia32_rcp14ps512_mask, "V16fV16fV16fUs", "")
-BUILTIN(__builtin_ia32_rcp28sd_mask, "V2dV2dV2dV2dUcIi", "")
-BUILTIN(__builtin_ia32_rcp28ss_mask, "V4fV4fV4fV4fUcIi", "")
-BUILTIN(__builtin_ia32_rcp28pd_mask, "V8dV8dV8dUcIi", "")
-BUILTIN(__builtin_ia32_rcp28ps_mask, "V16fV16fV16fUsIi", "")
-BUILTIN(__builtin_ia32_exp2pd_mask, "V8dV8dV8dUcIi", "")
-BUILTIN(__builtin_ia32_exp2ps_mask, "V16fV16fV16fUsIi", "")
-BUILTIN(__builtin_ia32_cvttps2dq512_mask, "V16iV16fV16iUsIi", "")
-BUILTIN(__builtin_ia32_cvttps2udq512_mask, "V16iV16fV16iUsIi", "")
-BUILTIN(__builtin_ia32_cvttpd2dq512_mask, "V8iV8dV8iUcIi", "")
-BUILTIN(__builtin_ia32_cvttpd2udq512_mask, "V8iV8dV8iUcIi", "")
-BUILTIN(__builtin_ia32_cmpps512_mask, "UsV16fV16fIiUsIi", "")
-BUILTIN(__builtin_ia32_cmpps256_mask, "UcV8fV8fIiUc", "")
-BUILTIN(__builtin_ia32_cmpps128_mask, "UcV4fV4fIiUc", "")
-BUILTIN(__builtin_ia32_pcmpeqb512_mask, "LLiV64cV64cLLi", "")
-BUILTIN(__builtin_ia32_pcmpeqd512_mask, "sV16iV16is", "")
-BUILTIN(__builtin_ia32_pcmpeqq512_mask, "cV8LLiV8LLic", "")
-BUILTIN(__builtin_ia32_pcmpeqw512_mask, "iV32sV32si", "")
-BUILTIN(__builtin_ia32_pcmpeqb256_mask, "iV32cV32ci", "")
-BUILTIN(__builtin_ia32_pcmpeqd256_mask, "cV8iV8ic", "")
-BUILTIN(__builtin_ia32_pcmpeqq256_mask, "cV4LLiV4LLic", "")
-BUILTIN(__builtin_ia32_pcmpeqw256_mask, "sV16sV16ss", "")
-BUILTIN(__builtin_ia32_pcmpeqb128_mask, "sV16cV16cs", "")
-BUILTIN(__builtin_ia32_pcmpeqd128_mask, "cV4iV4ic", "")
-BUILTIN(__builtin_ia32_pcmpeqq128_mask, "cV2LLiV2LLic", "")
-BUILTIN(__builtin_ia32_pcmpeqw128_mask, "cV8sV8sc", "")
-BUILTIN(__builtin_ia32_pcmpgtb512_mask, "LLiV64cV64cLLi", "")
-BUILTIN(__builtin_ia32_pcmpgtd512_mask, "sV16iV16is", "")
-BUILTIN(__builtin_ia32_pcmpgtq512_mask, "cV8LLiV8LLic", "")
-BUILTIN(__builtin_ia32_pcmpgtw512_mask, "iV32sV32si", "")
-BUILTIN(__builtin_ia32_pcmpgtb256_mask, "iV32cV32ci", "")
-BUILTIN(__builtin_ia32_pcmpgtd256_mask, "cV8iV8ic", "")
-BUILTIN(__builtin_ia32_pcmpgtq256_mask, "cV4LLiV4LLic", "")
-BUILTIN(__builtin_ia32_pcmpgtw256_mask, "sV16sV16ss", "")
-BUILTIN(__builtin_ia32_pcmpgtb128_mask, "sV16cV16cs", "")
-BUILTIN(__builtin_ia32_pcmpgtd128_mask, "cV4iV4ic", "")
-BUILTIN(__builtin_ia32_pcmpgtq128_mask, "cV2LLiV2LLic", "")
-BUILTIN(__builtin_ia32_pcmpgtw128_mask, "cV8sV8sc", "")
-BUILTIN(__builtin_ia32_cmppd512_mask, "UcV8dV8dIiUcIi", "")
-BUILTIN(__builtin_ia32_cmppd256_mask, "UcV4dV4dIiUc", "")
-BUILTIN(__builtin_ia32_cmppd128_mask, "UcV2dV2dIiUc", "")
-BUILTIN(__builtin_ia32_rndscaleps_mask, "V16fV16fIiV16fUsIi", "")
-BUILTIN(__builtin_ia32_rndscalepd_mask, "V8dV8dIiV8dUcIi", "")
-BUILTIN(__builtin_ia32_cvtps2dq512_mask, "V16iV16fV16iUsIi", "")
-BUILTIN(__builtin_ia32_cvtpd2dq512_mask, "V8iV8dV8iUcIi", "")
-BUILTIN(__builtin_ia32_cvtps2udq512_mask, "V16iV16fV16iUsIi", "")
-BUILTIN(__builtin_ia32_cvtpd2udq512_mask, "V8iV8dV8iUcIi", "")
-BUILTIN(__builtin_ia32_minps512_mask, "V16fV16fV16fV16fUsIi", "")
-BUILTIN(__builtin_ia32_minpd512_mask, "V8dV8dV8dV8dUcIi", "")
-BUILTIN(__builtin_ia32_maxps512_mask, "V16fV16fV16fV16fUsIi", "")
-BUILTIN(__builtin_ia32_maxpd512_mask, "V8dV8dV8dV8dUcIi", "")
-BUILTIN(__builtin_ia32_cvtdq2ps512_mask, "V16fV16iV16fUsIi", "")
-BUILTIN(__builtin_ia32_cvtudq2ps512_mask, "V16fV16iV16fUsIi", "")
-BUILTIN(__builtin_ia32_cvtdq2pd512_mask, "V8dV8iV8dUc", "")
-BUILTIN(__builtin_ia32_cvtudq2pd512_mask, "V8dV8iV8dUc", "")
-BUILTIN(__builtin_ia32_cvtpd2ps512_mask, "V8fV8dV8fUcIi", "")
-BUILTIN(__builtin_ia32_vcvtps2ph512_mask, "V16sV16fIiV16sUs", "")
-BUILTIN(__builtin_ia32_vcvtph2ps512_mask, "V16fV16sV16fUsIi", "")
-BUILTIN(__builtin_ia32_pandd512_mask, "V16iV16iV16iV16iUs", "")
-BUILTIN(__builtin_ia32_pandq512_mask, "V8LLiV8LLiV8LLiV8LLiUc", "")
-BUILTIN(__builtin_ia32_pord512_mask, "V16iV16iV16iV16iUs", "")
-BUILTIN(__builtin_ia32_porq512_mask, "V8LLiV8LLiV8LLiV8LLiUc", "")
-BUILTIN(__builtin_ia32_pxord512_mask, "V16iV16iV16iV16iUs", "")
-BUILTIN(__builtin_ia32_pxorq512_mask, "V8LLiV8LLiV8LLiV8LLiUc", "")
-BUILTIN(__builtin_ia32_pabsd512_mask, "V16iV16iV16iUs", "")
-BUILTIN(__builtin_ia32_pabsq512_mask, "V8LLiV8LLiV8LLiUc", "")
-BUILTIN(__builtin_ia32_pmaxsd512_mask, "V16iV16iV16iV16iUs", "")
-BUILTIN(__builtin_ia32_pmaxsq512_mask, "V8LLiV8LLiV8LLiV8LLiUc", "")
-BUILTIN(__builtin_ia32_pmaxud512_mask, "V16iV16iV16iV16iUs", "")
-BUILTIN(__builtin_ia32_pmaxuq512_mask, "V8LLiV8LLiV8LLiV8LLiUc", "")
-BUILTIN(__builtin_ia32_pminsd512_mask, "V16iV16iV16iV16iUs", "")
-BUILTIN(__builtin_ia32_pminsq512_mask, "V8LLiV8LLiV8LLiV8LLiUc", "")
-BUILTIN(__builtin_ia32_pminud512_mask, "V16iV16iV16iV16iUs", "")
-BUILTIN(__builtin_ia32_pminuq512_mask, "V8LLiV8LLiV8LLiV8LLiUc", "")
-BUILTIN(__builtin_ia32_pmuldq512_mask, "V8LLiV16iV16iV8LLiUc", "")
-BUILTIN(__builtin_ia32_pmuludq512_mask, "V8LLiV16iV16iV8LLiUc", "")
-BUILTIN(__builtin_ia32_blendmd_512_mask, "V16iV16iV16iUs", "")
-BUILTIN(__builtin_ia32_blendmq_512_mask, "V8LLiV8LLiV8LLiUc", "")
-BUILTIN(__builtin_ia32_blendmps_512_mask, "V16fV16fV16fUs", "")
-BUILTIN(__builtin_ia32_blendmpd_512_mask, "V8dV8dV8dUc", "")
-BUILTIN(__builtin_ia32_ptestmd512, "UsV16iV16iUs", "")
-BUILTIN(__builtin_ia32_ptestmq512, "UcV8LLiV8LLiUc", "")
-BUILTIN(__builtin_ia32_pbroadcastd512_gpr_mask, "V16iiV16iUs", "")
-BUILTIN(__builtin_ia32_pbroadcastq512_gpr_mask, "V8LLiLLiV8LLiUc", "")
-BUILTIN(__builtin_ia32_pbroadcastq512_mem_mask, "V8LLiLLiV8LLiUc", "")
-BUILTIN(__builtin_ia32_loaddqusi512_mask, "V16ivC*V16iUs", "")
-BUILTIN(__builtin_ia32_loaddqudi512_mask, "V8LLivC*V8LLiUc", "")
-BUILTIN(__builtin_ia32_loadups512_mask, "V16fvC*V16fUs", "")
-BUILTIN(__builtin_ia32_loadaps512_mask, "V16fvC*V16fUs", "")
-BUILTIN(__builtin_ia32_loadupd512_mask, "V8dvC*V8dUc", "")
-BUILTIN(__builtin_ia32_loadapd512_mask, "V8dvC*V8dUc", "")
-BUILTIN(__builtin_ia32_storedqudi512_mask, "vv*V8LLiUc", "")
-BUILTIN(__builtin_ia32_storedqusi512_mask, "vv*V16iUs", "")
-BUILTIN(__builtin_ia32_storeupd512_mask, "vv*V8dUc", "")
-BUILTIN(__builtin_ia32_storeapd512_mask, "vv*V8dUc", "")
-BUILTIN(__builtin_ia32_storeups512_mask, "vv*V16fUs", "")
-BUILTIN(__builtin_ia32_storeaps512_mask, "vv*V16fUs", "")
-BUILTIN(__builtin_ia32_vpermt2vard512_mask, "V16iV16iV16iV16iUs", "")
-BUILTIN(__builtin_ia32_vpermt2varq512_mask, "V8LLiV8LLiV8LLiV8LLiUc", "")
-BUILTIN(__builtin_ia32_vpermt2varps512_mask, "V16fV16iV16fV16fUs", "")
-BUILTIN(__builtin_ia32_vpermt2varpd512_mask, "V8dV8LLiV8dV8dUc", "")
-BUILTIN(__builtin_ia32_alignq512_mask, "V8LLiV8LLiV8LLiIcV8LLiUc", "")
-BUILTIN(__builtin_ia32_alignd512_mask, "V16iV16iV16iIcV16iUs", "")
-BUILTIN(__builtin_ia32_extractf64x4_mask, "V4dV8dIcV4dUc", "")
-BUILTIN(__builtin_ia32_extractf32x4_mask, "V4fV16fIcV4fUc", "")
-BUILTIN(__builtin_ia32_gathersiv8df, "V8dV8dvC*V8iUcIi", "")
-BUILTIN(__builtin_ia32_gathersiv16sf, "V16fV16fvC*UsIi", "")
-BUILTIN(__builtin_ia32_gatherdiv8df, "V8dV8dvC*V8LLiUcIi", "")
-BUILTIN(__builtin_ia32_gatherdiv16sf, "V8fV8fvC*V8LLiUcIi", "")
-BUILTIN(__builtin_ia32_gathersiv8di, "V8LLiV8LLivC*V8iUcIi", "")
-BUILTIN(__builtin_ia32_gathersiv16si, "V16iV16ivC*UsIi", "")
-BUILTIN(__builtin_ia32_gatherdiv8di, "V8LLiV8LLivC*V8LLiUcIi", "")
-BUILTIN(__builtin_ia32_gatherdiv16si, "V8iV8ivC*V8LLiUcIi", "")
-BUILTIN(__builtin_ia32_scattersiv8df, "vv*UcV8iV8dIi", "")
-BUILTIN(__builtin_ia32_scattersiv16sf, "vv*UsV16iV16fIi", "")
-BUILTIN(__builtin_ia32_scatterdiv8df, "vv*UcV8LLiV8dIi", "")
-BUILTIN(__builtin_ia32_scatterdiv16sf, "vv*UcV8LLiV8fIi", "")
-BUILTIN(__builtin_ia32_scattersiv8di, "vv*UcV8iV8LLiIi", "")
-BUILTIN(__builtin_ia32_scattersiv16si, "vv*UsV16iV16iIi", "")
-BUILTIN(__builtin_ia32_scatterdiv8di, "vv*UcV8LLiV8LLiIi", "")
-BUILTIN(__builtin_ia32_scatterdiv16si, "vv*UcV8LLiV8iIi", "")
-BUILTIN(__builtin_ia32_gatherpfdpd, "vUcV8ivC*IiIi", "")
-BUILTIN(__builtin_ia32_gatherpfdps, "vUsV16ivC*IiIi", "")
-BUILTIN(__builtin_ia32_gatherpfqpd, "vUcV8LLivC*IiIi", "")
-BUILTIN(__builtin_ia32_gatherpfqps, "vUcV8LLivC*IiIi", "")
-BUILTIN(__builtin_ia32_scatterpfdpd, "vUcV8iv*IiIi", "")
-BUILTIN(__builtin_ia32_scatterpfdps, "vUsV16iv*IiIi", "")
-BUILTIN(__builtin_ia32_scatterpfqpd, "vUcV8LLiv*IiIi", "")
-BUILTIN(__builtin_ia32_scatterpfqps, "vUcV8LLiv*IiIi", "")
-BUILTIN(__builtin_ia32_knothi, "UsUs", "")
-
-BUILTIN(__builtin_ia32_cmpb128_mask, "UsV16cV16cIiUs", "")
-BUILTIN(__builtin_ia32_cmpd128_mask, "UcV4iV4iIiUc", "")
-BUILTIN(__builtin_ia32_cmpq128_mask, "UcV2LLiV2LLiIiUc", "")
-BUILTIN(__builtin_ia32_cmpw128_mask, "UcV8sV8sIiUc", "")
-BUILTIN(__builtin_ia32_cmpb256_mask, "UiV32cV32cIiUi", "")
-BUILTIN(__builtin_ia32_cmpd256_mask, "UcV8iV8iIiUc", "")
-BUILTIN(__builtin_ia32_cmpq256_mask, "UcV4LLiV4LLiIiUc", "")
-BUILTIN(__builtin_ia32_cmpw256_mask, "UsV16sV16sIiUs", "")
-BUILTIN(__builtin_ia32_cmpb512_mask, "ULLiV64cV64cIiULLi", "")
-BUILTIN(__builtin_ia32_cmpd512_mask, "UsV16iV16iIiUs", "")
-BUILTIN(__builtin_ia32_cmpq512_mask, "UcV8LLiV8LLiIiUc", "")
-BUILTIN(__builtin_ia32_cmpw512_mask, "UiV32sV32sIiUi", "")
-BUILTIN(__builtin_ia32_ucmpb128_mask, "UsV16cV16cIiUs", "")
-BUILTIN(__builtin_ia32_ucmpd128_mask, "UcV4iV4iIiUc", "")
-BUILTIN(__builtin_ia32_ucmpq128_mask, "UcV2LLiV2LLiIiUc", "")
-BUILTIN(__builtin_ia32_ucmpw128_mask, "UcV8sV8sIiUc", "")
-BUILTIN(__builtin_ia32_ucmpb256_mask, "UiV32cV32cIiUi", "")
-BUILTIN(__builtin_ia32_ucmpd256_mask, "UcV8iV8iIiUc", "")
-BUILTIN(__builtin_ia32_ucmpq256_mask, "UcV4LLiV4LLiIiUc", "")
-BUILTIN(__builtin_ia32_ucmpw256_mask, "UsV16sV16sIiUs", "")
-BUILTIN(__builtin_ia32_ucmpb512_mask, "ULLiV64cV64cIiULLi", "")
-BUILTIN(__builtin_ia32_ucmpd512_mask, "UsV16iV16iIiUs", "")
-BUILTIN(__builtin_ia32_ucmpq512_mask, "UcV8LLiV8LLiIiUc", "")
-BUILTIN(__builtin_ia32_ucmpw512_mask, "UiV32sV32sIiUi", "")
-
-BUILTIN(__builtin_ia32_paddd256_mask, "V8iV8iV8iV8iUc", "")
-BUILTIN(__builtin_ia32_paddq256_mask, "V4LLiV4LLiV4LLiV4LLiUc", "")
-BUILTIN(__builtin_ia32_psubd256_mask, "V8iV8iV8iV8iUc", "")
-BUILTIN(__builtin_ia32_psubq256_mask, "V4LLiV4LLiV4LLiV4LLiUc", "")
-BUILTIN(__builtin_ia32_paddd128_mask, "V4iV4iV4iV4iUc", "")
-BUILTIN(__builtin_ia32_paddq128_mask, "V2LLiV2LLiV2LLiV2LLiUc", "")
-BUILTIN(__builtin_ia32_psubd128_mask, "V4iV4iV4iV4iUc", "")
-BUILTIN(__builtin_ia32_psubq128_mask, "V2LLiV2LLiV2LLiV2LLiUc", "")
-BUILTIN(__builtin_ia32_pmuldq256_mask, "V4LLiV8iV8iV4LLiUc", "")
-BUILTIN(__builtin_ia32_pmuldq128_mask, "V2LLiV4iV4iV2LLiUc", "")
-BUILTIN(__builtin_ia32_pmuludq256_mask, "V4LLiV8iV8iV4LLiUc", "")
-BUILTIN(__builtin_ia32_pmuludq128_mask, "V2LLiV4iV4iV2LLiUc", "")
-BUILTIN(__builtin_ia32_pmulld256_mask, "V8iV8iV8iV8iUc", "")
-BUILTIN(__builtin_ia32_pmulld128_mask, "V4iV4iV4iV4iUc", "")
-BUILTIN(__builtin_ia32_pandd256_mask, "V8iV8iV8iV8iUc", "")
-BUILTIN(__builtin_ia32_pandd128_mask, "V4iV4iV4iV4iUc", "")
-BUILTIN(__builtin_ia32_pandnd256_mask, "V8iV8iV8iV8iUc", "")
-BUILTIN(__builtin_ia32_pandnd128_mask, "V4iV4iV4iV4iUc", "")
-BUILTIN(__builtin_ia32_pord256_mask, "V8iV8iV8iV8iUc", "")
-BUILTIN(__builtin_ia32_pord128_mask, "V4iV4iV4iV4iUc", "")
-BUILTIN(__builtin_ia32_pxord256_mask, "V8iV8iV8iV8iUc", "")
-BUILTIN(__builtin_ia32_pxord128_mask, "V4iV4iV4iV4iUc", "")
-BUILTIN(__builtin_ia32_pandq256_mask, "V4LLiV4LLiV4LLiV4LLiUc", "")
-BUILTIN(__builtin_ia32_pandq128_mask, "V2LLiV2LLiV2LLiV2LLiUc", "")
-BUILTIN(__builtin_ia32_pandnq256_mask, "V4LLiV4LLiV4LLiV4LLiUc", "")
-BUILTIN(__builtin_ia32_pandnq128_mask, "V2LLiV2LLiV2LLiV2LLiUc", "")
-BUILTIN(__builtin_ia32_porq256_mask, "V4LLiV4LLiV4LLiV4LLiUc", "")
-BUILTIN(__builtin_ia32_porq128_mask, "V2LLiV2LLiV2LLiV2LLiUc", "")
-BUILTIN(__builtin_ia32_pxorq256_mask, "V4LLiV4LLiV4LLiV4LLiUc", "")
-BUILTIN(__builtin_ia32_pxorq128_mask, "V2LLiV2LLiV2LLiV2LLiUc", "")
-BUILTIN(__builtin_ia32_paddb512_mask, "V64cV64cV64cV64cULLi", "")
-BUILTIN(__builtin_ia32_psubb512_mask, "V64cV64cV64cV64cULLi", "")
-BUILTIN(__builtin_ia32_paddw512_mask, "V32sV32sV32sV32sUi", "")
-BUILTIN(__builtin_ia32_psubw512_mask, "V32sV32sV32sV32sUi", "")
-BUILTIN(__builtin_ia32_pmullw512_mask, "V32sV32sV32sV32sUi", "")
-BUILTIN(__builtin_ia32_paddb256_mask, "V32cV32cV32cV32cUi", "")
-BUILTIN(__builtin_ia32_paddw256_mask, "V16sV16sV16sV16sUs", "")
-BUILTIN(__builtin_ia32_psubb256_mask, "V32cV32cV32cV32cUi", "")
-BUILTIN(__builtin_ia32_psubw256_mask, "V16sV16sV16sV16sUs", "")
-BUILTIN(__builtin_ia32_paddb128_mask, "V16cV16cV16cV16cUs", "")
-BUILTIN(__builtin_ia32_paddw128_mask, "V8sV8sV8sV8sUc", "")
-BUILTIN(__builtin_ia32_psubb128_mask, "V16cV16cV16cV16cUs", "")
-BUILTIN(__builtin_ia32_psubw128_mask, "V8sV8sV8sV8sUc", "")
-BUILTIN(__builtin_ia32_pmullw256_mask, "V16sV16sV16sV16sUs", "")
-BUILTIN(__builtin_ia32_pmullw128_mask, "V8sV8sV8sV8sUc", "")
-BUILTIN(__builtin_ia32_pandnd512_mask, "V16iV16iV16iV16iUs", "")
-BUILTIN(__builtin_ia32_pandnq512_mask, "V8LLiV8LLiV8LLiV8LLiUc", "")
-BUILTIN(__builtin_ia32_paddq512_mask, "V8LLiV8LLiV8LLiV8LLiUc", "")
-BUILTIN(__builtin_ia32_psubq512_mask, "V8LLiV8LLiV8LLiV8LLiUc", "")
-BUILTIN(__builtin_ia32_paddd512_mask, "V16iV16iV16iV16iUs", "")
-BUILTIN(__builtin_ia32_psubd512_mask, "V16iV16iV16iV16iUs", "")
-BUILTIN(__builtin_ia32_pmulld512_mask, "V16iV16iV16iV16iUs", "")
-BUILTIN(__builtin_ia32_pmullq512_mask, "V8LLiV8LLiV8LLiV8LLiUc", "")
-BUILTIN(__builtin_ia32_xorpd512_mask, "V8dV8dV8dV8dUc", "")
-BUILTIN(__builtin_ia32_xorps512_mask, "V16fV16fV16fV16fUs", "")
-BUILTIN(__builtin_ia32_orpd512_mask, "V8dV8dV8dV8dUc", "")
-BUILTIN(__builtin_ia32_orps512_mask, "V16fV16fV16fV16fUs", "")
-BUILTIN(__builtin_ia32_andpd512_mask, "V8dV8dV8dV8dUc", "")
-BUILTIN(__builtin_ia32_andps512_mask, "V16fV16fV16fV16fUs", "")
-BUILTIN(__builtin_ia32_andnpd512_mask, "V8dV8dV8dV8dUc", "")
-BUILTIN(__builtin_ia32_andnps512_mask, "V16fV16fV16fV16fUs", "")
-BUILTIN(__builtin_ia32_pmullq256_mask, "V4LLiV4LLiV4LLiV4LLiUc", "")
-BUILTIN(__builtin_ia32_pmullq128_mask, "V2LLiV2LLiV2LLiV2LLiUc", "")
-BUILTIN(__builtin_ia32_andnpd256_mask, "V4dV4dV4dV4dUc", "")
-BUILTIN(__builtin_ia32_andnpd128_mask, "V2dV2dV2dV2dUc", "")
-BUILTIN(__builtin_ia32_andnps256_mask, "V8fV8fV8fV8fUc", "")
-BUILTIN(__builtin_ia32_andnps128_mask, "V4fV4fV4fV4fUc", "")
-BUILTIN(__builtin_ia32_andpd256_mask, "V4dV4dV4dV4dUc", "")
-BUILTIN(__builtin_ia32_andpd128_mask, "V2dV2dV2dV2dUc", "")
-BUILTIN(__builtin_ia32_andps256_mask, "V8fV8fV8fV8fUc", "")
-BUILTIN(__builtin_ia32_andps128_mask, "V4fV4fV4fV4fUc", "")
-BUILTIN(__builtin_ia32_xorpd256_mask, "V4dV4dV4dV4dUc", "")
-BUILTIN(__builtin_ia32_xorpd128_mask, "V2dV2dV2dV2dUc", "")
-BUILTIN(__builtin_ia32_xorps256_mask, "V8fV8fV8fV8fUc", "")
-BUILTIN(__builtin_ia32_xorps128_mask, "V4fV4fV4fV4fUc", "")
-BUILTIN(__builtin_ia32_orpd256_mask, "V4dV4dV4dV4dUc", "")
-BUILTIN(__builtin_ia32_orpd128_mask, "V2dV2dV2dV2dUc", "")
-BUILTIN(__builtin_ia32_orps256_mask, "V8fV8fV8fV8fUc", "")
-BUILTIN(__builtin_ia32_orps128_mask, "V4fV4fV4fV4fUc", "")
-BUILTIN(__builtin_ia32_blendmb_512_mask, "V64cV64cV64cULLi", "")
-BUILTIN(__builtin_ia32_blendmw_512_mask, "V32sV32sV32sUi", "")
-BUILTIN(__builtin_ia32_pabsb512_mask, "V64cV64cV64cULLi", "")
-BUILTIN(__builtin_ia32_pabsw512_mask, "V32sV32sV32sUi", "")
-BUILTIN(__builtin_ia32_packssdw512_mask, "V32sV16iV16iV32sUi", "")
-BUILTIN(__builtin_ia32_packsswb512_mask, "V64cV32sV32sV64cULLi", "")
-BUILTIN(__builtin_ia32_packusdw512_mask, "V32sV16iV16iV32sUi", "")
-BUILTIN(__builtin_ia32_packuswb512_mask, "V64cV32sV32sV64cULLi", "")
-BUILTIN(__builtin_ia32_paddsb512_mask, "V64cV64cV64cV64cULLi", "")
-BUILTIN(__builtin_ia32_paddsw512_mask, "V32sV32sV32sV32sUi", "")
-BUILTIN(__builtin_ia32_paddusb512_mask, "V64cV64cV64cV64cULLi", "")
-BUILTIN(__builtin_ia32_paddusw512_mask, "V32sV32sV32sV32sUi", "")
-BUILTIN(__builtin_ia32_pavgb512_mask, "V64cV64cV64cV64cULLi", "")
-BUILTIN(__builtin_ia32_pavgw512_mask, "V32sV32sV32sV32sUi", "")
-BUILTIN(__builtin_ia32_pmaxsb512_mask, "V64cV64cV64cV64cULLi", "")
-BUILTIN(__builtin_ia32_pmaxsw512_mask, "V32sV32sV32sV32sUi", "")
-BUILTIN(__builtin_ia32_pmaxub512_mask, "V64cV64cV64cV64cULLi", "")
-BUILTIN(__builtin_ia32_pmaxuw512_mask, "V32sV32sV32sV32sUi", "")
-BUILTIN(__builtin_ia32_pminsb512_mask, "V64cV64cV64cV64cULLi", "")
-BUILTIN(__builtin_ia32_pminsw512_mask, "V32sV32sV32sV32sUi", "")
-BUILTIN(__builtin_ia32_pminub512_mask, "V64cV64cV64cV64cULLi", "")
-BUILTIN(__builtin_ia32_pminuw512_mask, "V32sV32sV32sV32sUi", "")
-BUILTIN(__builtin_ia32_pshufb512_mask, "V64cV64cV64cV64cULLi", "")
-BUILTIN(__builtin_ia32_psubsb512_mask, "V64cV64cV64cV64cULLi", "")
-BUILTIN(__builtin_ia32_psubsw512_mask, "V32sV32sV32sV32sUi", "")
-BUILTIN(__builtin_ia32_psubusb512_mask, "V64cV64cV64cV64cULLi", "")
-BUILTIN(__builtin_ia32_psubusw512_mask, "V32sV32sV32sV32sUi", "")
-BUILTIN(__builtin_ia32_vpermi2varhi512_mask, "V32sV32sV32sV32sUi", "")
-BUILTIN(__builtin_ia32_vpermt2varhi512_mask, "V32sV32sV32sV32sUi", "")
-BUILTIN(__builtin_ia32_vpermt2varhi512_maskz, "V32sV32sV32sV32sUi", "")
-BUILTIN(__builtin_ia32_vpconflictdi_512_mask, "V8LLiV8LLiV8LLiUc", "")
-BUILTIN(__builtin_ia32_vpconflictsi_512_mask, "V16iV16iV16iUs", "")
-BUILTIN(__builtin_ia32_vplzcntd_512_mask, "V16iV16iV16iUs", "")
-BUILTIN(__builtin_ia32_vplzcntq_512_mask, "V8LLiV8LLiV8LLiUc", "")
-BUILTIN(__builtin_ia32_blendmb_128_mask, "V16cV16cV16cUs", "")
-BUILTIN(__builtin_ia32_blendmb_256_mask, "V32cV32cV32cUi", "")
-BUILTIN(__builtin_ia32_blendmw_128_mask, "V8sV8sV8sUc", "")
-BUILTIN(__builtin_ia32_blendmw_256_mask, "V16sV16sV16sUs", "")
-BUILTIN(__builtin_ia32_pabsb128_mask, "V16cV16cV16cUs", "")
-BUILTIN(__builtin_ia32_pabsb256_mask, "V32cV32cV32cUi", "")
-BUILTIN(__builtin_ia32_pabsw128_mask, "V8sV8sV8sUc", "")
-BUILTIN(__builtin_ia32_pabsw256_mask, "V16sV16sV16sUs", "")
-BUILTIN(__builtin_ia32_packssdw128_mask, "V8sV4iV4iV8sUc", "")
-BUILTIN(__builtin_ia32_packssdw256_mask, "V16sV8iV8iV16sUs", "")
-BUILTIN(__builtin_ia32_packsswb128_mask, "V16cV8sV8sV16cUs", "")
-BUILTIN(__builtin_ia32_packsswb256_mask, "V32cV16sV16sV32cUi", "")
-BUILTIN(__builtin_ia32_packusdw128_mask, "V8sV4iV4iV8sUc", "")
-BUILTIN(__builtin_ia32_packusdw256_mask, "V16sV8iV8iV16sUs", "")
-BUILTIN(__builtin_ia32_packuswb128_mask, "V16cV8sV8sV16cUs", "")
-BUILTIN(__builtin_ia32_packuswb256_mask, "V32cV16sV16sV32cUi", "")
-BUILTIN(__builtin_ia32_paddsb128_mask, "V16cV16cV16cV16cUs", "")
-BUILTIN(__builtin_ia32_paddsb256_mask, "V32cV32cV32cV32cUi", "")
-BUILTIN(__builtin_ia32_paddsw128_mask, "V8sV8sV8sV8sUc", "")
-BUILTIN(__builtin_ia32_paddsw256_mask, "V16sV16sV16sV16sUs", "")
-BUILTIN(__builtin_ia32_paddusb128_mask, "V16cV16cV16cV16cUs", "")
-BUILTIN(__builtin_ia32_paddusb256_mask, "V32cV32cV32cV32cUi", "")
-BUILTIN(__builtin_ia32_paddusw128_mask, "V8sV8sV8sV8sUc", "")
-BUILTIN(__builtin_ia32_paddusw256_mask, "V16sV16sV16sV16sUs", "")
-BUILTIN(__builtin_ia32_pavgb128_mask, "V16cV16cV16cV16cUs", "")
-BUILTIN(__builtin_ia32_pavgb256_mask, "V32cV32cV32cV32cUi", "")
-BUILTIN(__builtin_ia32_pavgw128_mask, "V8sV8sV8sV8sUc", "")
-BUILTIN(__builtin_ia32_pavgw256_mask, "V16sV16sV16sV16sUs", "")
-BUILTIN(__builtin_ia32_pmaxsb128_mask, "V16cV16cV16cV16cUs", "")
-BUILTIN(__builtin_ia32_pmaxsb256_mask, "V32cV32cV32cV32cUi", "")
-BUILTIN(__builtin_ia32_pmaxsw128_mask, "V8sV8sV8sV8sUc", "")
-BUILTIN(__builtin_ia32_pmaxsw256_mask, "V16sV16sV16sV16sUs", "")
-BUILTIN(__builtin_ia32_pmaxub128_mask, "V16cV16cV16cV16cUs", "")
-BUILTIN(__builtin_ia32_pmaxub256_mask, "V32cV32cV32cV32cUi", "")
-BUILTIN(__builtin_ia32_pmaxuw128_mask, "V8sV8sV8sV8sUc", "")
-BUILTIN(__builtin_ia32_pmaxuw256_mask, "V16sV16sV16sV16sUs", "")
-BUILTIN(__builtin_ia32_pminsb128_mask, "V16cV16cV16cV16cUs", "")
-BUILTIN(__builtin_ia32_pminsb256_mask, "V32cV32cV32cV32cUi", "")
-BUILTIN(__builtin_ia32_pminsw128_mask, "V8sV8sV8sV8sUc", "")
-BUILTIN(__builtin_ia32_pminsw256_mask, "V16sV16sV16sV16sUs", "")
-BUILTIN(__builtin_ia32_pminub128_mask, "V16cV16cV16cV16cUs", "")
-BUILTIN(__builtin_ia32_pminub256_mask, "V32cV32cV32cV32cUi", "")
-BUILTIN(__builtin_ia32_pminuw128_mask, "V8sV8sV8sV8sUc", "")
-BUILTIN(__builtin_ia32_pminuw256_mask, "V16sV16sV16sV16sUs", "")
-BUILTIN(__builtin_ia32_pshufb128_mask, "V16cV16cV16cV16cUs", "")
-BUILTIN(__builtin_ia32_pshufb256_mask, "V32cV32cV32cV32cUi", "")
-BUILTIN(__builtin_ia32_psubsb128_mask, "V16cV16cV16cV16cUs", "")
-BUILTIN(__builtin_ia32_psubsb256_mask, "V32cV32cV32cV32cUi", "")
-BUILTIN(__builtin_ia32_psubsw128_mask, "V8sV8sV8sV8sUc", "")
-BUILTIN(__builtin_ia32_psubsw256_mask, "V16sV16sV16sV16sUs", "")
-BUILTIN(__builtin_ia32_psubusb128_mask, "V16cV16cV16cV16cUs", "")
-BUILTIN(__builtin_ia32_psubusb256_mask, "V32cV32cV32cV32cUi", "")
-BUILTIN(__builtin_ia32_psubusw128_mask, "V8sV8sV8sV8sUc", "")
-BUILTIN(__builtin_ia32_psubusw256_mask, "V16sV16sV16sV16sUs", "")
-BUILTIN(__builtin_ia32_vpermi2varhi128_mask, "V8sV8sV8sV8sUc", "")
-BUILTIN(__builtin_ia32_vpermi2varhi256_mask, "V16sV16sV16sV16sUs", "")
-BUILTIN(__builtin_ia32_vpermt2varhi128_mask, "V8sV8sV8sV8sUc", "")
-BUILTIN(__builtin_ia32_vpermt2varhi128_maskz, "V8sV8sV8sV8sUc", "")
-BUILTIN(__builtin_ia32_vpermt2varhi256_mask, "V16sV16sV16sV16sUs", "")
-BUILTIN(__builtin_ia32_vpermt2varhi256_maskz, "V16sV16sV16sV16sUs", "")
+TARGET_BUILTIN(__builtin_ia32_sqrtpd512_mask, "V8dV8dV8dUcIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_sqrtps512_mask, "V16fV16fV16fUsIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_rsqrt14sd, "V2dV2dV2dV2dUc", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_rsqrt14ss, "V4fV4fV4fV4fUc", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_rsqrt14pd512_mask, "V8dV8dV8dUc", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_rsqrt14ps512_mask, "V16fV16fV16fUs", "", "avx512f")
+
+TARGET_BUILTIN(__builtin_ia32_rsqrt28sd_round, "V2dV2dV2dV2dUcIi", "", "avx512er")
+TARGET_BUILTIN(__builtin_ia32_rsqrt28ss_round, "V4fV4fV4fV4fUcIi", "", "avx512er")
+TARGET_BUILTIN(__builtin_ia32_rsqrt28pd_mask, "V8dV8dV8dUcIi", "", "avx512er")
+TARGET_BUILTIN(__builtin_ia32_rsqrt28ps_mask, "V16fV16fV16fUsIi", "", "avx512er")
+
+TARGET_BUILTIN(__builtin_ia32_rcp14sd, "V2dV2dV2dV2dUc", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_rcp14ss, "V4fV4fV4fV4fUc", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_rcp14pd512_mask, "V8dV8dV8dUc", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_rcp14ps512_mask, "V16fV16fV16fUs", "", "avx512f")
+
+TARGET_BUILTIN(__builtin_ia32_rcp28sd_round, "V2dV2dV2dV2dUcIi", "", "avx512er")
+TARGET_BUILTIN(__builtin_ia32_rcp28ss_round, "V4fV4fV4fV4fUcIi", "", "avx512er")
+TARGET_BUILTIN(__builtin_ia32_rcp28pd_mask, "V8dV8dV8dUcIi", "", "avx512er")
+TARGET_BUILTIN(__builtin_ia32_rcp28ps_mask, "V16fV16fV16fUsIi", "", "avx512er")
+TARGET_BUILTIN(__builtin_ia32_exp2pd_mask, "V8dV8dV8dUcIi", "", "avx512er")
+TARGET_BUILTIN(__builtin_ia32_exp2ps_mask, "V16fV16fV16fUsIi", "", "avx512er")
+
+TARGET_BUILTIN(__builtin_ia32_cvttps2dq512_mask, "V16iV16fV16iUsIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_cvttps2udq512_mask, "V16iV16fV16iUsIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_cvttpd2dq512_mask, "V8iV8dV8iUcIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_cvttpd2udq512_mask, "V8iV8dV8iUcIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_cmpps512_mask, "UsV16fV16fIiUsIi", "", "avx512f")
+
+TARGET_BUILTIN(__builtin_ia32_cmpps256_mask, "UcV8fV8fIiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_cmpps128_mask, "UcV4fV4fIiUc", "", "avx512vl")
+
+TARGET_BUILTIN(__builtin_ia32_pcmpeqb512_mask, "LLiV64cV64cLLi", "", "avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pcmpeqd512_mask, "sV16iV16is", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_pcmpeqq512_mask, "cV8LLiV8LLic", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_pcmpeqw512_mask, "iV32sV32si", "", "avx512bw")
+
+TARGET_BUILTIN(__builtin_ia32_pcmpeqb256_mask, "iV32cV32ci", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pcmpeqd256_mask, "cV8iV8ic", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pcmpeqq256_mask, "cV4LLiV4LLic", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pcmpeqw256_mask, "sV16sV16ss", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pcmpeqb128_mask, "sV16cV16cs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pcmpeqd128_mask, "cV4iV4ic", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pcmpeqq128_mask, "cV2LLiV2LLic", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pcmpeqw128_mask, "cV8sV8sc", "", "avx512vl,avx512bw")
+
+TARGET_BUILTIN(__builtin_ia32_pcmpgtb512_mask, "LLiV64cV64cLLi", "", "avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pcmpgtd512_mask, "sV16iV16is", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_pcmpgtq512_mask, "cV8LLiV8LLic", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_pcmpgtw512_mask, "iV32sV32si", "", "avx512bw")
+
+TARGET_BUILTIN(__builtin_ia32_pcmpgtb256_mask, "iV32cV32ci", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pcmpgtd256_mask, "cV8iV8ic", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pcmpgtq256_mask, "cV4LLiV4LLic", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pcmpgtw256_mask, "sV16sV16ss", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pcmpgtb128_mask, "sV16cV16cs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pcmpgtd128_mask, "cV4iV4ic", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pcmpgtq128_mask, "cV2LLiV2LLic", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pcmpgtw128_mask, "cV8sV8sc", "", "avx512vl,avx512bw")
+
+TARGET_BUILTIN(__builtin_ia32_cmppd512_mask, "UcV8dV8dIiUcIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_cmppd256_mask, "UcV4dV4dIiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_cmppd128_mask, "UcV2dV2dIiUc", "", "avx512vl")
+
+TARGET_BUILTIN(__builtin_ia32_rndscaleps_mask, "V16fV16fIiV16fUsIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_rndscalepd_mask, "V8dV8dIiV8dUcIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_cvtps2dq512_mask, "V16iV16fV16iUsIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_cvtpd2dq512_mask, "V8iV8dV8iUcIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_cvtps2udq512_mask, "V16iV16fV16iUsIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_cvtpd2udq512_mask, "V8iV8dV8iUcIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_minps512_mask, "V16fV16fV16fV16fUsIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_minpd512_mask, "V8dV8dV8dV8dUcIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_maxps512_mask, "V16fV16fV16fV16fUsIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_maxpd512_mask, "V8dV8dV8dV8dUcIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_cvtdq2ps512_mask, "V16fV16iV16fUsIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_cvtudq2ps512_mask, "V16fV16iV16fUsIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_cvtdq2pd512_mask, "V8dV8iV8dUc", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_cvtudq2pd512_mask, "V8dV8iV8dUc", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_cvtpd2ps512_mask, "V8fV8dV8fUcIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_vcvtps2ph512_mask, "V16sV16fIiV16sUs", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_vcvtph2ps512_mask, "V16fV16sV16fUsIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_pandd512_mask, "V16iV16iV16iV16iUs", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_pandq512_mask, "V8LLiV8LLiV8LLiV8LLiUc", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_pord512_mask, "V16iV16iV16iV16iUs", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_porq512_mask, "V8LLiV8LLiV8LLiV8LLiUc", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_pxord512_mask, "V16iV16iV16iV16iUs", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_pxorq512_mask, "V8LLiV8LLiV8LLiV8LLiUc", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_pabsd512_mask, "V16iV16iV16iUs", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_pabsq512_mask, "V8LLiV8LLiV8LLiUc", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_pmaxsd512_mask, "V16iV16iV16iV16iUs", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_pmaxsq512_mask, "V8LLiV8LLiV8LLiV8LLiUc", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_pmaxud512_mask, "V16iV16iV16iV16iUs", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_pmaxuq512_mask, "V8LLiV8LLiV8LLiV8LLiUc", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_pminsd512_mask, "V16iV16iV16iV16iUs", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_pminsq512_mask, "V8LLiV8LLiV8LLiV8LLiUc", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_pminud512_mask, "V16iV16iV16iV16iUs", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_pminuq512_mask, "V8LLiV8LLiV8LLiV8LLiUc", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_pmuldq512_mask, "V8LLiV16iV16iV8LLiUc", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_pmuludq512_mask, "V8LLiV16iV16iV8LLiUc", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_blendmd_512_mask, "V16iV16iV16iUs", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_blendmq_512_mask, "V8LLiV8LLiV8LLiUc", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_blendmps_512_mask, "V16fV16fV16fUs", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_blendmpd_512_mask, "V8dV8dV8dUc", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_ptestmd512, "UsV16iV16iUs", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_ptestmq512, "UcV8LLiV8LLiUc", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_pbroadcastd512_gpr_mask, "V16iiV16iUs", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_pbroadcastq512_gpr_mask, "V8LLiLLiV8LLiUc", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_pbroadcastq512_mem_mask, "V8LLiLLiV8LLiUc", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_loaddqusi512_mask, "V16ivC*V16iUs", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_loaddqudi512_mask, "V8LLivC*V8LLiUc", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_loadups512_mask, "V16fvC*V16fUs", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_loadaps512_mask, "V16fvC*V16fUs", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_loadupd512_mask, "V8dvC*V8dUc", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_loadapd512_mask, "V8dvC*V8dUc", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_storedqudi512_mask, "vv*V8LLiUc", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_storedqusi512_mask, "vv*V16iUs", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_storeupd512_mask, "vv*V8dUc", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_storeapd512_mask, "vv*V8dUc", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_storeups512_mask, "vv*V16fUs", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_storeaps512_mask, "vv*V16fUs", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_vpermt2vard512_mask, "V16iV16iV16iV16iUs", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_vpermt2varq512_mask, "V8LLiV8LLiV8LLiV8LLiUc", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_vpermt2varps512_mask, "V16fV16iV16fV16fUs", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_vpermt2varpd512_mask, "V8dV8LLiV8dV8dUc", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_alignq512_mask, "V8LLiV8LLiV8LLiIiV8LLiUc", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_alignd512_mask, "V16iV16iV16iIiV16iUs", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_extractf64x4_mask, "V4dV8dIiV4dUc", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_extractf32x4_mask, "V4fV16fIiV4fUc", "", "avx512f")
+
+TARGET_BUILTIN(__builtin_ia32_gathersiv8df, "V8dV8dvC*V8iUcIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_gathersiv16sf, "V16fV16fvC*UsIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_gatherdiv8df, "V8dV8dvC*V8LLiUcIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_gatherdiv16sf, "V8fV8fvC*V8LLiUcIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_gathersiv8di, "V8LLiV8LLivC*V8iUcIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_gathersiv16si, "V16iV16ivC*UsIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_gatherdiv8di, "V8LLiV8LLivC*V8LLiUcIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_gatherdiv16si, "V8iV8ivC*V8LLiUcIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_scattersiv8df, "vv*UcV8iV8dIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_scattersiv16sf, "vv*UsV16iV16fIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_scatterdiv8df, "vv*UcV8LLiV8dIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_scatterdiv16sf, "vv*UcV8LLiV8fIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_scattersiv8di, "vv*UcV8iV8LLiIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_scattersiv16si, "vv*UsV16iV16iIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_scatterdiv8di, "vv*UcV8LLiV8LLiIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_scatterdiv16si, "vv*UcV8LLiV8iIi", "", "avx512f")
+
+TARGET_BUILTIN(__builtin_ia32_gatherpfdpd, "vUcV8ivC*IiIi", "", "avx512pf")
+TARGET_BUILTIN(__builtin_ia32_gatherpfdps, "vUsV16ivC*IiIi", "", "avx512pf")
+TARGET_BUILTIN(__builtin_ia32_gatherpfqpd, "vUcV8LLivC*IiIi", "", "avx512pf")
+TARGET_BUILTIN(__builtin_ia32_gatherpfqps, "vUcV8LLivC*IiIi", "", "avx512pf")
+TARGET_BUILTIN(__builtin_ia32_scatterpfdpd, "vUcV8iv*IiIi", "", "avx512pf")
+TARGET_BUILTIN(__builtin_ia32_scatterpfdps, "vUsV16iv*IiIi", "", "avx512pf")
+TARGET_BUILTIN(__builtin_ia32_scatterpfqpd, "vUcV8LLiv*IiIi", "", "avx512pf")
+TARGET_BUILTIN(__builtin_ia32_scatterpfqps, "vUcV8LLiv*IiIi", "", "avx512pf")
+
+TARGET_BUILTIN(__builtin_ia32_knothi, "UsUs", "", "avx512f")
+
+TARGET_BUILTIN(__builtin_ia32_cmpb128_mask, "UsV16cV16cIiUs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_cmpd128_mask, "UcV4iV4iIiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_cmpq128_mask, "UcV2LLiV2LLiIiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_cmpw128_mask, "UcV8sV8sIiUc", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_cmpb256_mask, "UiV32cV32cIiUi", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_cmpd256_mask, "UcV8iV8iIiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_cmpq256_mask, "UcV4LLiV4LLiIiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_cmpw256_mask, "UsV16sV16sIiUs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_cmpb512_mask, "ULLiV64cV64cIiULLi", "", "avx512bw")
+TARGET_BUILTIN(__builtin_ia32_cmpd512_mask, "UsV16iV16iIiUs", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_cmpq512_mask, "UcV8LLiV8LLiIiUc", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_cmpw512_mask, "UiV32sV32sIiUi", "", "avx512bw")
+TARGET_BUILTIN(__builtin_ia32_ucmpb128_mask, "UsV16cV16cIiUs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_ucmpd128_mask, "UcV4iV4iIiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_ucmpq128_mask, "UcV2LLiV2LLiIiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_ucmpw128_mask, "UcV8sV8sIiUc", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_ucmpb256_mask, "UiV32cV32cIiUi", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_ucmpd256_mask, "UcV8iV8iIiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_ucmpq256_mask, "UcV4LLiV4LLiIiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_ucmpw256_mask, "UsV16sV16sIiUs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_ucmpb512_mask, "ULLiV64cV64cIiULLi", "", "avx512bw")
+TARGET_BUILTIN(__builtin_ia32_ucmpd512_mask, "UsV16iV16iIiUs", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_ucmpq512_mask, "UcV8LLiV8LLiIiUc", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_ucmpw512_mask, "UiV32sV32sIiUi", "", "avx512bw")
+
+TARGET_BUILTIN(__builtin_ia32_paddd256_mask, "V8iV8iV8iV8iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_paddq256_mask, "V4LLiV4LLiV4LLiV4LLiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_psubd256_mask, "V8iV8iV8iV8iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_psubq256_mask, "V4LLiV4LLiV4LLiV4LLiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_paddd128_mask, "V4iV4iV4iV4iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_paddq128_mask, "V2LLiV2LLiV2LLiV2LLiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_psubd128_mask, "V4iV4iV4iV4iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_psubq128_mask, "V2LLiV2LLiV2LLiV2LLiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pmuldq256_mask, "V4LLiV8iV8iV4LLiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pmuldq128_mask, "V2LLiV4iV4iV2LLiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pmuludq256_mask, "V4LLiV8iV8iV4LLiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pmuludq128_mask, "V2LLiV4iV4iV2LLiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pmulld256_mask, "V8iV8iV8iV8iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pmulld128_mask, "V4iV4iV4iV4iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pandd256_mask, "V8iV8iV8iV8iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pandd128_mask, "V4iV4iV4iV4iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pandnd256_mask, "V8iV8iV8iV8iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pandnd128_mask, "V4iV4iV4iV4iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pord256_mask, "V8iV8iV8iV8iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pord128_mask, "V4iV4iV4iV4iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pxord256_mask, "V8iV8iV8iV8iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pxord128_mask, "V4iV4iV4iV4iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pandq256_mask, "V4LLiV4LLiV4LLiV4LLiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pandq128_mask, "V2LLiV2LLiV2LLiV2LLiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pandnq256_mask, "V4LLiV4LLiV4LLiV4LLiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pandnq128_mask, "V2LLiV2LLiV2LLiV2LLiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_porq256_mask, "V4LLiV4LLiV4LLiV4LLiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_porq128_mask, "V2LLiV2LLiV2LLiV2LLiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pxorq256_mask, "V4LLiV4LLiV4LLiV4LLiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pxorq128_mask, "V2LLiV2LLiV2LLiV2LLiUc", "", "avx512vl")
+
+TARGET_BUILTIN(__builtin_ia32_paddb512_mask, "V64cV64cV64cV64cULLi", "", "avx512bw")
+TARGET_BUILTIN(__builtin_ia32_psubb512_mask, "V64cV64cV64cV64cULLi", "", "avx512bw")
+TARGET_BUILTIN(__builtin_ia32_paddw512_mask, "V32sV32sV32sV32sUi", "", "avx512bw")
+TARGET_BUILTIN(__builtin_ia32_psubw512_mask, "V32sV32sV32sV32sUi", "", "avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pmullw512_mask, "V32sV32sV32sV32sUi", "", "avx512bw")
+TARGET_BUILTIN(__builtin_ia32_paddb256_mask, "V32cV32cV32cV32cUi", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_paddw256_mask, "V16sV16sV16sV16sUs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_psubb256_mask, "V32cV32cV32cV32cUi", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_psubw256_mask, "V16sV16sV16sV16sUs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_paddb128_mask, "V16cV16cV16cV16cUs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_paddw128_mask, "V8sV8sV8sV8sUc", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_psubb128_mask, "V16cV16cV16cV16cUs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_psubw128_mask, "V8sV8sV8sV8sUc", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pmullw256_mask, "V16sV16sV16sV16sUs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pmullw128_mask, "V8sV8sV8sV8sUc", "", "avx512vl,avx512bw")
+
+TARGET_BUILTIN(__builtin_ia32_pandnd512_mask, "V16iV16iV16iV16iUs", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_pandnq512_mask, "V8LLiV8LLiV8LLiV8LLiUc", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_paddq512_mask, "V8LLiV8LLiV8LLiV8LLiUc", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_psubq512_mask, "V8LLiV8LLiV8LLiV8LLiUc", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_paddd512_mask, "V16iV16iV16iV16iUs", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_psubd512_mask, "V16iV16iV16iV16iUs", "", "avx512f")
+
+TARGET_BUILTIN(__builtin_ia32_pmulld512_mask, "V16iV16iV16iV16iUs", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_pmullq512_mask, "V8LLiV8LLiV8LLiV8LLiUc", "", "avx512dq")
+TARGET_BUILTIN(__builtin_ia32_xorpd512_mask, "V8dV8dV8dV8dUc", "", "avx512dq")
+TARGET_BUILTIN(__builtin_ia32_xorps512_mask, "V16fV16fV16fV16fUs", "", "avx512dq")
+TARGET_BUILTIN(__builtin_ia32_orpd512_mask, "V8dV8dV8dV8dUc", "", "avx512dq")
+TARGET_BUILTIN(__builtin_ia32_orps512_mask, "V16fV16fV16fV16fUs", "", "avx512dq")
+TARGET_BUILTIN(__builtin_ia32_andpd512_mask, "V8dV8dV8dV8dUc", "", "avx512dq")
+TARGET_BUILTIN(__builtin_ia32_andps512_mask, "V16fV16fV16fV16fUs", "", "avx512dq")
+TARGET_BUILTIN(__builtin_ia32_andnpd512_mask, "V8dV8dV8dV8dUc", "", "avx512dq")
+TARGET_BUILTIN(__builtin_ia32_andnps512_mask, "V16fV16fV16fV16fUs", "", "avx512dq")
+TARGET_BUILTIN(__builtin_ia32_pmullq256_mask, "V4LLiV4LLiV4LLiV4LLiUc", "", "avx512vl,avx512dq")
+TARGET_BUILTIN(__builtin_ia32_pmullq128_mask, "V2LLiV2LLiV2LLiV2LLiUc", "", "avx512vl,avx512dq")
+TARGET_BUILTIN(__builtin_ia32_andnpd256_mask, "V4dV4dV4dV4dUc", "", "avx512vl,avx512dq")
+TARGET_BUILTIN(__builtin_ia32_andnpd128_mask, "V2dV2dV2dV2dUc", "", "avx512vl,avx512dq")
+TARGET_BUILTIN(__builtin_ia32_andnps256_mask, "V8fV8fV8fV8fUc", "", "avx512vl,avx512dq")
+TARGET_BUILTIN(__builtin_ia32_andnps128_mask, "V4fV4fV4fV4fUc", "", "avx512vl,avx512dq")
+TARGET_BUILTIN(__builtin_ia32_andpd256_mask, "V4dV4dV4dV4dUc", "", "avx512vl,avx512dq")
+TARGET_BUILTIN(__builtin_ia32_andpd128_mask, "V2dV2dV2dV2dUc", "", "avx512vl,avx512dq")
+TARGET_BUILTIN(__builtin_ia32_andps256_mask, "V8fV8fV8fV8fUc", "", "avx512vl,avx512dq")
+TARGET_BUILTIN(__builtin_ia32_andps128_mask, "V4fV4fV4fV4fUc", "", "avx512vl,avx512dq")
+TARGET_BUILTIN(__builtin_ia32_xorpd256_mask, "V4dV4dV4dV4dUc", "", "avx512vl,avx512dq")
+TARGET_BUILTIN(__builtin_ia32_xorpd128_mask, "V2dV2dV2dV2dUc", "", "avx512vl,avx512dq")
+TARGET_BUILTIN(__builtin_ia32_xorps256_mask, "V8fV8fV8fV8fUc", "", "avx512vl,avx512dq")
+TARGET_BUILTIN(__builtin_ia32_xorps128_mask, "V4fV4fV4fV4fUc", "", "avx512vl,avx512dq")
+TARGET_BUILTIN(__builtin_ia32_orpd256_mask, "V4dV4dV4dV4dUc", "", "avx512vl,avx512dq")
+TARGET_BUILTIN(__builtin_ia32_orpd128_mask, "V2dV2dV2dV2dUc", "", "avx512vl,avx512dq")
+TARGET_BUILTIN(__builtin_ia32_orps256_mask, "V8fV8fV8fV8fUc", "", "avx512vl,avx512dq")
+TARGET_BUILTIN(__builtin_ia32_orps128_mask, "V4fV4fV4fV4fUc", "", "avx512vl,avx512dq")
+
+TARGET_BUILTIN(__builtin_ia32_blendmb_512_mask, "V64cV64cV64cULLi", "", "avx512bw")
+TARGET_BUILTIN(__builtin_ia32_blendmw_512_mask, "V32sV32sV32sUi", "", "avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pabsb512_mask, "V64cV64cV64cULLi", "", "avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pabsw512_mask, "V32sV32sV32sUi", "", "avx512bw")
+TARGET_BUILTIN(__builtin_ia32_packssdw512_mask, "V32sV16iV16iV32sUi", "", "avx512bw")
+TARGET_BUILTIN(__builtin_ia32_packsswb512_mask, "V64cV32sV32sV64cULLi", "", "avx512bw")
+TARGET_BUILTIN(__builtin_ia32_packusdw512_mask, "V32sV16iV16iV32sUi", "", "avx512bw")
+TARGET_BUILTIN(__builtin_ia32_packuswb512_mask, "V64cV32sV32sV64cULLi", "", "avx512bw")
+TARGET_BUILTIN(__builtin_ia32_paddsb512_mask, "V64cV64cV64cV64cULLi", "", "avx512bw")
+TARGET_BUILTIN(__builtin_ia32_paddsw512_mask, "V32sV32sV32sV32sUi", "", "avx512bw")
+TARGET_BUILTIN(__builtin_ia32_paddusb512_mask, "V64cV64cV64cV64cULLi", "", "avx512bw")
+TARGET_BUILTIN(__builtin_ia32_paddusw512_mask, "V32sV32sV32sV32sUi", "", "avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pavgb512_mask, "V64cV64cV64cV64cULLi", "", "avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pavgw512_mask, "V32sV32sV32sV32sUi", "", "avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pmaxsb512_mask, "V64cV64cV64cV64cULLi", "", "avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pmaxsw512_mask, "V32sV32sV32sV32sUi", "", "avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pmaxub512_mask, "V64cV64cV64cV64cULLi", "", "avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pmaxuw512_mask, "V32sV32sV32sV32sUi", "", "avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pminsb512_mask, "V64cV64cV64cV64cULLi", "", "avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pminsw512_mask, "V32sV32sV32sV32sUi", "", "avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pminub512_mask, "V64cV64cV64cV64cULLi", "", "avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pminuw512_mask, "V32sV32sV32sV32sUi", "", "avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pshufb512_mask, "V64cV64cV64cV64cULLi", "", "avx512bw")
+TARGET_BUILTIN(__builtin_ia32_psubsb512_mask, "V64cV64cV64cV64cULLi", "", "avx512bw")
+TARGET_BUILTIN(__builtin_ia32_psubsw512_mask, "V32sV32sV32sV32sUi", "", "avx512bw")
+TARGET_BUILTIN(__builtin_ia32_psubusb512_mask, "V64cV64cV64cV64cULLi", "", "avx512bw")
+TARGET_BUILTIN(__builtin_ia32_psubusw512_mask, "V32sV32sV32sV32sUi", "", "avx512bw")
+
+TARGET_BUILTIN(__builtin_ia32_vpermi2varhi512_mask, "V32sV32sV32sV32sUi", "", "avx512bw")
+TARGET_BUILTIN(__builtin_ia32_vpermt2varhi512_mask, "V32sV32sV32sV32sUi", "", "avx512bw")
+TARGET_BUILTIN(__builtin_ia32_vpermt2varhi512_maskz, "V32sV32sV32sV32sUi", "", "avx512bw")
+
+TARGET_BUILTIN(__builtin_ia32_vpconflictdi_512_mask, "V8LLiV8LLiV8LLiUc", "", "avx512cd")
+TARGET_BUILTIN(__builtin_ia32_vpconflictsi_512_mask, "V16iV16iV16iUs", "", "avx512cd")
+TARGET_BUILTIN(__builtin_ia32_vplzcntd_512_mask, "V16iV16iV16iUs", "", "avx512cd")
+TARGET_BUILTIN(__builtin_ia32_vplzcntq_512_mask, "V8LLiV8LLiV8LLiUc", "", "avx512cd")
+
+TARGET_BUILTIN(__builtin_ia32_blendmb_128_mask, "V16cV16cV16cUs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_blendmb_256_mask, "V32cV32cV32cUi", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_blendmw_128_mask, "V8sV8sV8sUc", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_blendmw_256_mask, "V16sV16sV16sUs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pabsb128_mask, "V16cV16cV16cUs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pabsb256_mask, "V32cV32cV32cUi", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pabsw128_mask, "V8sV8sV8sUc", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pabsw256_mask, "V16sV16sV16sUs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_packssdw128_mask, "V8sV4iV4iV8sUc", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_packssdw256_mask, "V16sV8iV8iV16sUs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_packsswb128_mask, "V16cV8sV8sV16cUs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_packsswb256_mask, "V32cV16sV16sV32cUi", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_packusdw128_mask, "V8sV4iV4iV8sUc", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_packusdw256_mask, "V16sV8iV8iV16sUs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_packuswb128_mask, "V16cV8sV8sV16cUs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_packuswb256_mask, "V32cV16sV16sV32cUi", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_paddsb128_mask, "V16cV16cV16cV16cUs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_paddsb256_mask, "V32cV32cV32cV32cUi", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_paddsw128_mask, "V8sV8sV8sV8sUc", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_paddsw256_mask, "V16sV16sV16sV16sUs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_paddusb128_mask, "V16cV16cV16cV16cUs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_paddusb256_mask, "V32cV32cV32cV32cUi", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_paddusw128_mask, "V8sV8sV8sV8sUc", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_paddusw256_mask, "V16sV16sV16sV16sUs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pavgb128_mask, "V16cV16cV16cV16cUs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pavgb256_mask, "V32cV32cV32cV32cUi", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pavgw128_mask, "V8sV8sV8sV8sUc", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pavgw256_mask, "V16sV16sV16sV16sUs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pmaxsb128_mask, "V16cV16cV16cV16cUs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pmaxsb256_mask, "V32cV32cV32cV32cUi", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pmaxsw128_mask, "V8sV8sV8sV8sUc", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pmaxsw256_mask, "V16sV16sV16sV16sUs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pmaxub128_mask, "V16cV16cV16cV16cUs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pmaxub256_mask, "V32cV32cV32cV32cUi", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pmaxuw128_mask, "V8sV8sV8sV8sUc", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pmaxuw256_mask, "V16sV16sV16sV16sUs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pminsb128_mask, "V16cV16cV16cV16cUs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pminsb256_mask, "V32cV32cV32cV32cUi", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pminsw128_mask, "V8sV8sV8sV8sUc", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pminsw256_mask, "V16sV16sV16sV16sUs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pminub128_mask, "V16cV16cV16cV16cUs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pminub256_mask, "V32cV32cV32cV32cUi", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pminuw128_mask, "V8sV8sV8sV8sUc", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pminuw256_mask, "V16sV16sV16sV16sUs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pshufb128_mask, "V16cV16cV16cV16cUs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pshufb256_mask, "V32cV32cV32cV32cUi", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_psubsb128_mask, "V16cV16cV16cV16cUs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_psubsb256_mask, "V32cV32cV32cV32cUi", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_psubsw128_mask, "V8sV8sV8sV8sUc", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_psubsw256_mask, "V16sV16sV16sV16sUs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_psubusb128_mask, "V16cV16cV16cV16cUs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_psubusb256_mask, "V32cV32cV32cV32cUi", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_psubusw128_mask, "V8sV8sV8sV8sUc", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_psubusw256_mask, "V16sV16sV16sV16sUs", "", "avx512vl,avx512bw")
+
+TARGET_BUILTIN(__builtin_ia32_vpermi2varhi128_mask, "V8sV8sV8sV8sUc", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_vpermi2varhi256_mask, "V16sV16sV16sV16sUs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_vpermt2varhi128_mask, "V8sV8sV8sV8sUc", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_vpermt2varhi128_maskz, "V8sV8sV8sV8sUc", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_vpermt2varhi256_mask, "V16sV16sV16sV16sUs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_vpermt2varhi256_maskz, "V16sV16sV16sV16sUs", "", "avx512vl,avx512bw")
+
+TARGET_BUILTIN(__builtin_ia32_pmulhrsw512_mask, "V32sV32sV32sV32sUi", "", "avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pmulhuw512_mask, "V32sV32sV32sV32sUi", "", "avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pmulhw512_mask, "V32sV32sV32sV32sUi", "", "avx512bw")
+
+TARGET_BUILTIN(__builtin_ia32_addpd512_mask, "V8dV8dV8dV8dUcIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_addps512_mask, "V16fV16fV16fV16fUsIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_divpd512_mask, "V8dV8dV8dV8dUcIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_divps512_mask, "V16fV16fV16fV16fUsIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_mulpd512_mask, "V8dV8dV8dV8dUcIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_mulps512_mask, "V16fV16fV16fV16fUsIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_subpd512_mask, "V8dV8dV8dV8dUcIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_subps512_mask, "V16fV16fV16fV16fUsIi", "", "avx512f")
+
+TARGET_BUILTIN(__builtin_ia32_pmaddubsw512_mask, "V32sV64cV64cV32sUi", "", "avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pmaddwd512_mask, "V16iV32sV32sV16iUs", "", "avx512bw")
+
+TARGET_BUILTIN(__builtin_ia32_addss_round, "V4fV4fV4fV4fUcIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_divss_round, "V4fV4fV4fV4fUcIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_mulss_round, "V4fV4fV4fV4fUcIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_subss_round, "V4fV4fV4fV4fUcIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_maxss_round, "V4fV4fV4fV4fUcIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_minss_round, "V4fV4fV4fV4fUcIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_addsd_round, "V2dV2dV2dV2dUcIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_divsd_round, "V2dV2dV2dV2dUcIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_mulsd_round, "V2dV2dV2dV2dUcIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_subsd_round, "V2dV2dV2dV2dUcIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_maxsd_round, "V2dV2dV2dV2dUcIi", "", "avx512f")
+TARGET_BUILTIN(__builtin_ia32_minsd_round, "V2dV2dV2dV2dUcIi", "", "avx512f")
+
+TARGET_BUILTIN(__builtin_ia32_addpd128_mask, "V2dV2dV2dV2dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_addpd256_mask, "V4dV4dV4dV4dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_addps128_mask, "V4fV4fV4fV4fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_addps256_mask, "V8fV8fV8fV8fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_blendmd_128_mask, "V4iV4iV4iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_blendmd_256_mask, "V8iV8iV8iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_blendmpd_128_mask, "V2dV2dV2dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_blendmpd_256_mask, "V4dV4dV4dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_blendmps_128_mask, "V4fV4fV4fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_blendmps_256_mask, "V8fV8fV8fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_blendmq_128_mask, "V2LLiV2LLiV2LLiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_blendmq_256_mask, "V4LLiV4LLiV4LLiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_compressdf128_mask, "V2dV2dV2dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_compressdf256_mask, "V4dV4dV4dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_compressdi128_mask, "V2LLiV2LLiV2LLiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_compressdi256_mask, "V4LLiV4LLiV4LLiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_compresssf128_mask, "V4fV4fV4fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_compresssf256_mask, "V8fV8fV8fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_compresssi128_mask, "V4iV4iV4iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_compresssi256_mask, "V8iV8iV8iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_compressstoredf128_mask, "vV2d*V2dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_compressstoredf256_mask, "vV4d*V4dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_compressstoredi128_mask, "vV2LLi*V2LLiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_compressstoredi256_mask, "vV4LLi*V4LLiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_compressstoresf128_mask, "vV4f*V4fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_compressstoresf256_mask, "vV8f*V8fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_compressstoresi128_mask, "vV4i*V4iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_compressstoresi256_mask, "vV8i*V8iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_cvtdq2pd128_mask, "V2dV4iV2dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_cvtdq2pd256_mask, "V4dV4iV4dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_cvtdq2ps128_mask, "V4fV4iV4fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_cvtdq2ps256_mask, "V8fV8iV8fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_cvtpd2dq128_mask, "V4iV2dV4iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_cvtpd2dq256_mask, "V4iV4dV4iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_cvtpd2ps_mask, "V4fV2dV4fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_cvtpd2ps256_mask, "V4fV4dV4fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_cvtpd2udq128_mask, "V4iV2dV4iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_cvtpd2udq256_mask, "V4iV4dV4iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_cvtps2dq128_mask, "V4iV4fV4iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_cvtps2dq256_mask, "V8iV8fV8iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_cvtps2pd128_mask, "V2dV4fV2dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_cvtps2pd256_mask, "V4dV4fV4dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_cvtps2udq128_mask, "V4iV4fV4iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_cvtps2udq256_mask, "V8iV8fV8iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_cvttpd2dq128_mask, "V4iV2dV4iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_cvttpd2dq256_mask, "V4iV4dV4iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_cvttpd2udq128_mask, "V4iV2dV4iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_cvttpd2udq256_mask, "V4iV4dV4iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_cvttps2dq128_mask, "V4iV4fV4iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_cvttps2dq256_mask, "V8iV8fV8iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_cvttps2udq128_mask, "V4iV4fV4iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_cvttps2udq256_mask, "V8iV8fV8iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_cvtudq2pd128_mask, "V2dV4iV2dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_cvtudq2pd256_mask, "V4dV4iV4dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_cvtudq2ps128_mask, "V4fV4iV4fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_cvtudq2ps256_mask, "V8fV8iV8fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_divpd_mask, "V2dV2dV2dV2dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_divpd256_mask, "V4dV4dV4dV4dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_divps_mask, "V4fV4fV4fV4fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_divps256_mask, "V8fV8fV8fV8fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_expanddf128_mask, "V2dV2dV2dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_expanddf256_mask, "V4dV4dV4dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_expanddi128_mask, "V2LLiV2LLiV2LLiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_expanddi256_mask, "V4LLiV4LLiV4LLiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_expandloaddf128_mask, "V2dV2d*V2dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_expandloaddf256_mask, "V4dV4d*V4dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_expandloaddi128_mask, "V4iV2LLi*V2LLiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_expandloaddi256_mask, "V4LLiV4LLi*V4LLiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_expandloadsf128_mask, "V4fV4f*V4fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_expandloadsf256_mask, "V8fV8f*V8fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_expandloadsi128_mask, "V4iV4i*V4iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_expandloadsi256_mask, "V8iV8i*V8iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_expandsf128_mask, "V4fV4fV4fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_expandsf256_mask, "V8fV8fV8fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_expandsi128_mask, "V4iV4iV4iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_expandsi256_mask, "V8iV8iV8iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_getexppd128_mask, "V2dV2dV2dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_getexppd256_mask, "V4dV4dV4dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_getexpps128_mask, "V4fV4fV4fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_getexpps256_mask, "V8fV8fV8fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_maxpd_mask, "V2dV2dV2dV2dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_maxpd256_mask, "V4dV4dV4dV4dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_maxps_mask, "V4fV4fV4fV4fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_maxps256_mask, "V8fV8fV8fV8fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_minpd_mask, "V2dV2dV2dV2dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_minpd256_mask, "V4dV4dV4dV4dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_minps_mask, "V4fV4fV4fV4fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_minps256_mask, "V8fV8fV8fV8fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_mulpd_mask, "V2dV2dV2dV2dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_mulpd256_mask, "V4dV4dV4dV4dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_mulps_mask, "V4fV4fV4fV4fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_mulps256_mask, "V8fV8fV8fV8fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pabsd128_mask, "V4iV4iV4iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pabsd256_mask, "V8iV8iV8iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pabsq128_mask, "V2LLiV2LLiV2LLiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pabsq256_mask, "V4LLiV4LLiV4LLiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pmaxsd128_mask, "V4iV4iV4iV4iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pmaxsd256_mask, "V8iV8iV8iV8iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pmaxsq128_mask, "V2LLiV2LLiV2LLiV2LLiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pmaxsq256_mask, "V4LLiV4LLiV4LLiV4LLiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pmaxud128_mask, "V4iV4iV4iV4iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pmaxud256_mask, "V8iV8iV8iV8iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pmaxuq128_mask, "V2LLiV2LLiV2LLiV2LLiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pmaxuq256_mask, "V4LLiV4LLiV4LLiV4LLiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pminsd128_mask, "V4iV4iV4iV4iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pminsd256_mask, "V8iV8iV8iV8iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pminsq128_mask, "V2LLiV2LLiV2LLiV2LLiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pminsq256_mask, "V4LLiV4LLiV4LLiV4LLiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pminud128_mask, "V4iV4iV4iV4iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pminud256_mask, "V8iV8iV8iV8iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pminuq128_mask, "V2LLiV2LLiV2LLiV2LLiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pminuq256_mask, "V4LLiV4LLiV4LLiV4LLiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_rndscalepd_128_mask, "V2dV2dIiV2dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_rndscalepd_256_mask, "V4dV4dIiV4dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_rndscaleps_128_mask, "V4fV4fIiV4fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_rndscaleps_256_mask, "V8fV8fIiV8fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_scalefpd128_mask, "V2dV2dV2dV2dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_scalefpd256_mask, "V4dV4dV4dV4dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_scalefps128_mask, "V4fV4fV4fV4fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_scalefps256_mask, "V8fV8fV8fV8fUc", "", "avx512vl")
+
+TARGET_BUILTIN(__builtin_ia32_scatterdiv2df, "vv*UcV2LLiV2dIi", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_scatterdiv2di, "vv*UcV2LLiV2LLiIi", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_scatterdiv4df, "vv*UcV4LLiV4dIi", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_scatterdiv4di, "vv*UcV4LLiV4LLiIi", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_scatterdiv4sf, "vv*UcV2LLiV4fIi", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_scatterdiv4si, "vv*UcV2LLiV4iIi", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_scatterdiv8sf, "vv*UcV4LLiV4fIi", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_scatterdiv8si, "vv*UcV4LLiV4iIi", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_scattersiv2df, "vv*UcV4iV2dIi", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_scattersiv2di, "vv*UcV4iV2LLiIi", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_scattersiv4df, "vv*UcV4iV4dIi", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_scattersiv4di, "vv*UcV4iV4LLiIi", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_scattersiv4sf, "vv*UcV4iV4fIi", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_scattersiv4si, "vv*UcV4iV4iIi", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_scattersiv8sf, "vv*UcV8iV8fIi", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_scattersiv8si, "vv*UcV8iV8iIi", "", "avx512vl")
+
+TARGET_BUILTIN(__builtin_ia32_sqrtpd128_mask, "V2dV2dV2dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_sqrtpd256_mask, "V4dV4dV4dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_sqrtps128_mask, "V4fV4fV4fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_sqrtps256_mask, "V8fV8fV8fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_subpd128_mask, "V2dV2dV2dV2dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_subpd256_mask, "V4dV4dV4dV4dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_subps128_mask, "V4fV4fV4fV4fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_subps256_mask, "V8fV8fV8fV8fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vpermi2vard128_mask, "V4iV4iV4iV4iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vpermi2vard256_mask, "V8iV8iV8iV8iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vpermi2varpd128_mask, "V2dV2dV2LLiV2dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vpermi2varpd256_mask, "V4dV4dV4LLiV4dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vpermi2varps128_mask, "V4fV4fV4iV4fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vpermi2varps256_mask, "V8fV8fV8iV8fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vpermi2varq128_mask, "V2LLiV2LLiV2LLiV2LLiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vpermi2varq256_mask, "V4LLiV4LLiV4LLiV4LLiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vpermt2vard128_mask, "V4iV4iV4iV4iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vpermt2vard128_maskz, "V4iV4iV4iV4iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vpermt2vard256_mask, "V8iV8iV8iV8iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vpermt2vard256_maskz, "V8iV8iV8iV8iUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vpermt2varpd128_mask, "V2dV2LLiV2dV2dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vpermt2varpd128_maskz, "V2dV2LLiV2dV2dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vpermt2varpd256_mask, "V4dV4LLiV4dV4dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vpermt2varpd256_maskz, "V4dV4LLiV4dV4dUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vpermt2varps128_mask, "V4fV4iV4fV4fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vpermt2varps128_maskz, "V4fV4iV4fV4fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vpermt2varps256_mask, "V8fV8iV8fV8fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vpermt2varps256_maskz, "V8fV8iV8fV8fUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vpermt2varq128_mask, "V2LLiV2LLiV2LLiV2LLiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vpermt2varq128_maskz, "V2LLiV2LLiV2LLiV2LLiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vpermt2varq256_mask, "V4LLiV4LLiV4LLiV4LLiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vpermt2varq256_maskz, "V4LLiV4LLiV4LLiV4LLiUc", "", "avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pmovswb512_mask, "V32cV32sV32cUi", "", "avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pmovuswb512_mask, "V32cV32sV32cUi", "", "avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pmovwb512_mask, "V32cV32sV32cUi", "", "avx512bw")
+TARGET_BUILTIN(__builtin_ia32_punpckhbw512_mask, "V64cV64cV64cV64cULLi", "", "avx512bw")
+TARGET_BUILTIN(__builtin_ia32_punpckhwd512_mask, "V32sV32sV32sV32sUi", "", "avx512bw")
+TARGET_BUILTIN(__builtin_ia32_punpcklbw512_mask, "V64cV64cV64cV64cULLi", "", "avx512bw")
+TARGET_BUILTIN(__builtin_ia32_punpcklwd512_mask, "V32sV32sV32sV32sUi", "", "avx512bw")
+TARGET_BUILTIN(__builtin_ia32_cvtpd2qq128_mask, "V2LLiV2dV2LLiUc", "", "avx512vl,avx512dq")
+TARGET_BUILTIN(__builtin_ia32_cvtpd2qq256_mask, "V4LLiV4dV4LLiUc", "", "avx512vl,avx512dq")
+TARGET_BUILTIN(__builtin_ia32_cvtpd2uqq128_mask, "V2LLiV2dV2LLiUc", "", "avx512vl,avx512dq")
+TARGET_BUILTIN(__builtin_ia32_cvtpd2uqq256_mask, "V4LLiV4dV4LLiUc", "", "avx512vl,avx512dq")
+TARGET_BUILTIN(__builtin_ia32_cvtps2qq128_mask, "V2LLiV4fV2LLiUc", "", "avx512vl,avx512dq")
+TARGET_BUILTIN(__builtin_ia32_cvtps2qq256_mask, "V4LLiV4fV4LLiUc", "", "avx512vl,avx512dq")
+TARGET_BUILTIN(__builtin_ia32_cvtps2uqq128_mask, "V2LLiV4fV2LLiUc", "", "avx512vl,avx512dq")
+TARGET_BUILTIN(__builtin_ia32_cvtps2uqq256_mask, "V4LLiV4fV4LLiUc", "", "avx512vl,avx512dq")
+TARGET_BUILTIN(__builtin_ia32_cvtqq2pd128_mask, "V2dV2LLiV2dUc", "", "avx512vl,avx512dq")
+TARGET_BUILTIN(__builtin_ia32_cvtqq2pd256_mask, "V4dV4LLiV4dUc", "", "avx512vl,avx512dq")
+TARGET_BUILTIN(__builtin_ia32_cvtqq2ps128_mask, "V4fV2LLiV4fUc", "", "avx512vl,avx512dq")
+TARGET_BUILTIN(__builtin_ia32_cvtqq2ps256_mask, "V4fV4LLiV4fUc", "", "avx512vl,avx512dq")
+TARGET_BUILTIN(__builtin_ia32_cvttpd2qq128_mask, "V2LLiV2dV2LLiUc", "", "avx512vl,avx512dq")
+TARGET_BUILTIN(__builtin_ia32_cvttpd2qq256_mask, "V4LLiV4dV4LLiUc", "", "avx512vl,avx512dq")
+TARGET_BUILTIN(__builtin_ia32_cvttpd2uqq128_mask, "V2LLiV2dV2LLiUc", "", "avx512vl,avx512dq")
+TARGET_BUILTIN(__builtin_ia32_cvttpd2uqq256_mask, "V4LLiV4dV4LLiUc", "", "avx512vl,avx512dq")
+TARGET_BUILTIN(__builtin_ia32_cvttps2qq128_mask, "V2LLiV4fV2LLiUc", "", "avx512vl,avx512dq")
+TARGET_BUILTIN(__builtin_ia32_cvttps2qq256_mask, "V4LLiV4fV4LLiUc", "", "avx512vl,avx512dq")
+TARGET_BUILTIN(__builtin_ia32_cvttps2uqq128_mask, "V2LLiV4fV2LLiUc", "", "avx512vl,avx512dq")
+TARGET_BUILTIN(__builtin_ia32_cvttps2uqq256_mask, "V4LLiV4fV4LLiUc", "", "avx512vl,avx512dq")
+TARGET_BUILTIN(__builtin_ia32_cvtuqq2pd128_mask, "V2dV2LLiV2dUc", "", "avx512vl,avx512dq")
+TARGET_BUILTIN(__builtin_ia32_cvtuqq2pd256_mask, "V4dV4LLiV4dUc", "", "avx512vl,avx512dq")
+TARGET_BUILTIN(__builtin_ia32_cvtuqq2ps128_mask, "V4fV2LLiV4fUc", "", "avx512vl,avx512dq")
+TARGET_BUILTIN(__builtin_ia32_cvtuqq2ps256_mask, "V4fV4LLiV4fUc", "", "avx512vl,avx512dq")
+TARGET_BUILTIN(__builtin_ia32_rangepd128_mask, "V2dV2dV2dIiV2dUc", "", "avx512vl,avx512dq")
+TARGET_BUILTIN(__builtin_ia32_rangepd256_mask, "V4dV4dV4dIiV4dUc", "", "avx512vl,avx512dq")
+TARGET_BUILTIN(__builtin_ia32_rangeps128_mask, "V4fV4fV4fIiV4fUc", "", "avx512vl,avx512dq")
+TARGET_BUILTIN(__builtin_ia32_rangeps256_mask, "V8fV8fV8fIiV8fUc", "", "avx512vl,avx512dq")
+TARGET_BUILTIN(__builtin_ia32_reducepd128_mask, "V2dV2dIiV2dUc", "", "avx512vl,avx512dq")
+TARGET_BUILTIN(__builtin_ia32_reducepd256_mask, "V4dV4dIiV4dUc", "", "avx512vl,avx512dq")
+TARGET_BUILTIN(__builtin_ia32_reduceps128_mask, "V4fV4fIiV4fUc", "", "avx512vl,avx512dq")
+TARGET_BUILTIN(__builtin_ia32_reduceps256_mask, "V8fV8fIiV8fUc", "", "avx512vl,avx512dq")
+TARGET_BUILTIN(__builtin_ia32_pmaddubsw128_mask, "V8sV16cV16cV8sUc", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pmaddubsw256_mask, "V16sV32cV32cV16sUs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pmaddwd128_mask, "V4iV8sV8sV4iUc", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pmaddwd256_mask, "V8iV16sV16sV8iUc", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pmovswb128_mask, "V16cV8sV16cUc", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pmovswb256_mask, "V16cV16sV16cUs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pmovuswb128_mask, "V16cV8sV16cUc", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pmovuswb256_mask, "V16cV16sV16cUs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pmovwb128_mask, "V16cV8sV16cUc", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pmovwb256_mask, "V16cV16sV16cUs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pmulhrsw128_mask, "V8sV8sV8sV8sUc", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pmulhrsw256_mask, "V16sV16sV16sV16sUs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pmulhuw128_mask, "V8sV8sV8sV8sUc", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pmulhuw256_mask, "V16sV16sV16sV16sUs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pmulhw128_mask, "V8sV8sV8sV8sUc", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pmulhw256_mask, "V16sV16sV16sV16sUs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_punpckhbw128_mask, "V16cV16cV16cV16cUs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_punpckhbw256_mask, "V32cV32cV32cV32cUi", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_punpckhwd128_mask, "V8sV8sV8sV8sUc", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_punpckhwd256_mask, "V16sV16sV16sV16sUs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_punpcklbw128_mask, "V16cV16cV16cV16cUs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_punpcklbw256_mask, "V32cV32cV32cV32cUi", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_punpcklwd128_mask, "V8sV8sV8sV8sUc", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_punpcklwd256_mask, "V16sV16sV16sV16sUs", "", "avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_cvtpd2qq512_mask, "V8LLiV8dV8LLiUcIi", "", "avx512dq")
+TARGET_BUILTIN(__builtin_ia32_cvtpd2uqq512_mask, "V8LLiV8dV8LLiUcIi", "", "avx512dq")
+TARGET_BUILTIN(__builtin_ia32_cvtps2qq512_mask, "V8LLiV8fV8LLiUcIi", "", "avx512dq")
+TARGET_BUILTIN(__builtin_ia32_cvtps2uqq512_mask, "V8LLiV8fV8LLiUcIi", "", "avx512dq")
+TARGET_BUILTIN(__builtin_ia32_cvtqq2pd512_mask, "V8dV8LLiV8dUcIi", "", "avx512dq")
+TARGET_BUILTIN(__builtin_ia32_cvtqq2ps512_mask, "V8fV8LLiV8fUcIi", "", "avx512dq")
+TARGET_BUILTIN(__builtin_ia32_cvttpd2qq512_mask, "V8LLiV8dV8LLiUcIi", "", "avx512dq")
+TARGET_BUILTIN(__builtin_ia32_cvttpd2uqq512_mask, "V8LLiV8dV8LLiUcIi", "", "avx512dq")
+TARGET_BUILTIN(__builtin_ia32_cvttps2qq512_mask, "V8LLiV8fV8LLiUcIi", "", "avx512dq")
+TARGET_BUILTIN(__builtin_ia32_cvttps2uqq512_mask, "V8LLiV8fV8LLiUcIi", "", "avx512dq")
+TARGET_BUILTIN(__builtin_ia32_cvtuqq2pd512_mask, "V8dV8LLiV8dUcIi", "", "avx512dq")
+TARGET_BUILTIN(__builtin_ia32_cvtuqq2ps512_mask, "V8fV8LLiV8fUcIi", "", "avx512dq")
+TARGET_BUILTIN(__builtin_ia32_rangepd512_mask, "V8dV8dV8dIiV8dUcIi", "", "avx512dq")
+TARGET_BUILTIN(__builtin_ia32_rangeps512_mask, "V16fV16fV16fIiV16fUsIi", "", "avx512dq")
+TARGET_BUILTIN(__builtin_ia32_reducepd512_mask, "V8dV8dIiV8dUcIi", "", "avx512dq")
+TARGET_BUILTIN(__builtin_ia32_reduceps512_mask, "V16fV16fIiV16fUsIi", "", "avx512dq")
#undef BUILTIN
+#undef TARGET_BUILTIN
diff --git a/include/clang/Basic/DeclNodes.td b/include/clang/Basic/DeclNodes.td
index e1a23120c1860..723ea547d8aaf 100644
--- a/include/clang/Basic/DeclNodes.td
+++ b/include/clang/Basic/DeclNodes.td
@@ -59,6 +59,7 @@ def Named : Decl<1>;
def VarTemplate : DDecl<RedeclarableTemplate>;
def TypeAliasTemplate : DDecl<RedeclarableTemplate>;
def TemplateTemplateParm : DDecl<Template>;
+ def BuiltinTemplate : DDecl<Template>;
def Using : DDecl<Named>;
def UsingShadow : DDecl<Named>;
def ObjCMethod : DDecl<Named>, DeclContext;
diff --git a/include/clang/Basic/Diagnostic.h b/include/clang/Basic/Diagnostic.h
index 3b7c282d37add..1d6c19bc9539d 100644
--- a/include/clang/Basic/Diagnostic.h
+++ b/include/clang/Basic/Diagnostic.h
@@ -864,28 +864,27 @@ public:
/// the common fields to registers, eliminating increments of the NumArgs field,
/// for example.
class DiagnosticBuilder {
- mutable DiagnosticsEngine *DiagObj;
- mutable unsigned NumArgs;
+ mutable DiagnosticsEngine *DiagObj = nullptr;
+ mutable unsigned NumArgs = 0;
/// \brief Status variable indicating if this diagnostic is still active.
///
// NOTE: This field is redundant with DiagObj (IsActive iff (DiagObj == 0)),
// but LLVM is not currently smart enough to eliminate the null check that
// Emit() would end up with if we used that as our status variable.
- mutable bool IsActive;
+ mutable bool IsActive = false;
/// \brief Flag indicating that this diagnostic is being emitted via a
/// call to ForceEmit.
- mutable bool IsForceEmit;
+ mutable bool IsForceEmit = false;
void operator=(const DiagnosticBuilder &) = delete;
friend class DiagnosticsEngine;
- DiagnosticBuilder()
- : DiagObj(nullptr), NumArgs(0), IsActive(false), IsForceEmit(false) {}
+ DiagnosticBuilder() = default;
explicit DiagnosticBuilder(DiagnosticsEngine *diagObj)
- : DiagObj(diagObj), NumArgs(0), IsActive(true), IsForceEmit(false) {
+ : DiagObj(diagObj), IsActive(true) {
assert(diagObj && "DiagnosticBuilder requires a valid DiagnosticsEngine!");
diagObj->DiagRanges.clear();
diagObj->DiagFixItHints.clear();
@@ -1077,14 +1076,14 @@ operator<<(const DiagnosticBuilder &DB, T *DC) {
}
inline const DiagnosticBuilder &operator<<(const DiagnosticBuilder &DB,
- const SourceRange &R) {
+ SourceRange R) {
DB.AddSourceRange(CharSourceRange::getTokenRange(R));
return DB;
}
inline const DiagnosticBuilder &operator<<(const DiagnosticBuilder &DB,
ArrayRef<SourceRange> Ranges) {
- for (const SourceRange &R: Ranges)
+ for (SourceRange R : Ranges)
DB.AddSourceRange(CharSourceRange::getTokenRange(R));
return DB;
}
@@ -1264,7 +1263,7 @@ class StoredDiagnostic {
std::vector<FixItHint> FixIts;
public:
- StoredDiagnostic();
+ StoredDiagnostic() = default;
StoredDiagnostic(DiagnosticsEngine::Level Level, const Diagnostic &Info);
StoredDiagnostic(DiagnosticsEngine::Level Level, unsigned ID,
StringRef Message);
@@ -1272,7 +1271,6 @@ public:
StringRef Message, FullSourceLoc Loc,
ArrayRef<CharSourceRange> Ranges,
ArrayRef<FixItHint> Fixits);
- ~StoredDiagnostic();
/// \brief Evaluates true when this object stores a diagnostic.
explicit operator bool() const { return Message.size() > 0; }
diff --git a/include/clang/Basic/DiagnosticCommonKinds.td b/include/clang/Basic/DiagnosticCommonKinds.td
index fc3ca62113e5d..ccc271a69f912 100644
--- a/include/clang/Basic/DiagnosticCommonKinds.td
+++ b/include/clang/Basic/DiagnosticCommonKinds.td
@@ -84,6 +84,10 @@ def err_module_not_built : Error<"could not build module '%0'">, DefaultFatal;
def err_module_build_disabled: Error<
"module '%0' is needed but has not been provided, and implicit use of module "
"files is disabled">, DefaultFatal;
+def err_module_unavailable : Error<
+ "module '%0' %select{is incompatible with|requires}1 feature '%2'">;
+def err_module_header_missing : Error<
+ "%select{|umbrella }0header '%1' not found">;
def err_module_lock_failure : Error<
"could not acquire lock file for module '%0'">, DefaultFatal;
def err_module_lock_timeout : Error<
@@ -194,9 +198,8 @@ def err_unable_to_make_temp : Error<
"unable to make temporary file: %0">;
// Modules
-def err_module_file_conflict : Error<"module '%0' found in both '%1' and '%2'">;
def err_module_format_unhandled : Error<
- "no handler registered for module format '%0'">;
+ "no handler registered for module format '%0'">, DefaultFatal;
// TransformActions
// TODO: Use a custom category name to distinguish rewriter errors.
@@ -208,4 +211,7 @@ def note_mt_message : Note<"[rewriter] %0">;
def warn_arcmt_nsalloc_realloc : Warning<"[rewriter] call returns pointer to GC managed memory; it will become unmanaged in ARC">;
def err_arcmt_nsinvocation_ownership : Error<"NSInvocation's %0 is not safe to be used with an object with ownership other than __unsafe_unretained">;
+// OpenMP
+def err_omp_more_one_clause : Error<
+ "directive '#pragma omp %0' cannot contain more than one '%1' clause%select{| with '%3' name modifier| with 'source' dependence}2">;
}
diff --git a/include/clang/Basic/DiagnosticDriverKinds.td b/include/clang/Basic/DiagnosticDriverKinds.td
index f7f09da4ea6e6..7a71285482f6c 100644
--- a/include/clang/Basic/DiagnosticDriverKinds.td
+++ b/include/clang/Basic/DiagnosticDriverKinds.td
@@ -81,6 +81,8 @@ def err_drv_invalid_mfloat_abi : Error<
"invalid float ABI '%0'">;
def err_drv_invalid_libcxx_deployment : Error<
"invalid deployment target for -stdlib=libc++ (requires %0 or later)">;
+def err_drv_invalid_argument_to_fdebug_prefix_map : Error<
+ "invalid argument '%0' to -fdebug-prefix-map">;
def err_drv_malformed_sanitizer_blacklist : Error<
"malformed sanitizer blacklist: '%0'">;
@@ -100,12 +102,18 @@ def err_drv_cc_print_options_failure : Error<
"unable to open CC_PRINT_OPTIONS file: %0">;
def err_drv_preamble_format : Error<
"incorrect format for -preamble-bytes=N,END">;
+def err_drv_conflicting_deployment_targets : Error<
+ "conflicting deployment targets, both '%0' and '%1' are present in environment">;
def err_drv_objc_gc_arr : Error<
"cannot specify both '-fobjc-arc' and '%0'">;
def err_arc_unsupported_on_runtime : Error<
"-fobjc-arc is not supported on platforms using the legacy runtime">;
def err_arc_unsupported_on_toolchain : Error< // feel free to generalize this
"-fobjc-arc is not supported on versions of OS X prior to 10.6">;
+def err_objc_weak_with_gc : Error<
+ "-fobjc-weak is not supported in Objective-C garbage collection">;
+def err_objc_weak_unsupported : Error<
+ "-fobjc-weak is not supported on the current deployment target">;
def err_drv_mg_requires_m_or_mm : Error<
"option '-MG' requires '-M' or '-MM'">;
def err_drv_unknown_objc_runtime : Error<
@@ -117,6 +125,8 @@ def err_drv_optimization_remark_pattern : Error<
def err_drv_no_neon_modifier : Error<"[no]neon is not accepted as modifier, please use [no]simd instead">;
def warn_O4_is_O3 : Warning<"-O4 is equivalent to -O3">, InGroup<Deprecated>;
+def warn_drv_lto_libpath : Warning<"libLTO.dylib relative to clang installed dir not found; using 'ld' default search path instead">,
+ InGroup<LibLTO>;
def warn_drv_optimization_value : Warning<"optimization level '%0' is not supported; using '%1%2' instead">,
InGroup<InvalidCommandLineArgument>;
def warn_ignored_gcc_optimization : Warning<"optimization flag '%0' is not supported">,
@@ -183,6 +193,10 @@ def err_drv_modules_validate_once_requires_timestamp : Error<
"option '-fmodules-validate-once-per-build-session' requires "
"'-fbuild-session-timestamp=<seconds since Epoch>' or '-fbuild-session-file=<file>'">;
+def err_test_module_file_extension_format : Error<
+ "-ftest-module-file-extension argument '%0' is not of the required form "
+ "'blockname:major:minor:hashed:user info'">;
+
def warn_drv_invoking_fallback : Warning<"falling back to %0">,
InGroup<Fallback>;
@@ -192,4 +206,18 @@ def warn_target_unsupported_nan2008 : Warning<
def warn_target_unsupported_nanlegacy : Warning<
"ignoring '-mnan=legacy' option because the '%0' architecture does not support it">,
InGroup<UnsupportedNan>;
+
+def warn_drv_unable_to_find_directory_expected : Warning<
+ "unable to find %0 directory, expected to be in '%1'">,
+ InGroup<InvalidOrNonExistentDirectory>, DefaultIgnore;
+
+def warn_drv_ps4_force_pic : Warning<
+ "option '%0' was ignored by the PS4 toolchain, using '-fPIC'">,
+ InGroup<OptionIgnored>;
+
+def warn_drv_ps4_sdk_dir : Warning<
+ "environment variable SCE_PS4_SDK_DIR is set, but points to invalid or nonexistent directory '%0'">,
+ InGroup<InvalidOrNonExistentDirectory>;
+
+def err_drv_unsupported_linker : Error<"unsupported value '%0' for -linker option">;
}
diff --git a/include/clang/Basic/DiagnosticFrontendKinds.td b/include/clang/Basic/DiagnosticFrontendKinds.td
index f4ab4800c9e79..033834bc505da 100644
--- a/include/clang/Basic/DiagnosticFrontendKinds.td
+++ b/include/clang/Basic/DiagnosticFrontendKinds.td
@@ -45,6 +45,17 @@ def remark_fe_backend_optimization_remark_missed : Remark<"%0">, BackendInfo,
InGroup<BackendOptimizationRemarkMissed>;
def remark_fe_backend_optimization_remark_analysis : Remark<"%0">, BackendInfo,
InGroup<BackendOptimizationRemarkAnalysis>;
+def remark_fe_backend_optimization_remark_analysis_fpcommute : Remark<"%0; "
+ "allow reordering by specifying '#pragma clang loop vectorize(enable)' "
+ "before the loop or by providing the compiler option '-ffast-math'.">,
+ BackendInfo, InGroup<BackendOptimizationRemarkAnalysis>;
+def remark_fe_backend_optimization_remark_analysis_aliasing : Remark<"%0; "
+ "allow reordering by specifying '#pragma clang loop vectorize(enable)' "
+ "before the loop. If the arrays will always be independent specify "
+ "'#pragma clang loop vectorize(assume_safety)' before the loop or provide "
+ "the '__restrict__' qualifier with the independent array arguments. "
+ "Erroneous results will occur if these options are incorrectly applied!">,
+ BackendInfo, InGroup<BackendOptimizationRemarkAnalysis>;
def warn_fe_backend_optimization_failure : Warning<"%0">, BackendInfo,
InGroup<BackendOptimizationFailure>, DefaultWarn;
def note_fe_backend_optimization_remark_invalid_loc : Note<"could "
@@ -161,6 +172,9 @@ def warn_incompatible_analyzer_plugin_api : Warning<
def note_incompatible_analyzer_plugin_api : Note<
"current API version is '%0', but plugin was compiled with version '%1'">;
+def warn_module_config_mismatch : Warning<
+ "module file %0 cannot be loaded due to a configuration mismatch with the current "
+ "compilation">, InGroup<DiagGroup<"module-file-config-mismatch">>, DefaultError;
def err_module_map_not_found : Error<"module map file '%0' not found">,
DefaultFatal;
def err_missing_module_name : Error<
@@ -173,10 +187,6 @@ def err_no_submodule_suggest : Error<
"no submodule named %0 in module '%1'; did you mean '%2'?">;
def warn_missing_submodule : Warning<"missing submodule '%0'">,
InGroup<IncompleteUmbrella>;
-def err_module_unavailable : Error<
- "module '%0' %select{is incompatible with|requires}1 feature '%2'">;
-def err_module_header_missing : Error<
- "%select{|umbrella }0header '%1' not found">;
def err_module_cannot_create_includes : Error<
"cannot create includes file for module %0: %1">;
def warn_module_config_macro_undef : Warning<
@@ -190,20 +200,17 @@ def remark_module_build : Remark<"building module '%0' as '%1'">,
InGroup<ModuleBuild>;
def remark_module_build_done : Remark<"finished building module '%0'">,
InGroup<ModuleBuild>;
+def err_modules_embed_file_not_found :
+ Error<"file '%0' specified by '-fmodules-embed-file=' not found">,
+ DefaultFatal;
+
+def err_test_module_file_extension_version : Error<
+ "test module file extension '%0' has different version (%1.%2) than expected "
+ "(%3.%4)">;
def err_conflicting_module_names : Error<
"conflicting module names specified: '-fmodule-name=%0' and "
"'-fmodule-implementation-of %1'">;
-def err_conflicting_module_files : Error<
- "module '%0' is defined in both '%1' and '%2'">;
-def err_module_file_not_found : Error<
- "module file '%0' not found">, DefaultFatal;
-def err_module_file_invalid : Error<
- "file '%0' is not a valid precompiled module file">, DefaultFatal;
-def note_module_file_imported_by : Note<
- "imported by %select{|module '%2' in }1'%0'">;
-def err_module_file_not_module : Error<
- "AST file '%0' was not built as a module">, DefaultFatal;
def err_missing_vfs_overlay_file : Error<
"virtual filesystem overlay file '%0' not found">, DefaultFatal;
diff --git a/include/clang/Basic/DiagnosticGroups.td b/include/clang/Basic/DiagnosticGroups.td
index 4ecd5d5e18425..8e5f57d6d8906 100644
--- a/include/clang/Basic/DiagnosticGroups.td
+++ b/include/clang/Basic/DiagnosticGroups.td
@@ -24,14 +24,17 @@ def : DiagGroup<"aggregate-return">;
def GNUAlignofExpression : DiagGroup<"gnu-alignof-expression">;
def AmbigMemberTemplate : DiagGroup<"ambiguous-member-template">;
def GNUAnonymousStruct : DiagGroup<"gnu-anonymous-struct">;
+def GNUAutoType : DiagGroup<"gnu-auto-type">;
def ArrayBounds : DiagGroup<"array-bounds">;
def ArrayBoundsPointerArithmetic : DiagGroup<"array-bounds-pointer-arithmetic">;
def Availability : DiagGroup<"availability">;
def Section : DiagGroup<"section">;
def AutoImport : DiagGroup<"auto-import">;
+def CXX14BinaryLiteral : DiagGroup<"c++14-binary-literal">;
def GNUBinaryLiteral : DiagGroup<"gnu-binary-literal">;
def GNUCompoundLiteralInitializer : DiagGroup<"gnu-compound-literal-initializer">;
def BitFieldConstantConversion : DiagGroup<"bitfield-constant-conversion">;
+def BitFieldWidth : DiagGroup<"bitfield-width">;
def ConstantConversion :
DiagGroup<"constant-conversion", [ BitFieldConstantConversion ] >;
def LiteralConversion : DiagGroup<"literal-conversion">;
@@ -44,6 +47,7 @@ def BoolConversion : DiagGroup<"bool-conversion", [PointerBoolConversion,
def IntConversion : DiagGroup<"int-conversion">;
def EnumConversion : DiagGroup<"enum-conversion">;
def FloatConversion : DiagGroup<"float-conversion">;
+def DoublePromotion : DiagGroup<"double-promotion">;
def EnumTooLarge : DiagGroup<"enum-too-large">;
def UnsupportedNan : DiagGroup<"unsupported-nan">;
def NonLiteralNullConversion : DiagGroup<"non-literal-null-conversion">;
@@ -79,6 +83,7 @@ def AbstractFinalClass : DiagGroup<"abstract-final-class">;
def CXX11CompatDeprecatedWritableStr :
DiagGroup<"c++11-compat-deprecated-writable-strings">;
+def DeprecatedAttributes : DiagGroup<"deprecated-attributes">;
def DeprecatedDeclarations : DiagGroup<"deprecated-declarations">;
def UnavailableDeclarations : DiagGroup<"unavailable-declarations">;
def PartialAvailability : DiagGroup<"partial-availability">;
@@ -88,12 +93,14 @@ def DeprecatedRegister : DiagGroup<"deprecated-register">;
def DeprecatedWritableStr : DiagGroup<"deprecated-writable-strings",
[CXX11CompatDeprecatedWritableStr]>;
// FIXME: Why is DeprecatedImplementations not in this group?
-def Deprecated : DiagGroup<"deprecated", [DeprecatedDeclarations,
+def Deprecated : DiagGroup<"deprecated", [DeprecatedAttributes,
+ DeprecatedDeclarations,
DeprecatedIncrementBool,
DeprecatedRegister,
DeprecatedWritableStr]>,
DiagCategory<"Deprecations">;
+def LibLTO : DiagGroup<"liblto">;
def : DiagGroup<"disabled-optimization">;
def : DiagGroup<"discard-qual">;
def : DiagGroup<"div-by-zero">;
@@ -180,6 +187,9 @@ def CXX14Compat : DiagGroup<"c++14-compat", [CXXPre1zCompat]>;
def CXX14CompatPedantic : DiagGroup<"c++14-compat-pedantic",
[CXXPre1zCompatPedantic]>;
+def CXX1zCompat : DiagGroup<"c++1z-compat", [DeprecatedRegister,
+ DeprecatedIncrementBool]>;
+
def : DiagGroup<"effc++">;
def DivZero : DiagGroup<"division-by-zero">;
def ExitTimeDestructors : DiagGroup<"exit-time-destructors">;
@@ -195,10 +205,12 @@ def DanglingElse: DiagGroup<"dangling-else">;
def DanglingField : DiagGroup<"dangling-field">;
def DistributedObjectModifiers : DiagGroup<"distributed-object-modifiers">;
def FlagEnum : DiagGroup<"flag-enum">;
+def IncrementBool : DiagGroup<"increment-bool", [DeprecatedIncrementBool]>;
def InfiniteRecursion : DiagGroup<"infinite-recursion">;
def GNUImaginaryConstant : DiagGroup<"gnu-imaginary-constant">;
def IgnoredQualifiers : DiagGroup<"ignored-qualifiers">;
def : DiagGroup<"import">;
+def GNUIncludeNext : DiagGroup<"gnu-include-next">;
def IncompatibleMSStruct : DiagGroup<"incompatible-ms-struct">;
def IncompatiblePointerTypesDiscardsQualifiers
: DiagGroup<"incompatible-pointer-types-discards-qualifiers">;
@@ -213,6 +225,7 @@ def NonModularIncludeInModule : DiagGroup<"non-modular-include-in-module",
def IncompleteModule : DiagGroup<"incomplete-module",
[IncompleteUmbrella, NonModularIncludeInModule]>;
+def CXX11InlineNamespace : DiagGroup<"c++11-inline-namespace">;
def InvalidNoreturn : DiagGroup<"invalid-noreturn">;
def InvalidSourceEncoding : DiagGroup<"invalid-source-encoding">;
def KNRPromotedParameter : DiagGroup<"knr-promoted-parameter">;
@@ -247,6 +260,7 @@ def MismatchedTags : DiagGroup<"mismatched-tags">;
def MissingFieldInitializers : DiagGroup<"missing-field-initializers">;
def ModuleBuild : DiagGroup<"module-build">;
def ModuleConflict : DiagGroup<"module-conflict">;
+def ModuleFileExtension : DiagGroup<"module-file-extension">;
def NewlineEOF : DiagGroup<"newline-eof">;
def Nullability : DiagGroup<"nullability">;
def NullabilityDeclSpec : DiagGroup<"nullability-declspec">;
@@ -304,6 +318,7 @@ def : DiagGroup<"redundant-decls">;
def RedeclaredClassMember : DiagGroup<"redeclared-class-member">;
def GNURedeclaredEnum : DiagGroup<"gnu-redeclared-enum">;
def RedundantMove : DiagGroup<"redundant-move">;
+def Register : DiagGroup<"register", [DeprecatedRegister]>;
def ReturnStackAddress : DiagGroup<"return-stack-address">;
def ReturnTypeCLinkage : DiagGroup<"return-type-c-linkage">;
def ReturnType : DiagGroup<"return-type", [ReturnTypeCLinkage]>;
@@ -648,7 +663,10 @@ def Consumed : DiagGroup<"consumed">;
// Note that putting warnings in -Wall will not disable them by default. If a
// warning should be active _only_ when -Wall is passed in, mark it as
// DefaultIgnore in addition to putting it here.
-def : DiagGroup<"all", [Most, Parentheses, Switch, SwitchBool]>;
+def All : DiagGroup<"all", [Most, Parentheses, Switch, SwitchBool]>;
+
+// Warnings that should be in clang-cl /w4.
+def : DiagGroup<"CL4", [All, Extra]>;
// Warnings enabled by -pedantic. This is magically filled in by TableGen.
def Pedantic : DiagGroup<"pedantic">;
@@ -675,11 +693,12 @@ def NonGCC : DiagGroup<"non-gcc",
// A warning group for warnings about using C++11 features as extensions in
// earlier C++ versions.
-def CXX11 : DiagGroup<"c++11-extensions", [CXX11ExtraSemi, CXX11LongLong]>;
+def CXX11 : DiagGroup<"c++11-extensions", [CXX11ExtraSemi, CXX11InlineNamespace,
+ CXX11LongLong]>;
// A warning group for warnings about using C++14 features as extensions in
// earlier C++ versions.
-def CXX14 : DiagGroup<"c++14-extensions">;
+def CXX14 : DiagGroup<"c++14-extensions", [CXX14BinaryLiteral]>;
// A warning group for warnings about using C++1z features as extensions in
// earlier C++ versions.
@@ -699,13 +718,15 @@ def C99 : DiagGroup<"c99-extensions">;
// A warning group for warnings about GCC extensions.
def GNU : DiagGroup<"gnu", [GNUAlignofExpression, GNUAnonymousStruct,
+ GNUAutoType,
GNUBinaryLiteral, GNUCaseRange,
GNUComplexInteger, GNUCompoundLiteralInitializer,
GNUConditionalOmittedOperand, GNUDesignator,
GNUEmptyInitializer, GNUEmptyStruct,
VLAExtension, GNUFlexibleArrayInitializer,
GNUFlexibleArrayUnionMember, GNUFoldingConstant,
- GNUImaginaryConstant, GNULabelsAsValue,
+ GNUImaginaryConstant, GNUIncludeNext,
+ GNULabelsAsValue,
RedeclaredClassMember, GNURedeclaredEnum,
GNUStatementExpression, GNUStaticFloatInit,
GNUStringLiteralOperatorTemplate,
@@ -715,8 +736,52 @@ def GNU : DiagGroup<"gnu", [GNUAlignofExpression, GNUAnonymousStruct,
// A warning group for warnings about code that clang accepts but gcc doesn't.
def GccCompat : DiagGroup<"gcc-compat">;
-// A warning group for warnings about Microsoft extensions.
-def Microsoft : DiagGroup<"microsoft">;
+// Warnings for Microsoft extensions.
+def MicrosoftCharize : DiagGroup<"microsoft-charize">;
+def MicrosoftInclude : DiagGroup<"microsoft-include">;
+def MicrosoftCppMacro : DiagGroup<"microsoft-cpp-macro">;
+def MicrosoftFixedEnum : DiagGroup<"microsoft-fixed-enum">;
+def MicrosoftSealed : DiagGroup<"microsoft-sealed">;
+def MicrosoftUnqualifiedFriend : DiagGroup<"microsoft-unqualified-friend">;
+def MicrosoftExceptionSpec : DiagGroup<"microsoft-exception-spec">;
+def MicrosoftUsingDecl : DiagGroup<"microsoft-using-decl">;
+def MicrosoftMutableReference : DiagGroup<"microsoft-mutable-reference">;
+def MicrosoftPureDefinition : DiagGroup<"microsoft-pure-definition">;
+def MicrosoftUnionMemberReference : DiagGroup<
+ "microsoft-union-member-reference">;
+def MicrosoftExplicitConstructorCall : DiagGroup<
+ "microsoft-explicit-constructor-call">;
+def MicrosoftEnumValue : DiagGroup<"microsoft-enum-value">;
+def MicrosoftDefaultArgRedefinition :
+ DiagGroup<"microsoft-default-arg-redefinition">;
+def MicrosoftTemplate : DiagGroup<"microsoft-template">;
+def MicrosoftRedeclareStatic : DiagGroup<"microsoft-redeclare-static">;
+def MicrosoftEnumForwardReference :
+ DiagGroup<"microsoft-enum-forward-reference">;
+def MicrosoftGoto : DiagGroup<"microsoft-goto">;
+def MicrosoftFlexibleArray : DiagGroup<"microsoft-flexible-array">;
+def MicrosoftExtraQualification : DiagGroup<"microsoft-extra-qualification">;
+def MicrosoftCast : DiagGroup<"microsoft-cast">;
+def MicrosoftConstInit : DiagGroup<"microsoft-const-init">;
+def MicrosoftVoidPseudoDtor : DiagGroup<"microsoft-void-pseudo-dtor">;
+def MicrosoftAnonTag : DiagGroup<"microsoft-anon-tag">;
+def MicrosoftCommentPaste : DiagGroup<"microsoft-comment-paste">;
+def MicrosoftEndOfFile : DiagGroup<"microsoft-end-of-file">;
+// Aliases.
+def : DiagGroup<"msvc-include", [MicrosoftInclude]>;
+ // -Wmsvc-include = -Wmicrosoft-include
+
+// Warnings group for warnings about Microsoft extensions.
+def Microsoft : DiagGroup<"microsoft",
+ [MicrosoftCharize, MicrosoftInclude, MicrosoftCppMacro, MicrosoftFixedEnum,
+ MicrosoftSealed, MicrosoftUnqualifiedFriend, MicrosoftExceptionSpec,
+ MicrosoftUsingDecl, MicrosoftMutableReference, MicrosoftPureDefinition,
+ MicrosoftUnionMemberReference, MicrosoftExplicitConstructorCall,
+ MicrosoftEnumValue, MicrosoftDefaultArgRedefinition, MicrosoftTemplate,
+ MicrosoftRedeclareStatic, MicrosoftEnumForwardReference, MicrosoftGoto,
+ MicrosoftFlexibleArray, MicrosoftExtraQualification, MicrosoftCast,
+ MicrosoftConstInit, MicrosoftVoidPseudoDtor, MicrosoftAnonTag,
+ MicrosoftCommentPaste, MicrosoftEndOfFile]>;
def ObjCNonUnifiedException : DiagGroup<"objc-nonunified-exceptions">;
@@ -777,3 +842,7 @@ def CudaCompat : DiagGroup<"cuda-compat">;
// A warning group for things that will change semantics in the future.
def FutureCompat : DiagGroup<"future-compat">;
+
+def InvalidOrNonExistentDirectory : DiagGroup<"invalid-or-nonexistent-directory">;
+
+def OptionIgnored : DiagGroup<"option-ignored">;
diff --git a/include/clang/Basic/DiagnosticLexKinds.td b/include/clang/Basic/DiagnosticLexKinds.td
index 5dd4ae0ac7fd0..ed6ff20f5c427 100644
--- a/include/clang/Basic/DiagnosticLexKinds.td
+++ b/include/clang/Basic/DiagnosticLexKinds.td
@@ -13,9 +13,8 @@
let Component = "Lex", CategoryName = "Lexical or Preprocessor Issue" in {
-def null_in_string : Warning<"null character(s) preserved in string literal">,
- InGroup<NullCharacter>;
-def null_in_char : Warning<"null character(s) preserved in character literal">,
+def null_in_char_or_string : Warning<
+ "null character(s) preserved in %select{char|string}0 literal">,
InGroup<NullCharacter>;
def null_in_file : Warning<"null character ignored">, InGroup<NullCharacter>;
def warn_nested_block_comment : Warning<"'/*' within block comment">,
@@ -57,8 +56,15 @@ def warn_cxx98_compat_no_newline_eof : Warning<
def ext_dollar_in_identifier : Extension<"'$' in identifier">,
InGroup<DiagGroup<"dollar-in-identifier-extension">>;
-def ext_charize_microsoft : Extension<"charizing operator #@ is a Microsoft extension">,
- InGroup<Microsoft>;
+def ext_charize_microsoft : Extension<
+ "charizing operator #@ is a Microsoft extension">,
+ InGroup<MicrosoftCharize>;
+def ext_comment_paste_microsoft : Extension<
+ "pasting two '/' tokens into a '//' comment is a Microsoft extension">,
+ InGroup<MicrosoftCommentPaste>;
+def ext_ctrl_z_eof_microsoft : Extension<
+ "treating Ctrl-Z as end-of-file is a Microsoft extension">,
+ InGroup<MicrosoftEndOfFile>;
def ext_token_used : Extension<"extension used">,
InGroup<DiagGroup<"language-extension-token">>;
@@ -66,10 +72,8 @@ def ext_token_used : Extension<"extension used">,
def warn_cxx11_keyword : Warning<"'%0' is a keyword in C++11">,
InGroup<CXX11Compat>, DefaultIgnore;
-def ext_unterminated_string : ExtWarn<"missing terminating '\"' character">,
- InGroup<InvalidPPToken>;
-def ext_unterminated_char : ExtWarn<"missing terminating ' character">,
- InGroup<InvalidPPToken>;
+def ext_unterminated_char_or_string : ExtWarn<
+ "missing terminating %select{'|'\"'}0 character">, InGroup<InvalidPPToken>;
def ext_empty_character : ExtWarn<"empty character constant">,
InGroup<InvalidPPToken>;
def err_unterminated_block_comment : Error<"unterminated /* comment">;
@@ -153,13 +157,10 @@ def ext_nonstandard_escape : Extension<
"use of non-standard escape character '\\%0'">;
def ext_unknown_escape : ExtWarn<"unknown escape sequence '\\%0'">,
InGroup<DiagGroup<"unknown-escape-sequence">>;
-def err_invalid_decimal_digit : Error<"invalid digit '%0' in decimal constant">;
-def err_invalid_binary_digit : Error<"invalid digit '%0' in binary constant">;
-def err_invalid_octal_digit : Error<"invalid digit '%0' in octal constant">;
-def err_invalid_suffix_integer_constant : Error<
- "invalid suffix '%0' on integer constant">;
-def err_invalid_suffix_float_constant : Error<
- "invalid suffix '%0' on floating constant">;
+def err_invalid_digit : Error<
+ "invalid digit '%0' in %select{decimal|octal|binary}1 constant">;
+def err_invalid_suffix_constant : Error<
+ "invalid suffix '%0' on %select{integer|floating}1 constant">;
def warn_cxx11_compat_digit_separator : Warning<
"digit separators are incompatible with C++ standards before C++14">,
InGroup<CXXPre14Compat>, DefaultIgnore;
@@ -174,22 +175,20 @@ def err_multichar_utf_character_literal : Error<
def err_exponent_has_no_digits : Error<"exponent has no digits">;
def ext_imaginary_constant : Extension<
"imaginary constants are a GNU extension">, InGroup<GNUImaginaryConstant>;
-def err_hexconstant_requires_exponent : Error<
- "hexadecimal floating constants require an exponent">;
-def err_hexconstant_requires_digits : Error<
- "hexadecimal floating constants require a significand">;
+def err_hexconstant_requires: Error<
+ "hexadecimal floating constants require %select{an exponent|a significand}0">;
def ext_hexconstant_invalid : Extension<
"hexadecimal floating constants are a C99 feature">, InGroup<C99>;
def ext_binary_literal : Extension<
"binary integer literals are a GNU extension">, InGroup<GNUBinaryLiteral>;
def ext_binary_literal_cxx14 : Extension<
- "binary integer literals are a C++14 extension">, InGroup<CXX14>;
+ "binary integer literals are a C++14 extension">, InGroup<CXX14BinaryLiteral>;
def warn_cxx11_compat_binary_literal : Warning<
"binary integer literals are incompatible with C++ standards before C++14">,
InGroup<CXXPre14CompatPedantic>, DefaultIgnore;
def err_pascal_string_too_long : Error<"Pascal string is too long">;
-def err_octal_escape_too_large : Error<"octal escape sequence out of range">;
-def err_hex_escape_too_large : Error<"hex escape sequence out of range">;
+def err_escape_too_large : Error<
+ "%select{hex|octal}0 escape sequence out of range">;
def ext_string_too_long : Extension<"string literal of length %0 exceeds "
"maximum length %1 that %select{C90|ISO C99|C++}2 compilers are required to "
"support">, InGroup<OverlengthStrings>;
@@ -255,10 +254,13 @@ def err_pp_hash_error : Error<"%0">;
}
def pp_include_next_in_primary : Warning<
- "#include_next in primary source file">;
+ "#include_next in primary source file">,
+ InGroup<DiagGroup<"include-next-outside-header">>;
def pp_include_macros_out_of_predefines : Error<
"the #__include_macros directive is only for internal use by -imacros">;
-def pp_include_next_absolute_path : Warning<"#include_next with absolute path">;
+def pp_include_next_absolute_path : Warning<
+ "#include_next with absolute path">,
+ InGroup<DiagGroup<"include-next-absolute-path">>;
def ext_c99_whitespace_required_after_macro_name : ExtWarn<
"ISO C99 requires whitespace after the macro name">, InGroup<C99>;
def ext_missing_whitespace_after_macro_name : ExtWarn<
@@ -266,9 +268,11 @@ def ext_missing_whitespace_after_macro_name : ExtWarn<
def warn_missing_whitespace_after_macro_name : Warning<
"whitespace recommended after macro name">;
-def pp_pragma_once_in_main_file : Warning<"#pragma once in main file">;
+def pp_pragma_once_in_main_file : Warning<"#pragma once in main file">,
+ InGroup<DiagGroup<"pragma-once-outside-header">>;
def pp_pragma_sysheader_in_main_file : Warning<
- "#pragma system_header ignored in main file">;
+ "#pragma system_header ignored in main file">,
+ InGroup<DiagGroup<"pragma-system-header-outside-header">>;
def pp_poisoning_existing_macro : Warning<"poisoning existing macro">;
def pp_out_of_date_dependency : Warning<
"current file is older than dependency %0">;
@@ -295,27 +299,29 @@ def warn_pp_macro_hides_keyword : Extension<
def warn_pp_macro_is_reserved_id : Warning<
"macro name is a reserved identifier">, DefaultIgnore,
InGroup<ReservedIdAsMacro>;
+def warn_pp_objc_macro_redef_ignored : Warning<
+ "ignoring redefinition of Objective-C qualifier macro">,
+ InGroup<DiagGroup<"objc-macro-redefinition">>;
def pp_invalid_string_literal : Warning<
"invalid string literal, ignoring final '\\'">;
def warn_pp_expr_overflow : Warning<
"integer overflow in preprocessor expression">;
-def warn_pp_convert_lhs_to_positive : Warning<
- "left side of operator converted from negative value to unsigned: %0">;
-def warn_pp_convert_rhs_to_positive : Warning<
- "right side of operator converted from negative value to unsigned: %0">;
+def warn_pp_convert_to_positive : Warning<
+ "%select{left|right}0 side of operator converted from negative value to "
+ "unsigned: %1">;
def ext_pp_import_directive : Extension<"#import is a language extension">,
InGroup<DiagGroup<"import-preprocessor-directive-pedantic">>;
def err_pp_import_directive_ms : Error<
"#import of type library is an unsupported Microsoft feature">;
def ext_pp_include_search_ms : ExtWarn<
- "#include resolved using non-portable MSVC search rules as: %0">,
- InGroup<DiagGroup<"msvc-include">>;
+ "#include resolved using non-portable Microsoft search rules as: %0">,
+ InGroup<MicrosoftInclude>;
def ext_pp_ident_directive : Extension<"#ident is a language extension">;
def ext_pp_include_next_directive : Extension<
- "#include_next is a language extension">;
+ "#include_next is a language extension">, InGroup<GNUIncludeNext>;
def ext_pp_warning_directive : Extension<"#warning is a language extension">;
def ext_pp_extra_tokens_at_eol : ExtWarn<
@@ -510,7 +516,7 @@ def ext_pp_bad_paste_ms : ExtWarn<
def err_pp_operator_used_as_macro_name : Error<
"C++ operator %0 (aka %1) used as a macro name">;
def ext_pp_operator_used_as_macro_name : Extension<
- "C++ operator %0 (aka %1) used as a macro name">, InGroup<Microsoft>;
+ err_pp_operator_used_as_macro_name.Text>, InGroup<MicrosoftCppMacro>;
def err_pp_illegal_floating_literal : Error<
"floating point literal in preprocessor expression">;
def err_pp_line_requires_integer : Error<
@@ -622,6 +628,8 @@ def warn_mmap_unknown_attribute : Warning<"unknown attribute '%0'">,
def warn_auto_module_import : Warning<
"treating #%select{include|import|include_next|__include_macros}0 as an "
"import of module '%1'">, InGroup<AutoImport>, DefaultIgnore;
+def note_implicit_top_level_module_import_here : Note<
+ "submodule of top-level module '%0' implicitly imported here">;
def warn_uncovered_module_header : Warning<
"umbrella header for module '%0' does not include header '%1'">,
InGroup<IncompleteUmbrella>;
diff --git a/include/clang/Basic/DiagnosticParseKinds.td b/include/clang/Basic/DiagnosticParseKinds.td
index e4f859943266f..446852a86b0dd 100644
--- a/include/clang/Basic/DiagnosticParseKinds.td
+++ b/include/clang/Basic/DiagnosticParseKinds.td
@@ -51,14 +51,6 @@ def warn_extra_semi_after_mem_fn_def : Warning<
"extra ';' after member function definition">,
InGroup<ExtraSemi>, DefaultIgnore;
-def ext_duplicate_declspec : ExtWarn<"duplicate '%0' declaration specifier">,
- InGroup<DuplicateDeclSpecifier>;
-def warn_duplicate_declspec : Warning<"duplicate '%0' declaration specifier">,
- InGroup<DuplicateDeclSpecifier>;
-def ext_plain_complex : ExtWarn<
- "plain '_Complex' requires a type specifier; assuming '_Complex double'">;
-def ext_integer_complex : Extension<
- "complex integer types are a GNU extension">, InGroup<GNUComplexInteger>;
def ext_thread_before : Extension<"'__thread' before '%0'">;
def ext_keyword_as_ident : ExtWarn<
"keyword '%0' will be made available as an identifier "
@@ -70,12 +62,6 @@ def ext_nullability : Extension<
InGroup<DiagGroup<"nullability-extension">>;
def error_empty_enum : Error<"use of empty enum">;
-def err_invalid_sign_spec : Error<"'%0' cannot be signed or unsigned">;
-def err_invalid_short_spec : Error<"'short %0' is invalid">;
-def err_invalid_long_spec : Error<"'long %0' is invalid">;
-def err_invalid_longlong_spec : Error<"'long long %0' is invalid">;
-def err_invalid_complex_spec : Error<"'_Complex %0' is invalid">;
-def err_friend_decl_spec : Error<"'%0' is invalid in friend declarations">;
def ext_ident_list_in_param : Extension<
"type-less parameter names in function declaration">;
@@ -101,7 +87,7 @@ def ext_cxx11_enum_fixed_underlying_type : Extension<
InGroup<CXX11>;
def ext_c_enum_fixed_underlying_type : Extension<
"enumeration types with a fixed underlying type are a Microsoft extension">,
- InGroup<Microsoft>;
+ InGroup<MicrosoftFixedEnum>;
def warn_cxx98_compat_enum_fixed_underlying_type : Warning<
"enumeration types with a fixed underlying type are incompatible with C++98">,
InGroup<CXX98Compat>, DefaultIgnore;
@@ -271,7 +257,7 @@ def warn_cxx98_compat_ref_qualifier : Warning<
"reference qualifiers on functions are incompatible with C++98">,
InGroup<CXX98Compat>, DefaultIgnore;
def ext_inline_namespace : ExtWarn<
- "inline namespaces are a C++11 feature">, InGroup<CXX11>;
+ "inline namespaces are a C++11 feature">, InGroup<CXX11InlineNamespace>;
def warn_cxx98_compat_inline_namespace : Warning<
"inline namespaces are incompatible with C++98">,
InGroup<CXX98Compat>, DefaultIgnore;
@@ -286,11 +272,6 @@ def err_init_list_bin_op : Error<"initializer list cannot be used on the "
def warn_cxx98_compat_trailing_return_type : Warning<
"trailing return types are incompatible with C++98">,
InGroup<CXX98Compat>, DefaultIgnore;
-def ext_auto_type_specifier : ExtWarn<
- "'auto' type specifier is a C++11 extension">, InGroup<CXX11>;
-def warn_auto_storage_class : Warning<
- "'auto' storage class specifier is redundant and incompatible with C++11">,
- InGroup<CXX11Compat>, DefaultIgnore;
def ext_auto_storage_class : ExtWarn<
"'auto' storage class specifier is not permitted in C++11, and will not "
"be supported in future releases">, InGroup<DiagGroup<"auto-storage-class">>;
@@ -299,6 +280,9 @@ def ext_decltype_auto_type_specifier : ExtWarn<
def warn_cxx11_compat_decltype_auto_type_specifier : Warning<
"'decltype(auto)' type specifier is incompatible with C++ standards before "
"C++14">, InGroup<CXXPre14Compat>, DefaultIgnore;
+def ext_auto_type : Extension<
+ "'__auto_type' is a GNU extension">,
+ InGroup<GNUAutoType>;
def ext_for_range : ExtWarn<
"range-based for loop is a C++11 extension">, InGroup<CXX11>;
def warn_cxx98_compat_for_range : Warning<
@@ -327,9 +311,6 @@ def err_unspecified_vla_size_with_static : Error<
"'static' may not be used with an unspecified variable length array size">;
def err_unspecified_size_with_static : Error<
"'static' may not be used without an array size">;
-def warn_deprecated_register : Warning<
- "'register' storage class specifier is deprecated">,
- InGroup<DeprecatedRegister>;
def err_expected_parentheses_around_typename : Error<
"expected parentheses around type name in %0 expression">;
@@ -348,39 +329,10 @@ def err_typename_invalid_constexpr : Error<
def err_typename_identifiers_only : Error<
"typename is allowed for identifiers only">;
-def err_invalid_decl_spec_combination : Error<
- "cannot combine with previous '%0' declaration specifier">;
-def err_invalid_vector_decl_spec_combination : Error<
- "cannot combine with previous '%0' declaration specifier. "
- "'__vector' must be first">;
-def err_invalid_pixel_decl_spec_combination : Error<
- "'__pixel' must be preceded by '__vector'. "
- "'%0' declaration specifier not allowed here">;
-def err_invalid_vector_bool_decl_spec : Error<
- "cannot use '%0' with '__vector bool'">;
-def err_invalid_vector_long_decl_spec : Error<
- "cannot use 'long' with '__vector'">;
-def err_invalid_vector_float_decl_spec : Error<
- "cannot use 'float' with '__vector'">;
-def err_invalid_vector_double_decl_spec : Error <
- "use of 'double' with '__vector' requires VSX support to be enabled "
- "(available on POWER7 or later)">;
-def err_invalid_vector_long_long_decl_spec : Error <
- "use of 'long long' with '__vector bool' requires VSX support (available on "
- "POWER7 or later) or extended Altivec support (available on POWER8 or later) "
- "to be enabled">;
-def err_invalid_vector_long_double_decl_spec : Error<
- "cannot use 'long double' with '__vector'">;
-def warn_vector_long_decl_spec_combination : Warning<
- "Use of 'long' with '__vector' is deprecated">, InGroup<Deprecated>;
def err_friend_invalid_in_context : Error<
"'friend' used outside of class">;
-def err_use_of_tag_name_without_tag : Error<
- "must use '%1' tag to refer to type %0%select{| in this scope}2">;
-def err_templated_using_directive : Error<
- "cannot template a using directive">;
-def err_templated_using_declaration : Error<
- "cannot template a using declaration">;
+def err_templated_using_directive_declaration : Error<
+ "cannot template a using %select{directive|declaration}0">;
def err_unexpected_colon_in_nested_name_spec : Error<
"unexpected ':' in nested name specifier; did you mean '::'?">;
def err_unexpected_token_in_nested_name_spec : Error<
@@ -512,7 +464,7 @@ def note_missing_end_of_definition_before : Note<
"still within definition of %q0 here">;
def ext_ellipsis_exception_spec : Extension<
"exception specification of '...' is a Microsoft extension">,
- InGroup<Microsoft>;
+ InGroup<MicrosoftExceptionSpec>;
def err_dynamic_and_noexcept_specification : Error<
"cannot have both throw() and noexcept() clause on the same function">;
def err_except_spec_unparsed : Error<
@@ -695,12 +647,9 @@ def warn_static_inline_explicit_inst_ignored : Warning<
// Constructor template diagnostics.
def err_out_of_line_constructor_template_id : Error<
"out-of-line constructor for %0 cannot have template arguments">;
-def err_out_of_line_template_id_names_constructor : Error<
+def err_out_of_line_template_id_type_names_constructor : Error<
"qualified reference to %0 is a constructor name rather than a "
- "template name wherever a constructor can be declared">;
-def err_out_of_line_type_names_constructor : Error<
- "qualified reference to %0 is a constructor name rather than a "
- "type wherever a constructor can be declared">;
+ "%select{template name|type}1 wherever a constructor can be declared">;
def err_expected_qualified_after_typename : Error<
"expected a qualified name after 'typename'">;
@@ -740,15 +689,11 @@ def err_missing_whitespace_digraph : Error<
"%select{template name|const_cast|dynamic_cast|reinterpret_cast|static_cast}0"
" which forms the digraph '<:' (aka '[') and a ':', did you mean '< ::'?">;
-def ext_deleted_function : ExtWarn<
- "deleted function definitions are a C++11 extension">, InGroup<CXX11>;
-def warn_cxx98_compat_deleted_function : Warning<
- "deleted function definitions are incompatible with C++98">,
- InGroup<CXX98Compat>, DefaultIgnore;
-def ext_defaulted_function : ExtWarn<
- "defaulted function definitions are a C++11 extension">, InGroup<CXX11>;
-def warn_cxx98_compat_defaulted_function : Warning<
- "defaulted function definitions are incompatible with C++98">,
+def ext_defaulted_deleted_function : ExtWarn<
+ "%select{defaulted|deleted}0 function definitions are a C++11 extension">,
+ InGroup<CXX11>;
+def warn_cxx98_compat_defaulted_deleted_function : Warning<
+ "%select{defaulted|deleted}0 function definitions are incompatible with C++98">,
InGroup<CXX98Compat>, DefaultIgnore;
// C++11 in-class member initialization
@@ -784,7 +729,7 @@ def err_override_control_interface : Error<
"'%0' keyword not permitted with interface types">;
def ext_ms_sealed_keyword : ExtWarn<
"'sealed' keyword is a Microsoft extension">,
- InGroup<Microsoft>;
+ InGroup<MicrosoftSealed>;
def err_access_specifier_interface : Error<
"interface types cannot specify '%select{private|protected}0' access">;
@@ -821,10 +766,6 @@ def warn_cxx98_compat_lambda : Warning<
def err_lambda_missing_parens : Error<
"lambda requires '()' before %select{'mutable'|return type|"
"attribute specifier}0">;
-def warn_init_capture_direct_list_init : Warning<
- "direct list initialization of a lambda init-capture will change meaning in "
- "a future version of Clang; insert an '=' to avoid a change in behavior">,
- InGroup<FutureCompat>;
// Availability attribute
def err_expected_version : Error<
@@ -945,7 +886,7 @@ def err_pragma_comment_malformed : Error<
def err_pragma_comment_unknown_kind : Error<"unknown kind of pragma comment">;
// PS4 recognizes only #pragma comment(lib)
def warn_pragma_comment_ignored : Warning<"'#pragma comment %0' ignored">,
- InGroup<Microsoft>;
+ InGroup<IgnoredPragmas>;
// - #pragma detect_mismatch
def err_pragma_detect_mismatch_malformed : Error<
"pragma detect_mismatch is malformed; it requires two comma-separated "
@@ -961,10 +902,6 @@ def err_pragma_optimize_invalid_argument : Error<
def err_pragma_optimize_extra_argument : Error<
"unexpected extra argument '%0' to '#pragma clang optimize'">;
-// OpenCL Section 6.8.g
-def err_opencl_unknown_type_specifier : Error<
- "OpenCL does not support the '%0' %select{type qualifier|storage class specifier}1">;
-
// OpenCL EXTENSION pragma (OpenCL 1.1 [9.1])
def warn_pragma_expected_colon : Warning<
"missing ':' after %0 - ignoring">, InGroup<IgnoredPragmas>;
@@ -979,6 +916,8 @@ def warn_pragma_omp_ignored : Warning<
def warn_omp_extra_tokens_at_eol : Warning<
"extra tokens at the end of '#pragma omp %0' are ignored">,
InGroup<ExtraTokens>;
+def warn_pragma_expected_colon_r_paren : Warning<
+ "missing ':' or ')' after %0 - ignoring">, InGroup<IgnoredPragmas>;
def err_omp_unknown_directive : Error<
"expected an OpenMP directive">;
def err_omp_unexpected_directive : Error<
@@ -987,22 +926,26 @@ def err_omp_expected_punc : Error<
"expected ',' or ')' in '%0' %select{clause|directive}1">;
def err_omp_unexpected_clause : Error<
"unexpected OpenMP clause '%0' in directive '#pragma omp %1'">;
-def err_omp_more_one_clause : Error<
- "directive '#pragma omp %0' cannot contain more than one '%1' clause">;
def err_omp_immediate_directive : Error<
- "'#pragma omp %0' cannot be an immediate substatement">;
+ "'#pragma omp %0' %select{|with '%2' clause }1cannot be an immediate substatement">;
def err_omp_expected_identifier_for_critical : Error<
"expected identifier specifying the name of the 'omp critical' directive">;
+def err_omp_unknown_map_type : Error<
+ "incorrect map type, expected one of 'to', 'from', 'tofrom', 'alloc', 'release', or 'delete'">;
+def err_omp_unknown_map_type_modifier : Error<
+ "incorrect map type modifier, expected 'always'">;
+def err_omp_map_type_missing : Error<
+ "missing map type">;
// Pragma loop support.
def err_pragma_loop_missing_argument : Error<
"missing argument; expected %select{an integer value|"
- "%select{'enable', 'assume_safety'|'full'}1 or 'disable'}0">;
+ "'enable', %select{'assume_safety'|'full'}1 or 'disable'}0">;
def err_pragma_loop_invalid_option : Error<
"%select{invalid|missing}0 option%select{ %1|}0; expected vectorize, "
"vectorize_width, interleave, interleave_count, unroll, or unroll_count">;
def err_pragma_invalid_keyword : Error<
- "invalid argument; expected %select{'enable', 'assume_safety'|'full'}0 or 'disable'">;
+ "invalid argument; expected 'enable', %select{'assume_safety'|'full'}0 or 'disable'">;
// Pragma unroll support.
def warn_pragma_unroll_cuda_value_in_parens : Warning<
@@ -1015,6 +958,7 @@ def err_module_expected_ident : Error<
"expected a module name after module import">;
def err_module_expected_semi : Error<
"expected ';' after module name">;
+def err_missing_before_module_end : Error<"expected %0 at end of module">;
}
let CategoryName = "Generics Issue" in {
@@ -1029,4 +973,9 @@ def err_objc_type_args_after_protocols : Error<
"protocol qualifiers must precede type arguments">;
}
+let CategoryName = "Coroutines Issue" in {
+def err_for_co_await_not_range_for : Error<
+ "'co_await' modifier can only be applied to range-based for loop">;
+}
+
} // end of Parser diagnostics
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td
index 82f5121308854..1f2791c1c8fc8 100644
--- a/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/include/clang/Basic/DiagnosticSemaKinds.td
@@ -67,6 +67,9 @@ def warn_wrong_absolute_value_type : Warning<
"when argument is of %select{integer|floating point|complex}2 type">,
InGroup<AbsoluteValue>;
def note_replace_abs_function : Note<"use function '%0' instead">;
+def warn_pointer_abs : Warning<
+ "taking the absolute value of %select{pointer|function|array}0 type %1 is suspicious">,
+ InGroup<AbsoluteValue>;
def warn_infinite_recursive_function : Warning<
"all paths through this function will call itself">,
@@ -188,6 +191,63 @@ def ext_flexible_array_init : Extension<
"flexible array initialization is a GNU extension">, InGroup<GNUFlexibleArrayInitializer>;
// Declarations.
+def ext_duplicate_declspec : ExtWarn<"duplicate '%0' declaration specifier">,
+ InGroup<DuplicateDeclSpecifier>;
+def warn_duplicate_declspec : Warning<"duplicate '%0' declaration specifier">,
+ InGroup<DuplicateDeclSpecifier>;
+def ext_plain_complex : ExtWarn<
+ "plain '_Complex' requires a type specifier; assuming '_Complex double'">;
+def ext_integer_complex : Extension<
+ "complex integer types are a GNU extension">, InGroup<GNUComplexInteger>;
+
+def err_invalid_sign_spec : Error<"'%0' cannot be signed or unsigned">;
+def err_invalid_width_spec : Error<
+ "'%select{|short|long|long long}0 %1' is invalid">;
+def err_invalid_complex_spec : Error<"'_Complex %0' is invalid">;
+def err_friend_decl_spec : Error<"'%0' is invalid in friend declarations">;
+
+def ext_auto_type_specifier : ExtWarn<
+ "'auto' type specifier is a C++11 extension">, InGroup<CXX11>;
+def warn_auto_storage_class : Warning<
+ "'auto' storage class specifier is redundant and incompatible with C++11">,
+ InGroup<CXX11Compat>, DefaultIgnore;
+
+def warn_deprecated_register : Warning<
+ "'register' storage class specifier is deprecated "
+ "and incompatible with C++1z">, InGroup<DeprecatedRegister>;
+def ext_register_storage_class : ExtWarn<
+ "ISO C++1z does not allow 'register' storage class specifier">,
+ DefaultError, InGroup<Register>;
+
+def err_invalid_decl_spec_combination : Error<
+ "cannot combine with previous '%0' declaration specifier">;
+def err_invalid_vector_decl_spec_combination : Error<
+ "cannot combine with previous '%0' declaration specifier. "
+ "'__vector' must be first">;
+def err_invalid_pixel_decl_spec_combination : Error<
+ "'__pixel' must be preceded by '__vector'. "
+ "'%0' declaration specifier not allowed here">;
+def err_invalid_vector_bool_decl_spec : Error<
+ "cannot use '%0' with '__vector bool'">;
+def err_invalid_vector_long_decl_spec : Error<
+ "cannot use 'long' with '__vector'">;
+def err_invalid_vector_float_decl_spec : Error<
+ "cannot use 'float' with '__vector'">;
+def err_invalid_vector_double_decl_spec : Error <
+ "use of 'double' with '__vector' requires VSX support to be enabled "
+ "(available on POWER7 or later)">;
+def err_invalid_vector_long_long_decl_spec : Error <
+ "use of 'long long' with '__vector bool' requires VSX support (available on "
+ "POWER7 or later) or extended Altivec support (available on POWER8 or later) "
+ "to be enabled">;
+def err_invalid_vector_long_double_decl_spec : Error<
+ "cannot use 'long double' with '__vector'">;
+def warn_vector_long_decl_spec_combination : Warning<
+ "Use of 'long' with '__vector' is deprecated">, InGroup<Deprecated>;
+
+def err_use_of_tag_name_without_tag : Error<
+ "must use '%1' tag to refer to type %0%select{| in this scope}2">;
+
def err_redeclaration_different_type : Error<
"redeclaration of %0 with a different type%diff{: $ vs $|}1,2">;
def err_bad_variable_name : Error<
@@ -195,6 +255,10 @@ def err_bad_variable_name : Error<
def err_bad_parameter_name : Error<
"%0 cannot be the name of a parameter">;
def err_parameter_name_omitted : Error<"parameter name omitted">;
+def warn_mips_interrupt_attribute : Warning<
+ "MIPS 'interrupt' attribute only applies to functions that have "
+ "%select{no parameters|a 'void' return type}0">,
+ InGroup<IgnoredAttributes>;
def warn_unused_parameter : Warning<"unused parameter %0">,
InGroup<UnusedParameter>, DefaultIgnore;
def warn_unused_variable : Warning<"unused variable %0">,
@@ -416,7 +480,8 @@ def note_unreachable_silence : Note<
/// Built-in functions.
def ext_implicit_lib_function_decl : ExtWarn<
- "implicitly declaring library function '%0' with type %1">;
+ "implicitly declaring library function '%0' with type %1">,
+ InGroup<ImplicitFunctionDeclare>;
def note_include_header_or_declare : Note<
"include the header <%0> or explicitly provide a declaration for '%1'">;
def note_previous_builtin_declaration : Note<"%0 is a builtin with type %1">;
@@ -429,6 +494,11 @@ def warn_redecl_library_builtin : Warning<
def err_builtin_definition : Error<"definition of builtin function %0">;
def err_arm_invalid_specialreg : Error<"invalid special register for builtin">;
def err_invalid_cpu_supports : Error<"invalid cpu feature string for builtin">;
+def err_builtin_needs_feature : Error<"%0 needs target feature %1">;
+def err_function_needs_feature
+ : Error<"always_inline function %1 requires target feature '%2', but would "
+ "be inlined into function %0 that is compiled without support for "
+ "'%2'">;
def warn_builtin_unknown : Warning<"use of unknown builtin %0">,
InGroup<ImplicitFunctionDeclare>, DefaultError;
def warn_dyn_class_memaccess : Warning<
@@ -510,6 +580,10 @@ def warn_main_one_arg : Warning<"only one parameter on 'main' declaration">,
def err_main_arg_wrong : Error<"%select{first|second|third|fourth}0 "
"parameter of 'main' (%select{argument count|argument array|environment|"
"platform-specific data}0) must be of type %1">;
+def err_main_global_variable :
+ Error<"main cannot be declared as global variable">;
+def warn_main_redefined : Warning<"variable named 'main' with external linkage "
+ "has undefined behavior">, InGroup<Main>;
def ext_main_used : Extension<
"ISO C++ does not allow 'main' to be used by a program">, InGroup<Main>;
@@ -548,14 +622,14 @@ def err_pragma_options_align_mac68k_target_unsupported : Error<
def warn_pragma_pack_invalid_alignment : Warning<
"expected #pragma pack parameter to be '1', '2', '4', '8', or '16'">,
InGroup<IgnoredPragmas>;
-// Follow the MSVC implementation.
+// Follow the Microsoft implementation.
def warn_pragma_pack_show : Warning<"value of #pragma pack(show) == %0">;
def warn_pragma_pack_pop_identifer_and_alignment : Warning<
"specifying both a name and alignment to 'pop' is undefined">;
def warn_pragma_pop_failed : Warning<"#pragma %0(pop, ...) failed: %1">,
InGroup<IgnoredPragmas>;
def warn_cxx_ms_struct :
- Warning<"ms_struct may not produce MSVC-compatible layouts for classes "
+ Warning<"ms_struct may not produce Microsoft-compatible layouts for classes "
"with base classes or virtual functions">,
DefaultError, InGroup<IncompatibleMSStruct>;
def err_section_conflict : Error<"%0 causes a section type conflict with %1">;
@@ -856,6 +930,9 @@ def warn_missing_explicit_synthesis : Warning <
def warn_property_getter_owning_mismatch : Warning<
"property declared as returning non-retained objects"
"; getter returning retained objects">;
+def warn_property_redecl_getter_mismatch : Warning<
+ "getter name mismatch between property redeclaration (%1) and its original "
+ "declaration (%0)">, InGroup<PropertyAttr>;
def error_property_setter_ambiguous_use : Error<
"synthesized properties %0 and %1 both claim setter %2 -"
" use of this setter will cause unexpected behavior">;
@@ -878,7 +955,8 @@ def err_property_type : Error<"property cannot have array or function type %0">;
def error_missing_property_context : Error<
"missing context for property implementation declaration">;
def error_bad_property_decl : Error<
- "property implementation must have its declaration in interface %0">;
+ "property implementation must have its declaration in interface %0 or one of "
+ "its extensions">;
def error_category_property : Error<
"property declared in category %0 cannot be implemented in "
"class implementation">;
@@ -901,8 +979,6 @@ def error_bad_property_context : Error<
def error_missing_property_ivar_decl : Error<
"synthesized property %0 must either be named the same as a compatible"
" instance variable or must explicitly name an instance variable">;
-def error_synthesize_weak_non_arc_or_gc : Error<
- "@synthesize of 'weak' property is only allowed in ARC or GC mode">;
def err_arc_perform_selector_retains : Error<
"performSelector names a selector which retains the object">;
def warn_arc_perform_selector_leaks : Warning<
@@ -1058,7 +1134,7 @@ def warn_template_qualified_friend_ignored : Warning<
def ext_friend_tag_redecl_outside_namespace : ExtWarn<
"unqualified friend declaration referring to type outside of the nearest "
"enclosing namespace is a Microsoft extension; add a nested name specifier">,
- InGroup<Microsoft>;
+ InGroup<MicrosoftUnqualifiedFriend>;
def err_pure_friend : Error<"friend declaration cannot have a pure-specifier">;
def err_invalid_member_in_interface : Error<
@@ -1096,10 +1172,15 @@ def err_type_defined_in_param_type : Error<
"%0 cannot be defined in a parameter type">;
def err_type_defined_in_alias_template : Error<
"%0 cannot be defined in a type alias template">;
+def err_type_defined_in_condition : Error<
+ "%0 cannot be defined in a condition">;
def note_pure_virtual_function : Note<
"unimplemented pure virtual method %0 in %1">;
+def note_pure_qualified_call_kext : Note<
+ "qualified call to %0::%1 is treated as a virtual call to %1 due to -fapple-kext">;
+
def err_deleted_decl_not_first : Error<
"deleted definition must be first declaration">;
@@ -1134,21 +1215,25 @@ def err_rref_in_exception_spec : Error<
"rvalue reference type %0 is not allowed in exception specification">;
def err_mismatched_exception_spec : Error<
"exception specification in declaration does not match previous declaration">;
-def ext_mismatched_exception_spec : ExtWarn<
- "exception specification in declaration does not match previous declaration">,
- InGroup<Microsoft>;
+def ext_mismatched_exception_spec : ExtWarn<err_mismatched_exception_spec.Text>,
+ InGroup<MicrosoftExceptionSpec>;
def err_override_exception_spec : Error<
"exception specification of overriding function is more lax than "
"base version">;
-def ext_override_exception_spec : ExtWarn<
- "exception specification of overriding function is more lax than "
- "base version">, InGroup<Microsoft>;
+def ext_override_exception_spec : ExtWarn<err_override_exception_spec.Text>,
+ InGroup<MicrosoftExceptionSpec>;
def err_incompatible_exception_specs : Error<
"target exception specification is not superset of source">;
def err_deep_exception_specs_differ : Error<
"exception specifications of %select{return|argument}0 types differ">;
-def warn_missing_exception_specification : Warning<
+def err_missing_exception_specification : Error<
"%0 is missing exception specification '%1'">;
+def ext_missing_exception_specification : ExtWarn<
+ err_missing_exception_specification.Text>,
+ InGroup<DiagGroup<"missing-exception-spec">>;
+def ext_ms_missing_exception_specification : ExtWarn<
+ err_missing_exception_specification.Text>,
+ InGroup<MicrosoftExceptionSpec>;
def err_noexcept_needs_constant_expression : Error<
"argument to noexcept specifier must be a constant expression">;
def err_exception_spec_not_parsed : Error<
@@ -1162,7 +1247,7 @@ def err_access : Error<
def ext_ms_using_declaration_inaccessible : ExtWarn<
"using declaration referring to inaccessible member '%0' (which refers "
"to accessible member '%1') is a Microsoft compatibility extension">,
- AccessControl, InGroup<Microsoft>;
+ AccessControl, InGroup<MicrosoftUsingDecl>;
def err_access_ctor : Error<
"calling a %select{private|protected}0 constructor of class %2">,
AccessControl;
@@ -1268,7 +1353,7 @@ def err_mutable_function : Error<"'mutable' cannot be applied to functions">;
def err_mutable_reference : Error<"'mutable' cannot be applied to references">;
def ext_mutable_reference : ExtWarn<
"'mutable' on a reference type is a Microsoft extension">,
- InGroup<Microsoft>;
+ InGroup<MicrosoftMutableReference>;
def err_mutable_const : Error<"'mutable' and 'const' cannot be mixed">;
def err_mutable_nonmember : Error<
"'mutable' can only be applied to member variables">;
@@ -1304,7 +1389,7 @@ def err_non_virtual_pure : Error<
"%0 is not virtual and cannot be declared pure">;
def ext_pure_function_definition : ExtWarn<
"function definition with pure-specifier is a Microsoft extension">,
- InGroup<Microsoft>;
+ InGroup<MicrosoftPureDefinition>;
def err_implicit_object_parameter_init : Error<
"cannot initialize object parameter of type %0 with an expression "
"of type %1">;
@@ -1312,8 +1397,9 @@ def err_qualified_member_of_unrelated : Error<
"%q0 is not a member of class %1">;
def warn_call_to_pure_virtual_member_function_from_ctor_dtor : Warning<
- "call to pure virtual member function %0; overrides of %0 in subclasses are "
- "not available in the %select{constructor|destructor}1 of %2">;
+ "call to pure virtual member function %0 has undefined behavior; "
+ "overrides of %0 in subclasses are not available in the "
+ "%select{constructor|destructor}1 of %2">;
def note_member_declared_at : Note<"member is declared here">;
def note_ivar_decl : Note<"instance variable is declared here">;
@@ -1382,7 +1468,7 @@ def warn_cxx98_compat_static_data_member_in_union : Warning<
InGroup<CXX98Compat>, DefaultIgnore;
def ext_union_member_of_reference_type : ExtWarn<
"union member %0 has reference type %1, which is a Microsoft extension">,
- InGroup<Microsoft>;
+ InGroup<MicrosoftUnionMemberReference>;
def err_union_member_of_reference_type : Error<
"union member %0 has reference type %1">;
def ext_anonymous_struct_union_qualified : Extension<
@@ -1437,7 +1523,8 @@ def warn_no_constructor_for_refconst : Warning<
def note_refconst_member_not_initialized : Note<
"%select{const|reference}0 member %1 will never be initialized">;
def ext_ms_explicit_constructor_call : ExtWarn<
- "explicit constructor calls are a Microsoft extension">, InGroup<Microsoft>;
+ "explicit constructor calls are a Microsoft extension">,
+ InGroup<MicrosoftExplicitConstructorCall>;
// C++ destructors
def err_destructor_not_member : Error<
@@ -1649,18 +1736,22 @@ def warn_cxx98_compat_auto_type_specifier : Warning<
"'auto' type specifier is incompatible with C++98">,
InGroup<CXX98Compat>, DefaultIgnore;
def err_auto_variable_cannot_appear_in_own_initializer : Error<
- "variable %0 declared with 'auto' type cannot appear in its own initializer">;
+ "variable %0 declared with %select{'auto'|'decltype(auto)'|'__auto_type'}1 "
+ "type cannot appear in its own initializer">;
def err_illegal_decl_array_of_auto : Error<
"'%0' declared as array of %1">;
def err_new_array_of_auto : Error<
"cannot allocate array of 'auto'">;
def err_auto_not_allowed : Error<
- "%select{'auto'|'decltype(auto)'}0 not allowed %select{in function prototype"
- "|in non-static struct member"
- "|in non-static union member|in non-static class member|in interface member"
+ "%select{'auto'|'decltype(auto)'|'__auto_type'}0 not allowed "
+ "%select{in function prototype"
+ "|in non-static struct member|in struct member"
+ "|in non-static union member|in union member"
+ "|in non-static class member|in interface member"
"|in exception declaration|in template parameter|in block literal"
"|in template argument|in typedef|in type alias|in function return type"
- "|in conversion function type|here|in lambda parameter}1">;
+ "|in conversion function type|here|in lambda parameter"
+ "|in type allocated by 'new'|in K&R-style function parameter}1">;
def err_auto_not_allowed_var_inst : Error<
"'auto' variable template instantiation is not allowed">;
def err_auto_var_requires_init : Error<
@@ -1674,12 +1765,8 @@ def err_auto_var_init_no_expression : Error<
def err_auto_var_init_multiple_expressions : Error<
"initializer for variable %0 with type %1 contains multiple expressions">;
def err_auto_var_init_paren_braces : Error<
- "cannot deduce type for variable %0 with type %1 from "
- "parenthesized initializer list">;
-def warn_auto_var_direct_list_init : Warning<
- "direct list initialization of a variable with a deduced type will change "
- "meaning in a future version of Clang; insert an '=' to avoid a change in "
- "behavior">, InGroup<FutureCompat>;
+ "cannot deduce type for variable %1 with type %2 from "
+ "%select{parenthesized|nested}0 initializer list">;
def err_auto_new_ctor_multiple_expressions : Error<
"new expression for type %0 contains multiple constructor arguments">;
def err_auto_missing_trailing_return : Error<
@@ -1698,8 +1785,8 @@ def err_auto_var_deduction_failure_from_init_list : Error<
def err_auto_new_deduction_failure : Error<
"new expression for type %0 has incompatible constructor argument of type %1">;
def err_auto_different_deductions : Error<
- "'%select{auto|decltype(auto)}0' deduced as %1 in declaration of %2 and "
- "deduced as %3 in declaration of %4">;
+ "'%select{auto|decltype(auto)|__auto_type}0' deduced as %1 in declaration "
+ "of %2 and deduced as %3 in declaration of %4">;
def err_implied_std_initializer_list_not_found : Error<
"cannot deduce type of initializer list because std::initializer_list was "
"not found; include <initializer_list>">;
@@ -1709,6 +1796,10 @@ def warn_dangling_std_initializer_list : Warning<
"array backing the initializer list will be destroyed at the end of "
"%select{the full-expression|the constructor}0">,
InGroup<DiagGroup<"dangling-initializer-list">>;
+def err_auto_init_list_from_c : Error<
+ "cannot use __auto_type with initializer list in C">;
+def err_auto_bitfield : Error<
+ "cannot pass bit-field as __auto_type initializer in C">;
// C++1y decltype(auto) type
def err_decltype_auto_cannot_be_combined : Error<
@@ -1768,7 +1859,7 @@ def err_enumerator_too_large : Error<
"enumerator value is not representable in the underlying type %0">;
def ext_enumerator_too_large : ExtWarn<
"enumerator value is not representable in the underlying type %0">,
- InGroup<Microsoft>;
+ InGroup<MicrosoftEnumValue>;
def err_enumerator_wrapped : Error<
"enumerator value %0 is not representable in the underlying type %1">;
def err_enum_redeclare_type_mismatch : Error<
@@ -1961,11 +2052,34 @@ def warn_private_extern : Warning<
def note_private_extern : Note<
"use __attribute__((visibility(\"hidden\"))) attribute instead">;
+// C++ Concepts TS
+def err_concept_wrong_decl_kind : Error<
+ "'concept' can only appear on the definition of a function template or variable template">;
+def err_concept_decls_may_only_appear_in_namespace_scope : Error<
+ "concept declarations may only appear in namespace scope">;
+def err_function_concept_not_defined : Error<
+ "function concept declaration must be a definition">;
+def err_var_concept_not_initialized : Error<
+ "variable concept declaration must be initialized">;
+def err_function_concept_exception_spec : Error<
+ "function concept cannot have exception specification">;
+def err_concept_decl_invalid_specifiers : Error<
+ "%select{variable|function}0 concept cannot be declared "
+ "'%select{thread_local|inline|friend|constexpr}1'">;
+def err_function_concept_with_params : Error<
+ "function concept cannot have any parameters">;
+
// C++11 char16_t/char32_t
def warn_cxx98_compat_unicode_type : Warning<
"'%0' type specifier is incompatible with C++98">,
InGroup<CXX98Compat>, DefaultIgnore;
-
+
+// __make_integer_seq
+def err_integer_sequence_negative_length : Error<
+ "integer sequences must have non-negative sequence length">;
+def err_integer_sequence_integral_element_type : Error<
+ "integer sequences must have integral element type">;
+
// Objective-C++
def err_objc_decls_may_only_appear_in_global_scope : Error<
"Objective-C declarations may only appear in global scope">;
@@ -2016,8 +2130,7 @@ def err_attribute_argument_type : Error<
"%0 attribute requires %select{int or bool|an integer "
"constant|a string|an identifier}1">;
def err_attribute_argument_outof_range : Error<
- "init_priority attribute requires integer constant between "
- "101 and 65535 inclusive">;
+ "%0 attribute requires integer constant between %1 and %2 inclusive">;
def err_init_priority_object_attr : Error<
"can only use 'init_priority' attribute on file-scope definitions "
"of objects of class type">;
@@ -2025,10 +2138,12 @@ def err_attribute_argument_vec_type_hint : Error<
"invalid attribute argument %0 - expecting a vector or vectorizable scalar type">;
def err_attribute_argument_out_of_bounds : Error<
"%0 attribute parameter %1 is out of bounds">;
+def err_attribute_only_once_per_parameter : Error<
+ "%0 attribute can only be applied once per parameter">;
def err_attribute_uuid_malformed_guid : Error<
"uuid attribute contains a malformed GUID">;
def warn_attribute_pointers_only : Warning<
- "%0 attribute only applies to pointer arguments">,
+ "%0 attribute only applies to%select{| constant}1 pointer arguments">,
InGroup<IgnoredAttributes>;
def err_attribute_pointers_only : Error<warn_attribute_pointers_only.Text>;
def warn_attribute_return_pointers_only : Warning<
@@ -2066,9 +2181,9 @@ def err_attribute_invalid_size : Error<
def err_attribute_zero_size : Error<"zero vector size">;
def err_attribute_size_too_large : Error<"vector size too large">;
def err_typecheck_vector_not_convertable : Error<
- "can't convert between vector values of different size (%0 and %1)">;
+ "cannot convert between vector values of different size (%0 and %1)">;
def err_typecheck_vector_not_convertable_non_scalar : Error<
- "can't convert between vector and non-scalar values (%0 and %1)">;
+ "cannot convert between vector and non-scalar values (%0 and %1)">;
def err_typecheck_vector_lengths_not_equal : Error<
"vector operands do not have the same number of elements (%0 and %1)">;
def err_ext_vector_component_exceeds_length : Error<
@@ -2091,25 +2206,18 @@ def err_field_with_address_space : Error<
"field may not be qualified with an address space">;
def err_attr_objc_ownership_redundant : Error<
"the type %0 is already explicitly ownership-qualified">;
-def err_undeclared_nsnumber : Error<
- "NSNumber must be available to use Objective-C literals">;
-def err_undeclared_nsvalue : Error<
- "NSValue must be available to use Objective-C boxed expressions">;
def err_invalid_nsnumber_type : Error<
"%0 is not a valid literal type for NSNumber">;
-def err_undeclared_nsstring : Error<
- "cannot box a string value because NSString has not been declared">;
def err_objc_illegal_boxed_expression_type : Error<
"illegal type %0 used in a boxed expression">;
def err_objc_non_trivially_copyable_boxed_expression_type : Error<
"non-trivially copyable type %0 cannot be used in a boxed expression">;
def err_objc_incomplete_boxed_expression_type : Error<
"incomplete type %0 used in a boxed expression">;
-def err_undeclared_nsarray : Error<
- "NSArray must be available to use Objective-C array literals">;
-def err_undeclared_nsdictionary : Error<
- "NSDictionary must be available to use Objective-C dictionary "
- "literals">;
+def err_undeclared_objc_literal_class : Error<
+ "definition of class %0 must be available to use Objective-C "
+ "%select{array literals|dictionary literals|numeric literals|boxed expressions|"
+ "string literals}1">;
def err_undeclared_boxing_method : Error<
"declaration of %0 is missing in %1 class">;
def err_objc_literal_method_sig : Error<
@@ -2258,6 +2366,8 @@ def err_attribute_dll_not_extern : Error<
"%q0 must have external linkage when declared %q1">;
def err_attribute_dll_thread_local : Error<
"%q0 cannot be thread local when declared %q1">;
+def err_attribute_dll_lambda : Error<
+ "lambda cannot be declared %0">;
def warn_attribute_invalid_on_definition : Warning<
"'%0' attribute cannot be specified on a definition">,
InGroup<IgnoredAttributes>;
@@ -2323,7 +2433,7 @@ def warn_attribute_wrong_decl_type : Warning<
"Objective-C instance methods|init methods of interface or class extension declarations|"
"variables, functions and classes|Objective-C protocols|"
"functions and global variables|structs, unions, and typedefs|structs and typedefs|"
- "interface or protocol declarations|kernel functions}1">,
+ "interface or protocol declarations|kernel functions|non-K&R-style functions}1">,
InGroup<IgnoredAttributes>;
def err_attribute_wrong_decl_type : Error<warn_attribute_wrong_decl_type.Text>;
def warn_type_attribute_wrong_type : Warning<
@@ -2359,6 +2469,9 @@ def err_cconv_varargs : Error<
def warn_cconv_varargs : Warning<
"%0 calling convention ignored on variadic function">,
InGroup<IgnoredAttributes>;
+def warn_cconv_structors : Warning<
+ "%0 calling convention ignored on constructor/destructor">,
+ InGroup<IgnoredAttributes>;
def err_regparm_mismatch : Error<"function declared with regparm(%0) "
"attribute was previously declared "
"%plural{0:without the regparm|:with the regparm(%1)}1 attribute">;
@@ -2375,6 +2488,8 @@ def warn_attribute_not_on_decl : Warning<
"%0 attribute ignored when parsing type">, InGroup<IgnoredAttributes>;
def err_base_specifier_attribute : Error<
"%0 attribute cannot be applied to a base specifier">;
+def err_invalid_attribute_on_virtual_function : Error<
+ "%0 attribute cannot be applied to virtual functions">;
// Availability attribute
def warn_availability_unknown_platform : Warning<
@@ -2386,15 +2501,19 @@ def warn_availability_version_ordering : Warning<
def warn_mismatched_availability: Warning<
"availability does not match previous declaration">, InGroup<Availability>;
def warn_mismatched_availability_override : Warning<
- "overriding method %select{introduced after|"
- "deprecated before|obsoleted before}0 overridden method on %1 (%2 vs. %3)">,
- InGroup<Availability>;
+ "%select{|overriding }4method %select{introduced after|"
+ "deprecated before|obsoleted before}0 "
+ "%select{the protocol method it implements|overridden method}4 "
+ "on %1 (%2 vs. %3)">, InGroup<Availability>;
def warn_mismatched_availability_override_unavail : Warning<
- "overriding method cannot be unavailable on %0 when its overridden method is "
+ "%select{|overriding }1method cannot be unavailable on %0 when "
+ "%select{the protocol method it implements|its overridden method}1 is "
"available">,
InGroup<Availability>;
def note_overridden_method : Note<
"overridden method is here">;
+def note_protocol_method : Note<
+ "protocol method is here">;
// Thread Safety Attributes
def warn_invalid_capability_name : Warning<
@@ -2559,6 +2678,9 @@ def warn_impcast_complex_scalar : Warning<
def warn_impcast_float_precision : Warning<
"implicit conversion loses floating-point precision: %0 to %1">,
InGroup<Conversion>, DefaultIgnore;
+def warn_impcast_double_promotion : Warning<
+ "implicit conversion increases floating-point precision: %0 to %1">,
+ InGroup<DoublePromotion>, DefaultIgnore;
def warn_impcast_float_integer : Warning<
"implicit conversion turns floating-point number into integer: %0 to %1">,
InGroup<FloatConversion>, DefaultIgnore;
@@ -2601,13 +2723,16 @@ def warn_impcast_null_pointer_to_integer : Warning<
def warn_impcast_floating_point_to_bool : Warning<
"implicit conversion turns floating-point number into bool: %0 to %1">,
InGroup<ImplicitConversionFloatingPointToBool>;
+def ext_ms_impcast_fn_obj : ExtWarn<
+ "implicit conversion between pointer-to-function and pointer-to-object is a "
+ "Microsoft extension">, InGroup<MicrosoftCast>;
def warn_impcast_pointer_to_bool : Warning<
"address of%select{| function| array}0 '%1' will always evaluate to "
"'true'">,
InGroup<PointerBoolConversion>;
def warn_cast_nonnull_to_bool : Warning<
- "nonnull parameter '%0' will evaluate to "
+ "nonnull %select{function call|parameter}0 '%1' will evaluate to "
"'true' on first encounter">,
InGroup<PointerBoolConversion>;
def warn_this_bool_conversion : Warning<
@@ -2622,9 +2747,10 @@ def warn_null_pointer_compare : Warning<
"comparison of %select{address of|function|array}0 '%1' %select{not |}2"
"equal to a null pointer is always %select{true|false}2">,
InGroup<TautologicalPointerCompare>;
-def warn_nonnull_parameter_compare : Warning<
- "comparison of nonnull parameter '%0' %select{not |}1"
- "equal to a null pointer is %select{true|false}1 on first encounter">,
+def warn_nonnull_expr_compare : Warning<
+ "comparison of nonnull %select{function call|parameter}0 '%1' "
+ "%select{not |}2equal to a null pointer is '%select{true|false}2' on first "
+ "encounter">,
InGroup<TautologicalPointerCompare>;
def warn_this_null_compare : Warning<
"'this' pointer cannot be null in well-defined C++ code; comparison may be "
@@ -2664,9 +2790,10 @@ def warn_int_to_void_pointer_cast : Warning<
"cast to %1 from smaller integer type %0">,
InGroup<IntToVoidPointerCast>;
-def warn_attribute_ignored_for_field_of_type : Warning<
- "%0 attribute ignored for field of type %1">,
- InGroup<IgnoredAttributes>;
+def warn_attribute_packed_for_bitfield : Warning<
+ "'packed' attribute was ignored on bit-fields with single-byte alignment "
+ "in older versions of GCC and Clang">,
+ InGroup<DiagGroup<"attribute-packed-for-bitfield">>;
def warn_transparent_union_attribute_field_size_align : Warning<
"%select{alignment|size}0 of field %1 (%2 bits) does not match the "
"%select{alignment|size}0 of the first field in transparent union; "
@@ -2710,6 +2837,10 @@ def err_mode_not_primitive : Error<
"mode attribute only supported for integer and floating-point types">;
def err_mode_wrong_type : Error<
"type of machine mode does not match type of base type">;
+def warn_vector_mode_deprecated : Warning<
+ "specifying vector types with the 'mode' attribute is deprecated; "
+ "use the 'vector_size' attribute instead">,
+ InGroup<DeprecatedAttributes>;
def err_complex_mode_vector_type : Error<
"type of machine mode does not support base vector types">;
def err_attr_wrong_decl : Error<
@@ -2852,7 +2983,8 @@ def err_param_default_argument : Error<
def err_param_default_argument_redefinition : Error<
"redefinition of default argument">;
def ext_param_default_argument_redefinition : ExtWarn<
- "redefinition of default argument">, InGroup<Microsoft>;
+ err_param_default_argument_redefinition.Text>,
+ InGroup<MicrosoftDefaultArgRedefinition>;
def err_param_default_argument_missing : Error<
"missing default argument on parameter">;
def err_param_default_argument_missing_name : Error<
@@ -2877,7 +3009,7 @@ def err_param_default_argument_on_parameter_pack : Error<
"parameter pack cannot have a default argument">;
def err_uninitialized_member_for_assign : Error<
"cannot define the implicit copy assignment operator for %0, because "
- "non-static %select{reference|const}1 member %2 can't use copy "
+ "non-static %select{reference|const}1 member %2 cannot use copy "
"assignment operator">;
def err_uninitialized_member_in_ctor : Error<
"%select{|implicit default |inheriting }0constructor for %1 must explicitly "
@@ -2961,14 +3093,22 @@ def note_ovl_candidate_instantiation_depth : Note<
"candidate template ignored: substitution exceeded maximum template "
"instantiation depth">;
def note_ovl_candidate_underqualified : Note<
- "candidate template ignored: can't deduce a type for %0 that would "
+ "candidate template ignored: cannot deduce a type for %0 that would "
"make %2 equal %1">;
def note_ovl_candidate_substitution_failure : Note<
"candidate template ignored: substitution failure%0%1">;
def note_ovl_candidate_disabled_by_enable_if : Note<
"candidate template ignored: disabled by %0%1">;
+def note_ovl_candidate_has_pass_object_size_params: Note<
+ "candidate address cannot be taken because parameter %0 has "
+ "pass_object_size attribute">;
def note_ovl_candidate_disabled_by_enable_if_attr : Note<
"candidate disabled: %0">;
+def err_addrof_function_disabled_by_enable_if_attr : Error<
+ "cannot take address of function %0 becuase it has one or more "
+ "non-tautological enable_if conditions">;
+def note_addrof_ovl_candidate_disabled_by_enable_if_attr : Note<
+ "candidate function made ineligible by enable_if">;
def note_ovl_candidate_failed_overload_resolution : Note<
"candidate template ignored: couldn't resolve reference to overloaded "
"function %0">;
@@ -2979,7 +3119,7 @@ def note_ovl_candidate_non_deduced_mismatch : Note<
// can handle that case properly.
def note_ovl_candidate_non_deduced_mismatch_qualified : Note<
"candidate template ignored: could not match %q0 against %q1">;
-
+
// Note that we don't treat templates differently for this diagnostic.
def note_ovl_candidate_arity : Note<"candidate "
"%select{function|function|constructor|function|function|constructor|"
@@ -3251,7 +3391,7 @@ def err_addr_ovl_ambiguous : Error<
def err_addr_ovl_not_func_ptrref : Error<
"address of overloaded function %0 cannot be converted to type %1">;
def err_addr_ovl_no_qualifier : Error<
- "can't form member pointer of type %0 without '&' and class name">;
+ "cannot form member pointer of type %0 without '&' and class name">;
// C++11 Literal Operators
def err_ovl_no_viable_literal_operator : Error<
@@ -3344,11 +3484,12 @@ def note_template_decl_here : Note<"template is declared here">;
def err_template_arg_must_be_type : Error<
"template argument for template type parameter must be a type">;
def err_template_arg_must_be_type_suggest : Error<
- "template argument for template type parameter must be a type; did you forget 'typename'?">;
+ "template argument for template type parameter must be a type; "
+ "did you forget 'typename'?">;
def ext_ms_template_type_arg_missing_typename : ExtWarn<
"template argument for template type parameter must be a type; "
"omitted 'typename' is a Microsoft extension">,
- InGroup<Microsoft>;
+ InGroup<MicrosoftTemplate>;
def err_template_arg_must_be_expr : Error<
"template argument for non-type template parameter must be an expression">;
def err_template_arg_nontype_ambig : Error<
@@ -3468,10 +3609,10 @@ def err_pointer_to_member_oper_value_classify: Error<
"%select{rvalue|lvalue}1">;
def ext_ms_deref_template_argument: ExtWarn<
"non-type template argument containing a dereference operation is a "
- "Microsoft extension">, InGroup<Microsoft>;
+ "Microsoft extension">, InGroup<MicrosoftTemplate>;
def ext_ms_delayed_template_argument: ExtWarn<
"using the undeclared type %0 as a default template argument is a "
- "Microsoft extension">, InGroup<Microsoft>;
+ "Microsoft extension">, InGroup<MicrosoftTemplate>;
// C++ template specialization
def err_template_spec_unknown_kind : Error<
@@ -3519,7 +3660,7 @@ def ext_ms_template_spec_redecl_out_of_scope: ExtWarn<
"variable template partial|function template|member "
"function|static data member|member class|member enumeration}0 "
"specialization of %1 outside namespace enclosing %2 "
- "is a Microsoft extension">, InGroup<Microsoft>;
+ "is a Microsoft extension">, InGroup<MicrosoftTemplate>;
def err_template_spec_redecl_global_scope : Error<
"%select{class template|class template partial|variable template|"
"variable template partial|function template|member "
@@ -3544,7 +3685,7 @@ def err_function_specialization_in_class : Error<
"cannot specialize a function %0 within class scope">;
def ext_function_specialization_in_class : ExtWarn<
"explicit specialization of %0 within class scope is a Microsoft extension">,
- InGroup<Microsoft>;
+ InGroup<MicrosoftTemplate>;
def ext_explicit_specialization_storage_class : ExtWarn<
"explicit specialization cannot have a storage class">;
def err_explicit_specialization_inconsistent_storage_class : Error<
@@ -3705,7 +3846,7 @@ def err_explicit_instantiation_duplicate : Error<
"duplicate explicit instantiation of %0">;
def ext_explicit_instantiation_duplicate : ExtWarn<
"duplicate explicit instantiation of %0 ignored as a Microsoft extension">,
- InGroup<Microsoft>;
+ InGroup<MicrosoftTemplate>;
def note_previous_explicit_instantiation : Note<
"previous explicit instantiation is here">;
def ext_explicit_instantiation_after_specialization : Extension<
@@ -3790,10 +3931,11 @@ def err_invalid_var_template_spec_type : Error<"type %2 "
"partial specialization|redeclaration}0 of %1 does not match"
" expected type %3">;
def err_mismatched_exception_spec_explicit_instantiation : Error<
- "exception specification in explicit instantiation does not match instantiated one">;
+ "exception specification in explicit instantiation does not match "
+ "instantiated one">;
def ext_mismatched_exception_spec_explicit_instantiation : ExtWarn<
- "exception specification in explicit instantiation does not match instantiated one">,
- InGroup<Microsoft>;
+ err_mismatched_exception_spec_explicit_instantiation.Text>,
+ InGroup<MicrosoftExceptionSpec>;
// C++ typename-specifiers
def err_typename_nested_not_found : Error<"no type named %0 in %1">;
@@ -3911,10 +4053,10 @@ def err_undeclared_var_use : Error<"use of undeclared identifier %0">;
def ext_undeclared_unqual_id_with_dependent_base : ExtWarn<
"use of undeclared identifier %0; "
"unqualified lookup into dependent bases of class template %1 is a Microsoft extension">,
- InGroup<Microsoft>;
+ InGroup<MicrosoftTemplate>;
def ext_found_via_dependent_bases_lookup : ExtWarn<"use of identifier %0 "
"found via unqualified lookup into dependent bases of class templates is a "
- "Microsoft extension">, InGroup<Microsoft>;
+ "Microsoft extension">, InGroup<MicrosoftTemplate>;
def note_dependent_var_use : Note<"must qualify identifier to find this "
"declaration in dependent base class">;
def err_not_found_by_two_phase_lookup : Error<"call to function %0 that is neither "
@@ -4034,6 +4176,12 @@ def warn_undefined_inline : Warning<"inline function %q0 is not defined">,
InGroup<DiagGroup<"undefined-inline">>;
def note_used_here : Note<"used here">;
+def err_internal_linkage_redeclaration : Error<
+ "'internal_linkage' attribute does not appear on the first declaration of %0">;
+def warn_internal_linkage_local_storage : Warning<
+ "'internal_linkage' attribute on a non-static local variable is ignored">,
+ InGroup<IgnoredAttributes>;
+
def ext_internal_in_extern_inline : ExtWarn<
"static %select{function|variable}0 %1 is used in an inline function with "
"external linkage">, InGroup<StaticInInline>;
@@ -4071,7 +4219,8 @@ def note_extern_c_global_conflict : Note<
def warn_weak_import : Warning <
"an already-declared variable is made a weak_import declaration %0">;
def ext_static_non_static : Extension<
- "redeclaring non-static %0 as static is a Microsoft extension">, InGroup<Microsoft>;
+ "redeclaring non-static %0 as static is a Microsoft extension">,
+ InGroup<MicrosoftRedeclareStatic>;
def err_non_static_static : Error<
"non-static declaration of %0 follows static declaration">;
def err_extern_non_extern : Error<
@@ -4110,6 +4259,11 @@ def err_dependent_tag_decl : Error<
def err_tag_definition_of_typedef : Error<
"definition of type %0 conflicts with %select{typedef|type alias}1 of the same name">;
def err_conflicting_types : Error<"conflicting types for %0">;
+def err_different_pass_object_size_params : Error<
+ "conflicting pass_object_size attributes on parameters">;
+def err_late_asm_label_name : Error<
+ "cannot apply asm label to %select{variable|function}0 after its first use">;
+def err_different_asm_label : Error<"conflicting asm label">;
def err_nested_redefinition : Error<"nested redefinition of %0">;
def err_use_with_wrong_tag : Error<
"use of %0 with tag type that does not match previous declaration">;
@@ -4129,9 +4283,11 @@ def ext_forward_ref_enum : Extension<
def err_forward_ref_enum : Error<
"ISO C++ forbids forward references to 'enum' types">;
def ext_ms_forward_ref_enum : Extension<
- "forward references to 'enum' types are a Microsoft extension">, InGroup<Microsoft>;
+ "forward references to 'enum' types are a Microsoft extension">,
+ InGroup<MicrosoftEnumForwardReference>;
def ext_forward_ref_enum_def : Extension<
- "redeclaration of already-defined enum %0 is a GNU extension">, InGroup<GNURedeclaredEnum>;
+ "redeclaration of already-defined enum %0 is a GNU extension">,
+ InGroup<GNURedeclaredEnum>;
def err_redefinition_of_enumerator : Error<"redefinition of enumerator %0">;
def err_duplicate_member : Error<"duplicate member %0">;
@@ -4172,15 +4328,15 @@ def warn_array_new_too_large : Warning<"array is too large (%0 elements)">,
// -Wpadded, -Wpacked
def warn_padded_struct_field : Warning<
"padding %select{struct|interface|class}0 %1 with %2 "
- "%select{byte|bit}3%select{|s}4 to align %5">,
+ "%select{byte|bit}3%s2 to align %4">,
InGroup<Padded>, DefaultIgnore;
def warn_padded_struct_anon_field : Warning<
"padding %select{struct|interface|class}0 %1 with %2 "
- "%select{byte|bit}3%select{|s}4 to align anonymous bit-field">,
+ "%select{byte|bit}3%s2 to align anonymous bit-field">,
InGroup<Padded>, DefaultIgnore;
def warn_padded_struct_size : Warning<
- "padding size of %0 with %1 %select{byte|bit}2%select{|s}3 "
- "to alignment boundary">, InGroup<Padded>, DefaultIgnore;
+ "padding size of %0 with %1 %select{byte|bit}2%s1 to alignment boundary">,
+ InGroup<Padded>, DefaultIgnore;
def warn_unnecessary_packed : Warning<
"packed attribute is unnecessary for %0">, InGroup<Packed>, DefaultIgnore;
@@ -4292,20 +4448,22 @@ def err_bitfield_has_negative_width : Error<
def err_anon_bitfield_has_negative_width : Error<
"anonymous bit-field has negative width (%0)">;
def err_bitfield_has_zero_width : Error<"named bit-field %0 has zero width">;
-def err_bitfield_width_exceeds_type_size : Error<
- "size of bit-field %0 (%1 bits) exceeds size of its type (%2 bits)">;
-def err_anon_bitfield_width_exceeds_type_size : Error<
- "size of anonymous bit-field (%0 bits) exceeds size of its type (%1 bits)">;
+def err_bitfield_width_exceeds_type_width : Error<
+ "width of bit-field %0 (%1 bits) exceeds %select{width|size}2 "
+ "of its type (%3 bit%s3)">;
+def err_anon_bitfield_width_exceeds_type_width : Error<
+ "width of anonymous bit-field (%0 bits) exceeds %select{width|size}1 "
+ "of its type (%2 bit%s2)">;
def err_incorrect_number_of_vector_initializers : Error<
"number of elements must be either one or match the size of the vector">;
// Used by C++ which allows bit-fields that are wider than the type.
-def warn_bitfield_width_exceeds_type_size: Warning<
- "size of bit-field %0 (%1 bits) exceeds the size of its type; value will be "
- "truncated to %2 bits">;
-def warn_anon_bitfield_width_exceeds_type_size : Warning<
- "size of anonymous bit-field (%0 bits) exceeds size of its type; value will "
- "be truncated to %1 bits">;
+def warn_bitfield_width_exceeds_type_width: Warning<
+ "width of bit-field %0 (%1 bits) exceeds the width of its type; value will "
+ "be truncated to %2 bit%s2">, InGroup<BitFieldWidth>;
+def warn_anon_bitfield_width_exceeds_type_width : Warning<
+ "width of anonymous bit-field (%0 bits) exceeds width of its type; value "
+ "will be truncated to %1 bit%s1">, InGroup<BitFieldWidth>;
def warn_missing_braces : Warning<
"suggest braces around initialization of subobject">,
@@ -4324,7 +4482,7 @@ def err_goto_into_protected_scope : Error<
"cannot jump from this goto statement to its label">;
def ext_goto_into_protected_scope : ExtWarn<
"jump from this goto statement to its label is a Microsoft extension">,
- InGroup<Microsoft>;
+ InGroup<MicrosoftGoto>;
def warn_cxx98_compat_goto_into_protected_scope : Warning<
"jump from this goto statement to its label is incompatible with C++98">,
InGroup<CXX98Compat>, DefaultIgnore;
@@ -4378,8 +4536,10 @@ def note_protected_by_seh_finally : Note<
"jump bypasses initialization of __finally block">;
def note_protected_by___block : Note<
"jump bypasses setup of __block variable">;
-def note_protected_by_objc_ownership : Note<
- "jump bypasses initialization of retaining variable">;
+def note_protected_by_objc_strong_init : Note<
+ "jump bypasses initialization of __strong variable">;
+def note_protected_by_objc_weak_init : Note<
+ "jump bypasses initialization of __weak variable">;
def note_enters_block_captures_cxx_obj : Note<
"jump enters lifetime of block which captures a destructible C++ object">;
def note_enters_block_captures_strong : Note<
@@ -4416,8 +4576,10 @@ def note_exits_seh_finally : Note<
"jump exits __finally block">;
def note_exits_objc_autoreleasepool : Note<
"jump exits autoreleasepool block">;
-def note_exits_objc_ownership : Note<
- "jump exits scope of retaining variable">;
+def note_exits_objc_strong : Note<
+ "jump exits scope of __strong variable">;
+def note_exits_objc_weak : Note<
+ "jump exits scope of __weak variable">;
def note_exits_block_captures_cxx_obj : Note<
"jump exits lifetime of block which captures a destructible C++ object">;
def note_exits_block_captures_strong : Note<
@@ -4457,12 +4619,12 @@ def err_flexible_array_init : Error<
def ext_flexible_array_empty_aggregate_ms : Extension<
"flexible array member %0 in otherwise empty "
"%select{struct|interface|union|class|enum}1 is a Microsoft extension">,
- InGroup<Microsoft>;
+ InGroup<MicrosoftFlexibleArray>;
def err_flexible_array_union : Error<
"flexible array member %0 in a union is not allowed">;
def ext_flexible_array_union_ms : Extension<
"flexible array member %0 in a union is a Microsoft extension">,
- InGroup<Microsoft>;
+ InGroup<MicrosoftFlexibleArray>;
def ext_flexible_array_empty_aggregate_gnu : Extension<
"flexible array member %0 in otherwise empty "
"%select{struct|interface|union|class|enum}1 is a GNU extension">,
@@ -4477,7 +4639,15 @@ let CategoryName = "ARC Semantic Issue" in {
let CategoryName = "ARC Weak References" in {
def err_arc_weak_no_runtime : Error<
- "the current deployment target does not support automated __weak references">;
+ "cannot create __weak reference because the current deployment target "
+ "does not support weak references">;
+def err_arc_weak_disabled : Error<
+ "cannot create __weak reference in file using manual reference counting">;
+def err_synthesizing_arc_weak_property_disabled : Error<
+ "cannot synthesize weak property in file using manual reference counting">;
+def err_synthesizing_arc_weak_property_no_runtime : Error<
+ "cannot synthesize weak property because the current deployment target "
+ "does not support weak references">;
def err_arc_unsupported_weak_class : Error<
"class is incompatible with __weak references">;
def err_arc_weak_unavailable_assign : Error<
@@ -4495,6 +4665,21 @@ def err_arc_convesion_of_weak_unavailable : Error<
let CategoryName = "ARC Restrictions" in {
+def err_unavailable_in_arc : Error<
+ "%0 is unavailable in ARC">;
+def note_arc_forbidden_type : Note<
+ "declaration uses type that is ill-formed in ARC">;
+def note_performs_forbidden_arc_conversion : Note<
+ "inline function performs a conversion which is forbidden in ARC">;
+def note_arc_init_returns_unrelated : Note<
+ "init method must return a type related to its receiver type">;
+def note_arc_weak_disabled : Note<
+ "declaration uses __weak, but ARC is disabled">;
+def note_arc_weak_no_runtime : Note<"declaration uses __weak, which "
+ "the current deployment target does not support">;
+def note_arc_field_with_ownership : Note<
+ "field has non-trivial ownership qualification">;
+
def err_arc_illegal_explicit_message : Error<
"ARC forbids explicit message send of %0">;
def err_arc_unused_init_message : Error<
@@ -4540,7 +4725,7 @@ def err_typecheck_arc_assign_self : Error<
def err_typecheck_arc_assign_self_class_method : Error<
"cannot assign to 'self' in a class method">;
def err_typecheck_arr_assign_enumeration : Error<
- "fast enumeration variables can't be modified in ARC by default; "
+ "fast enumeration variables cannot be modified in ARC by default; "
"declare the variable __strong to allow this">;
def warn_arc_retained_assign : Warning<
"assigning retained object to %select{weak|unsafe_unretained}0 "
@@ -4620,7 +4805,7 @@ def err_arc_strong_property_ownership : Error<
"existing instance variable %1 for strong property %0 may not be "
"%select{|__unsafe_unretained||__weak}2">;
def err_arc_assign_property_ownership : Error<
- "existing instance variable %1 for property %0 with %select{unsafe_unretained| assign}2 "
+ "existing instance variable %1 for property %0 with %select{unsafe_unretained|assign}2 "
"attribute must be __unsafe_unretained">;
def err_arc_inconsistent_property_ownership : Error<
"%select{|unsafe_unretained|strong|weak}1 property %0 may not also be "
@@ -4724,8 +4909,8 @@ def err_sizeof_alignof_function_type : Error<
"function type">;
def err_openmp_default_simd_align_expr : Error<
"invalid application of '__builtin_omp_required_simd_align' to an expression, only type is allowed">;
-def err_sizeof_alignof_bitfield : Error<
- "invalid application of '%select{sizeof|alignof}0' to bit-field">;
+def err_sizeof_alignof_typeof_bitfield : Error<
+ "invalid application of '%select{sizeof|alignof|typeof}0' to bit-field">;
def err_alignof_member_of_incomplete_type : Error<
"invalid application of 'alignof' to a field of a class still being defined">;
def err_vecstep_non_scalar_vector_type : Error<
@@ -4753,9 +4938,8 @@ def warn_floatingpoint_eq : Warning<
"comparing floating point with == or != is unsafe">,
InGroup<DiagGroup<"float-equal">>, DefaultIgnore;
-def warn_division_by_zero : Warning<"division by zero is undefined">,
- InGroup<DivZero>;
-def warn_remainder_by_zero : Warning<"remainder by zero is undefined">,
+def warn_remainder_division_by_zero : Warning<
+ "%select{remainder|division}0 by zero is undefined">,
InGroup<DivZero>;
def warn_shift_lhs_negative : Warning<"shifting a negative signed value is undefined">,
InGroup<DiagGroup<"shift-negative-value">>;
@@ -4793,8 +4977,8 @@ def note_logical_instead_of_bitwise_change_operator : Note<
def note_logical_instead_of_bitwise_remove_constant : Note<
"remove constant to silence this warning">;
-def warn_bitwise_and_in_bitwise_or : Warning<
- "'&' within '|'">, InGroup<BitwiseOpParentheses>;
+def warn_bitwise_op_in_bitwise_op : Warning<
+ "'%0' within '%1'">, InGroup<BitwiseOpParentheses>;
def warn_logical_and_in_logical_or : Warning<
"'&&' within '||'">, InGroup<LogicalOpParentheses>;
@@ -4945,10 +5129,10 @@ def err_qualified_param_declarator : Error<
def ext_out_of_line_declaration : ExtWarn<
"out-of-line declaration of a member must be a definition">,
InGroup<OutOfLineDeclaration>, DefaultError;
-def warn_member_extra_qualification : Warning<
- "extra qualification on member %0">, InGroup<Microsoft>;
def err_member_extra_qualification : Error<
"extra qualification on member %0">;
+def warn_member_extra_qualification : Warning<
+ err_member_extra_qualification.Text>, InGroup<MicrosoftExtraQualification>;
def warn_namespace_member_extra_qualification : Warning<
"extra qualification on member %0">,
InGroup<DiagGroup<"extra-qualification">>;
@@ -5044,6 +5228,9 @@ def err_unqualified_pointer_member_function : Error<
"must explicitly qualify name of member function when taking its address">;
def err_invalid_form_pointer_member_function : Error<
"cannot create a non-constant pointer to member function">;
+def err_address_of_function_with_pass_object_size_params: Error<
+ "cannot take address of function %0 because parameter %1 has "
+ "pass_object_size attribute">;
def err_parens_pointer_member_function : Error<
"cannot parenthesize the name of a method when forming a member pointer">;
def err_typecheck_invalid_lvalue_addrof_addrof_function : Error<
@@ -5197,6 +5384,8 @@ def err_builtin_func_cast_more_than_one_arg : Error<
"function-style cast to a builtin type can only take one argument">;
def err_value_init_for_array_type : Error<
"array types cannot be value-initialized">;
+def err_value_init_for_function_type : Error<
+ "function types cannot be value-initialized">;
def warn_format_nonliteral_noargs : Warning<
"format string is not a string literal (potentially insecure)">,
InGroup<FormatSecurity>;
@@ -5354,7 +5543,7 @@ def warn_objc_pointer_cxx_catch_fragile : Warning<
"cannot catch an exception thrown with @throw in C++ in the non-unified "
"exception model">, InGroup<ObjCNonUnifiedException>;
def err_objc_object_catch : Error<
- "can't catch an Objective-C object by value">;
+ "cannot catch an Objective-C object by value">;
def err_incomplete_type_objc_at_encode : Error<
"'@encode' of incomplete type %0">;
def warn_objc_circular_container : Warning<
@@ -5423,8 +5612,7 @@ def ext_cast_fn_obj : Extension<
"cast between pointer-to-function and pointer-to-object is an extension">;
def ext_ms_cast_fn_obj : ExtWarn<
"static_cast between pointer-to-function and pointer-to-object is a "
- "Microsoft extension">,
- InGroup<Microsoft>;
+ "Microsoft extension">, InGroup<MicrosoftCast>;
def warn_cxx98_compat_cast_fn_obj : Warning<
"cast between pointer-to-function and pointer-to-object is incompatible with C++98">,
InGroup<CXX98CompatPedantic>, DefaultIgnore;
@@ -5534,7 +5722,7 @@ def ext_default_init_const : ExtWarn<
"default initialization of an object of const type %0"
"%select{| without a user-provided default constructor}1 "
"is a Microsoft extension">,
- InGroup<Microsoft>;
+ InGroup<MicrosoftConstInit>;
def err_delete_operand : Error<"cannot delete expression of type %0">;
def ext_delete_void_ptr_operand : ExtWarn<
"cannot delete expression with pointer-to-'void' type %0">,
@@ -5565,8 +5753,11 @@ def note_member_declared_here : Note<
"member %0 declared here">;
def err_decrement_bool : Error<"cannot decrement expression of type bool">;
def warn_increment_bool : Warning<
- "incrementing expression of type bool is deprecated">,
- InGroup<DeprecatedIncrementBool>;
+ "incrementing expression of type bool is deprecated and "
+ "incompatible with C++1z">, InGroup<DeprecatedIncrementBool>;
+def ext_increment_bool : ExtWarn<
+ "ISO C++1z does not allow incrementing expression of type bool">,
+ DefaultError, InGroup<IncrementBool>;
def err_increment_decrement_enum : Error<
"cannot %select{decrement|increment}0 expression of enum type %1">;
def err_catch_incomplete_ptr : Error<
@@ -5606,7 +5797,8 @@ def warn_non_virtual_dtor : Warning<
"%0 has virtual functions but non-virtual destructor">,
InGroup<NonVirtualDtor>, DefaultIgnore;
def warn_delete_non_virtual_dtor : Warning<
- "delete called on %0 that has virtual functions but non-virtual destructor">,
+ "delete called on non-final %0 that has virtual functions "
+ "but non-virtual destructor">,
InGroup<DeleteNonVirtualDtor>, DefaultIgnore;
def warn_delete_abstract_non_virtual_dtor : Warning<
"delete called on %0 that is abstract but has non-virtual destructor">,
@@ -5656,6 +5848,9 @@ def err_throw_incomplete_ptr : Error<
"cannot throw pointer to object of incomplete type %0">;
def err_return_in_constructor_handler : Error<
"return in the catch of a function try block of a constructor is illegal">;
+def warn_cdtor_function_try_handler_mem_expr : Warning<
+ "cannot refer to a non-static member from the handler of a "
+ "%select{constructor|destructor}0 function try block">, InGroup<Exceptions>;
let CategoryName = "Lambda Issue" in {
def err_capture_more_than_once : Error<
@@ -5721,8 +5916,8 @@ let CategoryName = "Lambda Issue" in {
def err_init_capture_multiple_expressions : Error<
"initializer for lambda capture %0 contains multiple expressions">;
def err_init_capture_paren_braces : Error<
- "cannot deduce type for lambda capture %0 from "
- "parenthesized initializer list">;
+ "cannot deduce type for lambda capture %1 from "
+ "%select{parenthesized|nested}0 initializer list">;
def err_init_capture_deduction_failure : Error<
"cannot deduce type for lambda capture %0 from initializer of type %2">;
def err_init_capture_deduction_failure_from_init_list : Error<
@@ -5752,7 +5947,7 @@ def err_pseudo_dtor_base_not_scalar : Error<
"pseudo-destructor expression">;
def ext_pseudo_dtor_on_void : ExtWarn<
"pseudo-destructors on type void are a Microsoft extension">,
- InGroup<Microsoft>;
+ InGroup<MicrosoftVoidPseudoDtor>;
def err_pseudo_dtor_type_mismatch : Error<
"the type of object expression "
"%diff{($) does not match the type being destroyed ($)|"
@@ -5769,14 +5964,13 @@ def err_pseudo_dtor_destructor_non_type : Error<
def err_invalid_use_of_function_type : Error<
"a function type is not allowed here">;
def err_invalid_use_of_array_type : Error<"an array type is not allowed here">;
-def err_type_defined_in_condition : Error<
- "types may not be defined in conditions">;
def err_typecheck_bool_condition : Error<
"value of type %0 is not contextually convertible to 'bool'">;
def err_typecheck_ambiguous_condition : Error<
"conversion %diff{from $ to $|between types}0,1 is ambiguous">;
def err_typecheck_nonviable_condition : Error<
- "no viable conversion%diff{ from $ to $|}0,1">;
+ "no viable conversion%select{%diff{ from $ to $|}1,2|"
+ "%diff{ from returned value of type $ to function return type $|}1,2}0">;
def err_typecheck_nonviable_condition_incomplete : Error<
"no viable conversion%diff{ from $ to incomplete type $|}0,1">;
def err_typecheck_deleted_function : Error<
@@ -6160,6 +6354,9 @@ def err_atomic_op_needs_atomic : Error<
def err_atomic_op_needs_non_const_atomic : Error<
"address argument to atomic operation must be a pointer to non-const _Atomic "
"type (%0 invalid)">;
+def err_atomic_op_needs_non_const_pointer : Error<
+ "address argument to atomic operation must be a pointer to non-const "
+ "type (%0 invalid)">;
def err_atomic_op_needs_trivial_copy : Error<
"address argument to atomic operation must be a pointer to a "
"trivially-copyable type (%0 invalid)">;
@@ -6173,10 +6370,22 @@ def warn_atomic_op_has_invalid_memory_order : Warning<
"memory order argument to atomic operation is invalid">,
InGroup<DiagGroup<"atomic-memory-ordering">>;
+def err_overflow_builtin_must_be_int : Error<
+ "operand argument to overflow builtin must be an integer (%0 invalid)">;
+def err_overflow_builtin_must_be_ptr_int : Error<
+ "result argument to overflow builtin must be a pointer "
+ "to a non-const integer (%0 invalid)">;
+
def err_atomic_load_store_uses_lib : Error<
"atomic %select{load|store}0 requires runtime support that is not "
"available for this target">;
+def err_nontemporal_builtin_must_be_pointer : Error<
+ "address argument to nontemporal builtin must be a pointer (%0 invalid)">;
+def err_nontemporal_builtin_must_be_pointer_intfltptr_or_vector : Error<
+ "address argument to nontemporal builtin must be a pointer to integer, float, "
+ "pointer, or a vector of such types (%0 invalid)">;
+
def err_deleted_function_use : Error<"attempt to use a deleted function">;
def err_kern_type_not_void_return : Error<
@@ -6339,6 +6548,10 @@ def warn_cast_qual : Warning<"cast from %0 to %1 drops %select{const and "
InGroup<CastQual>, DefaultIgnore;
def warn_cast_qual2 : Warning<"cast from %0 to %1 must have all intermediate "
"pointers const qualified to be safe">, InGroup<CastQual>, DefaultIgnore;
+def warn_redefine_extname_not_applied : Warning<
+ "#pragma redefine_extname is applicable to external C declarations only; "
+ "not applied to %select{function|variable}0 %1">,
+ InGroup<Pragmas>;
} // End of general sema category.
// inline asm.
@@ -6361,6 +6574,10 @@ let CategoryName = "Inline Assembly Issue" in {
"asm constraint has an unexpected number of alternatives: %0 vs %1">;
def err_asm_incomplete_type : Error<"asm operand has incomplete type %0">;
def err_asm_unknown_register_name : Error<"unknown register name '%0' in asm">;
+ def err_asm_invalid_global_var_reg : Error<"register '%0' unsuitable for "
+ "global register variables on this target">;
+ def err_asm_register_size_mismatch : Error<"size of register '%0' does not "
+ "match variable size">;
def err_asm_bad_register_type : Error<"bad type for named register variable">;
def err_asm_invalid_input_size : Error<
"invalid input size for constraint '%0'">;
@@ -6371,9 +6588,11 @@ let CategoryName = "Inline Assembly Issue" in {
"remove the cast or build with -fheinous-gnu-extensions">;
def err_invalid_asm_value_for_constraint
: Error <"value '%0' out of range for constraint '%1'">;
- def err_asm_bitfield_in_memory_constraint
- : Error <"reference to a bit-field in asm "
- "%select{input|output}0 with a memory constraint '%1'">;
+ def err_asm_non_addr_value_in_memory_constraint : Error <
+ "reference to a %select{bit-field|vector element|global register variable}0"
+ " in asm %select{input|output}1 with a memory constraint '%2'">;
+ def err_asm_input_duplicate_match : Error<
+ "more than one input constraint matches the same output '%0'">;
def warn_asm_label_on_auto_decl : Warning<
"ignored asm label '%0' on automatic variable">;
@@ -6388,6 +6607,8 @@ let CategoryName = "Inline Assembly Issue" in {
def note_asm_missing_constraint_modifier : Note<
"use constraint modifier \"%0\"">;
+ def note_asm_input_duplicate_first : Note<
+ "constraint '%0' is already present here">;
}
let CategoryName = "Semantic Issue" in {
@@ -6490,15 +6711,13 @@ def err_anonymous_union_with_storage_spec : Error<
def err_anonymous_struct_not_member : Error<
"anonymous %select{structs|structs and classes}0 must be "
"%select{struct or union|class}0 members">;
-def err_anonymous_union_member_redecl : Error<
- "member of anonymous union redeclares %0">;
-def err_anonymous_struct_member_redecl : Error<
- "member of anonymous struct redeclares %0">;
+def err_anonymous_record_member_redecl : Error<
+ "member of anonymous %select{struct|union}0 redeclares %1">;
def err_anonymous_record_with_type : Error<
"types cannot be declared in an anonymous %select{struct|union}0">;
def ext_anonymous_record_with_type : Extension<
"types declared in an anonymous %select{struct|union}0 are a Microsoft "
- "extension">, InGroup<Microsoft>;
+ "extension">, InGroup<MicrosoftAnonTag>;
def ext_anonymous_record_with_anonymous_type : Extension<
"anonymous types declared in an anonymous %select{struct|union}0 "
"are an extension">, InGroup<DiagGroup<"nested-anon-types">>;
@@ -6513,7 +6732,7 @@ def err_anonymous_record_nonpublic_member : Error<
"%select{private|protected}1 data member">;
def ext_ms_anonymous_record : ExtWarn<
"anonymous %select{structs|unions}0 are a Microsoft extension">,
- InGroup<Microsoft>;
+ InGroup<MicrosoftAnonTag>;
// C++ local classes
def err_reference_to_local_var_in_enclosing_function : Error<
@@ -6846,17 +7065,12 @@ def warn_null_ret : Warning<
InGroup<NonNull>;
// CHECK: returning address/reference of stack memory
-def warn_ret_stack_addr : Warning<
- "address of stack memory associated with local variable %0 returned">,
+def warn_ret_stack_addr_ref : Warning<
+ "%select{address of|reference to}0 stack memory associated with local "
+ "variable %1 returned">,
InGroup<ReturnStackAddress>;
-def warn_ret_stack_ref : Warning<
- "reference to stack memory associated with local variable %0 returned">,
- InGroup<ReturnStackAddress>;
-def warn_ret_local_temp_addr : Warning<
- "returning address of local temporary object">,
- InGroup<ReturnStackAddress>;
-def warn_ret_local_temp_ref : Warning<
- "returning reference to local temporary object">,
+def warn_ret_local_temp_addr_ref : Warning<
+ "returning %select{address of|reference to}0 local temporary object">,
InGroup<ReturnStackAddress>;
def warn_ret_addr_label : Warning<
"returning address of label, which is local">,
@@ -7058,6 +7272,10 @@ def note_empty_body_on_separate_line : Note<
def err_va_start_used_in_non_variadic_function : Error<
"'va_start' used in function with fixed args">;
+def err_va_start_used_in_wrong_abi_function : Error<
+ "'va_start' used in %select{System V|Win64}0 ABI function">;
+def err_ms_va_start_used_in_sysv_function : Error<
+ "'__builtin_ms_va_start' used in System V ABI function">;
def warn_second_parameter_of_va_start_not_last_named_argument : Warning<
"second parameter of 'va_start' not last named argument">, InGroup<Varargs>;
def warn_va_start_of_reference_type_is_undefined : Warning<
@@ -7172,6 +7390,8 @@ def err_64_bit_builtin_32_bit_tgt : Error<
"this builtin is only available on 64-bit targets">;
def err_ppc_builtin_only_on_pwr7 : Error<
"this builtin is only valid on POWER7 or later CPUs">;
+def err_x86_builtin_32_bit_tgt : Error<
+ "this builtin is only available on x86-64 targets">;
def err_builtin_longjmp_unsupported : Error<
"__builtin_longjmp is not supported for the current target">;
@@ -7387,6 +7607,8 @@ def err_opencl_ptrptr_kernel_param : Error<
"kernel parameter cannot be declared as a pointer to a pointer">;
def err_opencl_private_ptr_kernel_param : Error<
"kernel parameter cannot be declared as a pointer to the __private address space">;
+def err_opencl_non_kernel_variable : Error<
+ "non-kernel function variable cannot be declared in %0 address space">;
def err_static_function_scope : Error<
"variables in function scope cannot be declared static">;
def err_opencl_bitfields : Error<
@@ -7414,7 +7636,7 @@ def err_sampler_argument_required : Error<
def err_wrong_sampler_addressspace: Error<
"sampler type cannot be used with the __local and __global address space qualifiers">;
def err_opencl_global_invalid_addr_space : Error<
- "global variables must have a constant address space qualifier">;
+ "program scope variable must reside in %0 address space">;
def err_opencl_no_main : Error<"%select{function|kernel}0 cannot be called 'main'">;
def err_opencl_kernel_attr :
Error<"attribute %0 can only be applied to a kernel function">;
@@ -7422,6 +7644,16 @@ def err_opencl_return_value_with_address_space : Error<
"return value cannot be qualified with address space">;
def err_opencl_constant_no_init : Error<
"variable in constant address space must be initialized">;
+def err_atomic_init_constant : Error<
+ "atomic variable can only be assigned to a compile time constant"
+ " in the declaration statement in the program scope">;
+def err_opencl_implicit_vector_conversion : Error<
+ "implicit conversions between vector types (%0 and %1) are not permitted">;
+
+// OpenCL Section 6.8.g
+def err_opencl_unknown_type_specifier : Error<
+ "OpenCL does not support the '%0' %select{type qualifier|storage class specifier}1">;
+
} // end of sema category
let CategoryName = "OpenMP Issue" in {
@@ -7448,7 +7680,7 @@ def err_omp_firstprivate_incomplete_type : Error<
def err_omp_lastprivate_incomplete_type : Error<
"a lastprivate variable with incomplete type %0">;
def err_omp_reduction_incomplete_type : Error<
- "a reduction variable with incomplete type %0">;
+ "a reduction list item with incomplete type %0">;
def err_omp_unexpected_clause_value : Error<
"expected %0 in OpenMP clause '%1'">;
def err_omp_expected_var_name : Error<
@@ -7457,10 +7689,6 @@ def err_omp_expected_var_name_or_array_item : Error<
"expected variable name, array element or array section">;
def note_omp_task_predetermined_firstprivate_here : Note<
"predetermined as a firstprivate in a task construct here">;
-def err_omp_clause_ref_type_arg : Error<
- "arguments of OpenMP clause '%0' cannot be of reference type %1">;
-def err_omp_task_predetermined_firstprivate_ref_type_arg : Error<
- "predetermined as a firstprivate in a task construct variable cannot be of reference type %0">;
def err_omp_threadprivate_incomplete_type : Error<
"threadprivate variable with incomplete type %0">;
def err_omp_no_dsa_for_variable : Error<
@@ -7489,10 +7717,10 @@ def err_omp_loop_var_dsa : Error<
def err_omp_not_for : Error<
"%select{statement after '#pragma omp %1' must be a for loop|"
"expected %2 for loops after '#pragma omp %1'%select{|, but found only %4}3}0">;
-def note_omp_collapse_expr : Note<
- "as specified in 'collapse' clause">;
+def note_omp_collapse_ordered_expr : Note<
+ "as specified in %select{'collapse'|'ordered'|'collapse' and 'ordered'}0 clause%select{||s}0">;
def err_omp_negative_expression_in_clause : Error<
- "argument to '%0' clause must be a positive integer value">;
+ "argument to '%0' clause must be a %select{non-negative|strictly positive}1 integer value">;
def err_omp_not_integral : Error<
"expression must have integral or unscoped enumeration "
"type, not %0">;
@@ -7509,6 +7737,8 @@ def err_omp_required_access : Error<
"%0 variable must be %1">;
def err_omp_const_variable : Error<
"const-qualified variable cannot be %0">;
+def err_omp_const_reduction_list_item : Error<
+ "const-qualified list item cannot be reduction">;
def err_omp_linear_incomplete_type : Error<
"a linear variable with incomplete type %0">;
def err_omp_linear_expected_int_or_ptr : Error<
@@ -7529,8 +7759,8 @@ def err_omp_aligned_twice : Error<
def err_omp_local_var_in_threadprivate_init : Error<
"variable with local storage in initial value of threadprivate variable">;
def err_omp_loop_not_canonical_init : Error<
- "initialization clause of OpenMP for loop must be of the form "
- "'var = init' or 'T var = init'">;
+ "initialization clause of OpenMP for loop is not in canonical form "
+ "('var = init' or 'T var = init')">;
def ext_omp_loop_not_canonical_init : ExtWarn<
"initialization clause of OpenMP for loop is not in canonical form "
"('var = init' or 'T var = init')">, InGroup<OpenMPLoopForm>;
@@ -7560,7 +7790,7 @@ def warn_omp_loop_64_bit_var : Warning<
def err_omp_unknown_reduction_identifier : Error<
"incorrect reduction identifier, expected one of '+', '-', '*', '&', '|', '^', '&&', '||', 'min' or 'max'">;
def err_omp_reduction_type_array : Error<
- "a reduction variable with array type %0">;
+ "a reduction list item with array type %0">;
def err_omp_reduction_ref_type_arg : Error<
"argument of OpenMP clause 'reduction' must reference the same object in all threads">;
def err_omp_clause_not_arithmetic_type_arg : Error<
@@ -7574,12 +7804,13 @@ def note_omp_referenced : Note<
def err_omp_reduction_in_task : Error<
"reduction variables may not be accessed in an explicit task">;
def err_omp_reduction_id_not_compatible : Error<
- "variable of type %0 is not valid for specified reduction operation: unable to provide default initialization value">;
+ "list item of type %0 is not valid for specified reduction operation: unable to provide default initialization value">;
def err_omp_prohibited_region : Error<
"region cannot be%select{| closely}0 nested inside '%1' region"
"%select{|; perhaps you forget to enclose 'omp %3' directive into a parallel region?|"
"; perhaps you forget to enclose 'omp %3' directive into a for or a parallel for region with 'ordered' clause?|"
- "; perhaps you forget to enclose 'omp %3' directive into a target region?}2">;
+ "; perhaps you forget to enclose 'omp %3' directive into a target region?|"
+ "; perhaps you forget to enclose 'omp %3' directive into a teams region?}2">;
def err_omp_prohibited_region_simd : Error<
"OpenMP constructs may not be nested inside a simd region">;
def err_omp_prohibited_region_atomic : Error<
@@ -7649,6 +7880,95 @@ def err_omp_parent_cancel_region_nowait : Error<
"parent region for 'omp %select{cancellation point/cancel}0' construct cannot be nowait">;
def err_omp_parent_cancel_region_ordered : Error<
"parent region for 'omp %select{cancellation point/cancel}0' construct cannot be ordered">;
+def err_omp_array_section_use : Error<"OpenMP array section is not allowed here">;
+def err_omp_typecheck_section_value : Error<
+ "subscripted value is not an array or pointer">;
+def err_omp_typecheck_section_not_integer : Error<
+ "array section %select{lower bound|length}0 is not an integer">;
+def err_omp_section_function_type : Error<
+ "section of pointer to function type %0">;
+def warn_omp_section_is_char : Warning<"array section %select{lower bound|length}0 is of type 'char'">,
+ InGroup<CharSubscript>, DefaultIgnore;
+def err_omp_section_incomplete_type : Error<
+ "section of pointer to incomplete type %0">;
+def err_omp_section_negative : Error<
+ "section %select{lower bound|length}0 is evaluated to a negative value %1">;
+def err_omp_section_length_undefined : Error<
+ "section length is unspecified and cannot be inferred because subscripted value is %select{not an array|an array of unknown bound}0">;
+def err_omp_wrong_linear_modifier : Error<
+ "expected %select{'val' modifier|one of 'ref', val' or 'uval' modifiers}0">;
+def err_omp_wrong_linear_modifier_non_reference : Error<
+ "variable of non-reference type %0 can be used only with 'val' modifier, but used with '%1'">;
+def err_omp_wrong_simdlen_safelen_values : Error<
+ "the value of 'simdlen' parameter must be less than or equal to the value of the 'safelen' parameter">;
+def err_omp_wrong_if_directive_name_modifier : Error<
+ "directive name modifier '%0' is not allowed for '#pragma omp %1'">;
+def err_omp_no_more_if_clause : Error<
+ "no more 'if' clause is allowed">;
+def err_omp_unnamed_if_clause : Error<
+ "expected %select{|one of}0 %1 directive name modifier%select{|s}0">;
+def note_omp_previous_named_if_clause : Note<
+ "previous clause with directive name modifier specified here">;
+def err_omp_ordered_directive_with_param : Error<
+ "'ordered' directive %select{without any clauses|with 'threads' clause}0 cannot be closely nested inside ordered region with specified parameter">;
+def err_omp_ordered_directive_without_param : Error<
+ "'ordered' directive with 'depend' clause cannot be closely nested inside ordered region without specified parameter">;
+def note_omp_ordered_param : Note<
+ "'ordered' clause with specified parameter">;
+def err_omp_expected_base_var_name : Error<
+ "expected variable name as a base of the array %select{subscript|section}0">;
+def err_omp_map_shared_storage : Error<
+ "variable already marked as mapped in current construct">;
+def err_omp_not_mappable_type : Error<
+ "type %0 is not mappable to target">;
+def note_omp_polymorphic_in_target : Note<
+ "mappable type cannot be polymorphic">;
+def note_omp_static_member_in_target : Note<
+ "mappable type cannot contain static members">;
+def err_omp_threadprivate_in_map : Error<
+ "threadprivate variables are not allowed in map clause">;
+def err_omp_wrong_ordered_loop_count : Error<
+ "the parameter of the 'ordered' clause must be greater than or equal to the parameter of the 'collapse' clause">;
+def note_collapse_loop_count : Note<
+ "parameter of the 'collapse' clause">;
+def err_omp_grainsize_num_tasks_mutually_exclusive : Error<
+ "'%0' and '%1' clause are mutually exclusive and may not appear on the same directive">;
+def note_omp_previous_grainsize_num_tasks : Note<
+ "'%0' clause is specified here">;
+def err_omp_hint_clause_no_name : Error<
+ "the name of the construct must be specified in presence of 'hint' clause">;
+def err_omp_critical_with_hint : Error<
+ "constructs with the same name must have a 'hint' clause with the same value">;
+def note_omp_critical_hint_here : Note<
+ "%select{|previous }0'hint' clause with value '%1'">;
+def note_omp_critical_no_hint : Note<
+ "%select{|previous }0directive with no 'hint' clause specified">;
+def err_omp_firstprivate_distribute_private_teams : Error<
+ "private variable in '#pragma omp teams' cannot be firstprivate in '#pragma omp distribute'">;
+def err_omp_firstprivate_and_lastprivate_in_distribute : Error<
+ "lastprivate variable cannot be firstprivate in '#pragma omp distribute'">;
+def err_omp_firstprivate_distribute_in_teams_reduction : Error<
+ "reduction variable in '#pragma omp teams' cannot be firstprivate in '#pragma omp distribute'">;
+def err_omp_depend_clause_thread_simd : Error<
+ "'depend' clauses cannot be mixed with '%0' clause">;
+def err_omp_depend_sink_wrong_expr : Error<
+ "expected expression form x[+-d], where x is the loop iteration variable and d is a constant non-negative integer">;
+def err_omp_depend_sink_expected_loop_iteration : Error<
+ "expected %0 loop iteration variable">;
+def err_omp_depend_sink_unexpected_expr : Error<
+ "unexpected expression: number of expressions is larger than the number of associated loops">;
+def err_omp_depend_sink_expected_plus_minus : Error<
+ "expected '+' or '-' operation">;
+def err_omp_depend_sink_source_not_allowed : Error<
+ "'depend(%select{source|sink:vec}0)' clause%select{|s}0 cannot be mixed with 'depend(%select{sink:vec|source}0)' clause%select{s|}0">;
+def err_omp_linear_ordered : Error<
+ "'linear' clause cannot be specified along with 'ordered' clause with a parameter">;
+def err_omp_unexpected_schedule_modifier : Error<
+ "modifier '%0' cannot be used along with modifier '%1'">;
+def err_omp_schedule_nonmonotonic_static : Error<
+ "'nonmonotonic' modifier can only be specified with 'dynamic' or 'guided' schedule kind">;
+def err_omp_schedule_nonmonotonic_ordered : Error<
+ "'schedule' clause with 'nonmonotonic' modifier cannot be specified if an 'ordered' clause is specified">;
} // end of OpenMP category
let CategoryName = "Related Result Type Issue" in {
@@ -7692,18 +8012,63 @@ def err_module_unimported_use : Error<
def err_module_unimported_use_multiple : Error<
"%select{declaration|definition|default argument}0 of %1 must be imported "
"from one of the following modules before it is required:%2">;
-def err_module_import_in_extern_c : Error<
+def ext_module_import_in_extern_c : ExtWarn<
"import of C++ module '%0' appears within extern \"C\" language linkage "
- "specification">;
+ "specification">, DefaultError,
+ InGroup<DiagGroup<"module-import-in-extern-c">>;
def note_module_import_in_extern_c : Note<
"extern \"C\" language linkage specification begins here">;
-def err_module_import_not_at_top_level : Error<
- "import of module '%0' appears within %1">;
+def err_module_import_not_at_top_level_fatal : Error<
+ "import of module '%0' appears within %1">, DefaultFatal;
+def ext_module_import_not_at_top_level_noop : ExtWarn<
+ "redundant #include of module '%0' appears within %1">, DefaultError,
+ InGroup<DiagGroup<"modules-import-nested-redundant">>;
def note_module_import_not_at_top_level : Note<"%0 begins here">;
def err_module_self_import : Error<
"import of module '%0' appears within same top-level module '%1'">;
def err_module_import_in_implementation : Error<
"@import of module '%0' in implementation of '%1'; use #import">;
+
+def ext_equivalent_internal_linkage_decl_in_modules : ExtWarn<
+ "ambiguous use of internal linkage declaration %0 defined in multiple modules">,
+ InGroup<DiagGroup<"modules-ambiguous-internal-linkage">>;
+def note_equivalent_internal_linkage_decl : Note<
+ "declared here%select{ in module '%1'|}0">;
+}
+
+let CategoryName = "Coroutines Issue" in {
+def err_return_in_coroutine : Error<
+ "return statement not allowed in coroutine; did you mean 'co_return'?">;
+def note_declared_coroutine_here : Note<
+ "function is a coroutine due to use of "
+ "'%select{co_await|co_yield|co_return}0' here">;
+def err_coroutine_objc_method : Error<
+ "Objective-C methods as coroutines are not yet supported">;
+def err_coroutine_unevaluated_context : Error<
+ "'%0' cannot be used in an unevaluated context">;
+def err_coroutine_outside_function : Error<
+ "'%0' cannot be used outside a function">;
+def err_coroutine_ctor_dtor : Error<
+ "'%1' cannot be used in a %select{constructor|destructor}0">;
+def err_coroutine_constexpr : Error<
+ "'%0' cannot be used in a constexpr function">;
+def err_coroutine_varargs : Error<
+ "'%0' cannot be used in a varargs function">;
+def ext_coroutine_without_co_await_co_yield : ExtWarn<
+ "'co_return' used in a function "
+ "that uses neither 'co_await' nor 'co_yield'">,
+ InGroup<DiagGroup<"coreturn-without-coawait">>;
+def err_implied_std_coroutine_traits_not_found : Error<
+ "you need to include <coroutine> before defining a coroutine">;
+def err_malformed_std_coroutine_traits : Error<
+ "'std::coroutine_traits' must be a class template">;
+def err_implied_std_coroutine_traits_promise_type_not_found : Error<
+ "this function cannot be a coroutine: %q0 has no member named 'promise_type'">;
+def err_implied_std_coroutine_traits_promise_type_not_class : Error<
+ "this function cannot be a coroutine: %0 is not a class">;
+def err_coroutine_traits_missing_specialization : Error<
+ "this function cannot be a coroutine: missing definition of "
+ "specialization %q0">;
}
let CategoryName = "Documentation Issue" in {
@@ -7761,10 +8126,10 @@ def warn_nullability_missing : Warning<
"type specifier (_Nonnull, _Nullable, or _Null_unspecified)">,
InGroup<NullabilityCompleteness>;
-def err_type_arg_explicit_nullability : Error<
+def err_objc_type_arg_explicit_nullability : Error<
"type argument %0 cannot explicitly specify nullability">;
-def err_type_param_bound_explicit_nullability : Error<
+def err_objc_type_param_bound_explicit_nullability : Error<
"type parameter %0 bound %1 cannot explicitly specify nullability">;
}
@@ -7776,6 +8141,8 @@ def err_objc_type_param_bound_nonobject : Error<
def err_objc_type_param_bound_missing_pointer : Error<
"missing '*' in type bound %0 for type parameter %1">;
+def err_objc_type_param_bound_qualified : Error<
+ "type bound %1 for type parameter %0 cannot be qualified with '%2'">;
def err_objc_type_param_redecl : Error<
"redeclaration of type parameter %0">;
@@ -7810,6 +8177,8 @@ def err_objc_parameterized_forward_class_first : Error<
def err_objc_type_arg_missing_star : Error<
"type argument %0 must be a pointer (requires a '*')">;
+def err_objc_type_arg_qualified : Error<
+ "type argument %0 cannot be qualified with '%1'">;
def err_objc_type_arg_missing : Error<
"no type or protocol named %0">;
diff --git a/include/clang/Basic/DiagnosticSerializationKinds.td b/include/clang/Basic/DiagnosticSerializationKinds.td
index 796027ea628bf..16c77435558fd 100644
--- a/include/clang/Basic/DiagnosticSerializationKinds.td
+++ b/include/clang/Basic/DiagnosticSerializationKinds.td
@@ -53,6 +53,20 @@ def err_pch_different_branch : Error<
def err_pch_with_compiler_errors : Error<
"PCH file contains compiler errors">;
+def err_module_file_conflict : Error<
+ "module '%0' is defined in both '%1' and '%2'">, DefaultFatal;
+def err_module_file_not_found : Error<
+ "%select{PCH|module|AST}0 file '%1' not found%select{|: %3}2">, DefaultFatal;
+def err_module_file_out_of_date : Error<
+ "%select{PCH|module|AST}0 file '%1' is out of date and "
+ "needs to be rebuilt%select{|: %3}2">, DefaultFatal;
+def err_module_file_invalid : Error<
+ "file '%1' is not a valid precompiled %select{PCH|module|AST}0 file">, DefaultFatal;
+def note_module_file_imported_by : Note<
+ "imported by %select{|module '%2' in }1'%0'">;
+def err_module_file_not_module : Error<
+ "AST file '%0' was not built as a module">, DefaultFatal;
+
def err_imported_module_not_found : Error<
"module '%0' in AST file '%1' (imported by AST file '%2') "
"is not defined in any loaded module map file; "
@@ -82,9 +96,6 @@ def err_pch_pp_detailed_record : Error<
"'-detailed-preprocessing-record' but %select{precompiled header was not "
"built with it|it is not present on the command line}0">;
-def err_not_a_pch_file : Error<
- "'%0' does not appear to be a precompiled header file">, DefaultFatal;
-
def err_module_odr_violation_missing_decl : Error<
"%q0 from module '%1' is not present in definition of %q2"
"%select{ in module '%4'| provided earlier}3">, NoSFINAE;
@@ -100,6 +111,14 @@ def note_module_odr_violation_different_definitions : Note<
def err_module_odr_violation_different_instantiations : Error<
"instantiation of %q0 is different in different modules">;
+def warn_module_uses_date_time : Warning<
+ "%select{precompiled header|module}0 uses __DATE__ or __TIME__">,
+ InGroup<DiagGroup<"pch-date-time">>;
+
+def warn_duplicate_module_file_extension : Warning<
+ "duplicate module file extension block name '%0'">,
+ InGroup<ModuleFileExtension>;
+
} // let CategoryName
} // let Component
diff --git a/include/clang/Basic/FileManager.h b/include/clang/Basic/FileManager.h
index ac0d7a15e568f..17758ec3f3988 100644
--- a/include/clang/Basic/FileManager.h
+++ b/include/clang/Basic/FileManager.h
@@ -126,9 +126,9 @@ class FileManager : public RefCountedBase<FileManager> {
///
/// For each virtual file (e.g. foo/bar/baz.cpp), we add all of its parent
/// directories (foo/ and foo/bar/) here.
- SmallVector<DirectoryEntry*, 4> VirtualDirectoryEntries;
+ SmallVector<std::unique_ptr<DirectoryEntry>, 4> VirtualDirectoryEntries;
/// \brief The virtual files that we have allocated.
- SmallVector<FileEntry*, 4> VirtualFileEntries;
+ SmallVector<std::unique_ptr<FileEntry>, 4> VirtualFileEntries;
/// \brief A cache that maps paths to directory entries (either real or
/// virtual) we have looked up
@@ -218,7 +218,8 @@ public:
bool CacheFailure = true);
/// \brief Returns the current file system options
- const FileSystemOptions &getFileSystemOptions() { return FileSystemOpts; }
+ FileSystemOptions &getFileSystemOpts() { return FileSystemOpts; }
+ const FileSystemOptions &getFileSystemOpts() const { return FileSystemOpts; }
IntrusiveRefCntPtr<vfs::FileSystem> getVirtualFileSystem() const {
return FS;
@@ -254,7 +255,13 @@ public:
/// \brief If path is not absolute and FileSystemOptions set the working
/// directory, the path is modified to be relative to the given
/// working directory.
- void FixupRelativePath(SmallVectorImpl<char> &path) const;
+ /// \returns true if \c path changed.
+ bool FixupRelativePath(SmallVectorImpl<char> &path) const;
+
+ /// Makes \c Path absolute taking into account FileSystemOptions and the
+ /// working directory option.
+ /// \returns true if \c Path changed to absolute.
+ bool makeAbsolutePath(SmallVectorImpl<char> &Path) const;
/// \brief Produce an array mapping from the unique IDs assigned to each
/// file to the corresponding FileEntry pointer.
@@ -266,9 +273,6 @@ public:
static void modifyFileEntry(FileEntry *File, off_t Size,
time_t ModificationTime);
- /// \brief Remove any './' components from a path.
- static bool removeDotPaths(SmallVectorImpl<char> &Path);
-
/// \brief Retrieve the canonical name for a given directory.
///
/// This is a very expensive operation, despite its results being cached,
diff --git a/include/clang/Basic/IdentifierTable.h b/include/clang/Basic/IdentifierTable.h
index 1785e04b91ca6..d672314f56e2d 100644
--- a/include/clang/Basic/IdentifierTable.h
+++ b/include/clang/Basic/IdentifierTable.h
@@ -62,7 +62,7 @@ class IdentifierInfo {
// partially) from an AST file.
bool ChangedAfterLoad : 1; // True if identifier has changed from the
// definition loaded from an AST file.
- bool RevertedTokenID : 1; // True if RevertTokenIDToIdentifier was
+ bool RevertedTokenID : 1; // True if revertTokenIDToIdentifier was
// called.
bool OutOfDate : 1; // True if there may be additional
// information about this identifier
@@ -152,7 +152,7 @@ public:
/// tokens.
tok::TokenKind getTokenID() const { return (tok::TokenKind)TokenID; }
- /// \brief True if RevertTokenIDToIdentifier() was called.
+ /// \brief True if revertTokenIDToIdentifier() was called.
bool hasRevertedTokenIDToIdentifier() const { return RevertedTokenID; }
/// \brief Revert TokenID to tok::identifier; used for GNU libstdc++ 4.2
@@ -161,11 +161,16 @@ public:
/// TokenID is normally read-only but there are 2 instances where we revert it
/// to tok::identifier for libstdc++ 4.2. Keep track of when this happens
/// using this method so we can inform serialization about it.
- void RevertTokenIDToIdentifier() {
+ void revertTokenIDToIdentifier() {
assert(TokenID != tok::identifier && "Already at tok::identifier");
TokenID = tok::identifier;
RevertedTokenID = true;
}
+ void revertIdentifierToTokenID(tok::TokenKind TK) {
+ assert(TokenID == tok::identifier && "Should be at tok::identifier");
+ TokenID = TK;
+ RevertedTokenID = false;
+ }
/// \brief Return the preprocessor keyword ID for this identifier.
///
@@ -183,6 +188,18 @@ public:
}
void setObjCKeywordID(tok::ObjCKeywordKind ID) { ObjCOrBuiltinID = ID; }
+ /// \brief True if setNotBuiltin() was called.
+ bool hasRevertedBuiltin() const {
+ return ObjCOrBuiltinID == tok::NUM_OBJC_KEYWORDS;
+ }
+
+ /// \brief Revert the identifier to a non-builtin identifier. We do this if
+ /// the name of a known builtin library function is used to declare that
+ /// function, but an unexpected type is specified.
+ void revertBuiltin() {
+ setBuiltinID(0);
+ }
+
/// \brief Return a value indicating whether this is a builtin function.
///
/// 0 is not-built-in. 1 is builtin-for-some-nonprimary-target.
diff --git a/include/clang/Basic/LangOptions.def b/include/clang/Basic/LangOptions.def
index c184df77c37ef..fdf7e49499b82 100644
--- a/include/clang/Basic/LangOptions.def
+++ b/include/clang/Basic/LangOptions.def
@@ -90,6 +90,7 @@ LANGOPT(LineComment , 1, 0, "'//' comments")
LANGOPT(Bool , 1, 0, "bool, true, and false keywords")
LANGOPT(Half , 1, 0, "half keyword")
LANGOPT(WChar , 1, CPlusPlus, "wchar_t keyword")
+LANGOPT(DeclSpecKeyword , 1, 0, "__declspec keyword")
BENIGN_LANGOPT(DollarIdents , 1, 1, "'$' in identifiers")
BENIGN_LANGOPT(AsmPreprocessor, 1, 0, "preprocessor in asm mode")
BENIGN_LANGOPT(GNUMode , 1, 1, "GNU extensions")
@@ -117,6 +118,7 @@ LANGOPT(Freestanding, 1, 0, "freestanding implementation")
LANGOPT(NoBuiltin , 1, 0, "disable builtin functions")
LANGOPT(NoMathBuiltin , 1, 0, "disable math builtin functions")
LANGOPT(GNUAsm , 1, 1, "GNU-style inline assembly")
+LANGOPT(Coroutines , 1, 0, "C++ coroutines")
BENIGN_LANGOPT(ThreadsafeStatics , 1, 1, "thread-safe static initializers")
LANGOPT(POSIXThreads , 1, 0, "POSIX thread support")
@@ -131,7 +133,6 @@ COMPATIBLE_LANGOPT(ModulesStrictDeclUse, 1, 0, "require declaration of module us
BENIGN_LANGOPT(ModulesErrorRecovery, 1, 1, "automatically import modules as needed when performing error recovery")
BENIGN_LANGOPT(ImplicitModules, 1, 1, "build modules that are not specified via -fmodule-file")
COMPATIBLE_LANGOPT(ModulesLocalVisibility, 1, 0, "local submodule visibility")
-COMPATIBLE_LANGOPT(ModulesHideInternalLinkage, 1, 1, "hiding non-visible internal linkage declarations from redeclaration lookup")
COMPATIBLE_LANGOPT(Optimize , 1, 0, "__OPTIMIZE__ predefined macro")
COMPATIBLE_LANGOPT(OptimizeSize , 1, 0, "__OPTIMIZE_SIZE__ predefined macro")
LANGOPT(Static , 1, 0, "__STATIC__ predefined macro (as opposed to __DYNAMIC__)")
@@ -146,6 +147,7 @@ COMPATIBLE_LANGOPT(NoInlineDefine , 1, 0, "__NO_INLINE__ predefined macro")
COMPATIBLE_LANGOPT(Deprecated , 1, 0, "__DEPRECATED predefined macro")
LANGOPT(FastMath , 1, 0, "__FAST_MATH__ predefined macro")
LANGOPT(FiniteMathOnly , 1, 0, "__FINITE_MATH_ONLY__ predefined macro")
+LANGOPT(UnsafeFPMath , 1, 0, "Unsafe Floating Point Math")
BENIGN_LANGOPT(ObjCGCBitmapPrint , 1, 0, "printing of GC's bitmap layout for __weak/__strong ivars")
@@ -166,6 +168,7 @@ LANGOPT(OpenMPUseTLS , 1, 0, "Use TLS for threadprivates or runtime calls")
LANGOPT(CUDAIsDevice , 1, 0, "Compiling for CUDA device")
LANGOPT(CUDAAllowHostCallsFromHostDevice, 1, 0, "Allow host device functions to call host functions")
LANGOPT(CUDADisableTargetCallChecks, 1, 0, "Disable checks for call targets (host, device, etc.)")
+LANGOPT(CUDATargetOverloads, 1, 0, "Enable function overloads based on CUDA target attributes")
LANGOPT(AssumeSaneOperatorNew , 1, 1, "implicit __attribute__((malloc)) for C++'s new operators")
LANGOPT(SizedDeallocation , 1, 0, "enable sized deallocation functions")
@@ -188,7 +191,8 @@ LANGOPT(DefaultFPContract , 1, 0, "FP_CONTRACT")
LANGOPT(NoBitFieldTypeAlign , 1, 0, "bit-field type alignment")
LANGOPT(HexagonQdsp6Compat , 1, 0, "hexagon-qdsp6 backward compatibility")
LANGOPT(ObjCAutoRefCount , 1, 0, "Objective-C automated reference counting")
-LANGOPT(ObjCARCWeak , 1, 0, "__weak support in the ARC runtime")
+LANGOPT(ObjCWeakRuntime , 1, 0, "__weak support in the ARC runtime")
+LANGOPT(ObjCWeak , 1, 0, "Objective-C __weak in ARC and MRC files")
LANGOPT(ObjCSubscriptingLegacyRuntime , 1, 0, "Subscripting support in legacy ObjectiveC runtime")
LANGOPT(FakeAddressSpaceMap , 1, 0, "OpenCL fake address space map")
ENUM_LANGOPT(AddressSpaceMapMangling , AddrSpaceMapMangling, 2, ASMM_Target, "OpenCL address space map mangling mode")
diff --git a/include/clang/Basic/Module.h b/include/clang/Basic/Module.h
index 1bc89257d3846..1702fb1114d7f 100644
--- a/include/clang/Basic/Module.h
+++ b/include/clang/Basic/Module.h
@@ -15,6 +15,7 @@
#ifndef LLVM_CLANG_BASIC_MODULE_H
#define LLVM_CLANG_BASIC_MODULE_H
+#include "clang/Basic/FileManager.h"
#include "clang/Basic/SourceLocation.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseSet.h"
@@ -35,9 +36,6 @@ namespace llvm {
namespace clang {
-class DirectoryEntry;
-class FileEntry;
-class FileManager;
class LangOptions;
class TargetInfo;
class IdentifierInfo;
@@ -152,6 +150,9 @@ public:
/// \brief Whether this module is missing a feature from \c Requirements.
unsigned IsMissingRequirement : 1;
+ /// \brief Whether we tried and failed to load a module file for this module.
+ unsigned HasIncompatibleModuleFile : 1;
+
/// \brief Whether this module is available in the current translation unit.
///
/// If the module is missing headers or does not meet all requirements then
@@ -356,6 +357,12 @@ public:
/// its top-level module.
std::string getFullModuleName() const;
+ /// \brief Whether the full name of this module is equal to joining
+ /// \p nameParts with "."s.
+ ///
+ /// This is more efficient than getFullModuleName().
+ bool fullModuleNameIs(ArrayRef<StringRef> nameParts) const;
+
/// \brief Retrieve the top-level module for this (sub)module, which may
/// be this module.
Module *getTopLevelModule() {
@@ -469,6 +476,13 @@ public:
submodule_iterator submodule_end() { return SubModules.end(); }
submodule_const_iterator submodule_end() const { return SubModules.end(); }
+ llvm::iterator_range<submodule_iterator> submodules() {
+ return llvm::make_range(submodule_begin(), submodule_end());
+ }
+ llvm::iterator_range<submodule_const_iterator> submodules() const {
+ return llvm::make_range(submodule_begin(), submodule_end());
+ }
+
/// \brief Appends this module's list of exported modules to \p Exported.
///
/// This provides a subset of immediately imported modules (the ones that are
diff --git a/include/clang/Basic/ObjCRuntime.h b/include/clang/Basic/ObjCRuntime.h
index e33587d8f30f6..cf51b146b1dc2 100644
--- a/include/clang/Basic/ObjCRuntime.h
+++ b/include/clang/Basic/ObjCRuntime.h
@@ -41,6 +41,10 @@ public:
/// version of iOS.
iOS,
+ /// 'watchos' is a variant of iOS for Apple's watchOS. The version
+ /// is a release version of watchOS.
+ WatchOS,
+
/// 'gcc' is the Objective-C runtime shipped with GCC, implementing a
/// fragile Objective-C ABI
GCC,
@@ -81,6 +85,7 @@ public:
case GNUstep: return true;
case ObjFW: return true;
case iOS: return true;
+ case WatchOS: return true;
}
llvm_unreachable("bad kind");
}
@@ -114,6 +119,7 @@ public:
case FragileMacOSX:
case MacOSX:
case iOS:
+ case WatchOS:
return false;
case GCC:
case GNUstep:
@@ -133,9 +139,12 @@ public:
/// \brief Does this runtime allow ARC at all?
bool allowsARC() const {
switch (getKind()) {
- case FragileMacOSX: return false;
+ case FragileMacOSX:
+ // No stub library for the fragile runtime.
+ return getVersion() >= VersionTuple(10, 7);
case MacOSX: return true;
case iOS: return true;
+ case WatchOS: return true;
case GCC: return false;
case GNUstep: return true;
case ObjFW: return true;
@@ -150,9 +159,10 @@ public:
/// library.
bool hasNativeARC() const {
switch (getKind()) {
- case FragileMacOSX: return false;
+ case FragileMacOSX: return getVersion() >= VersionTuple(10, 7);
case MacOSX: return getVersion() >= VersionTuple(10, 7);
case iOS: return getVersion() >= VersionTuple(5);
+ case WatchOS: return true;
case GCC: return false;
case GNUstep: return getVersion() >= VersionTuple(1, 6);
@@ -168,6 +178,8 @@ public:
return getVersion() >= VersionTuple(10, 8);
case iOS:
return (getVersion() >= VersionTuple(6));
+ case WatchOS:
+ return true;
case GNUstep:
return getVersion() >= VersionTuple(1, 7);
@@ -197,6 +209,7 @@ public:
case FragileMacOSX: return false;
case MacOSX: return getVersion() >= VersionTuple(10, 8);
case iOS: return getVersion() >= VersionTuple(6);
+ case WatchOS: return true;
// This is really a lie, because some implementations and versions
// of the runtime do not support ARC. Probably -fgnu-runtime
@@ -224,6 +237,7 @@ public:
return true;
case MacOSX:
case iOS:
+ case WatchOS:
case GNUstep:
case ObjFW:
return false;
@@ -245,6 +259,7 @@ public:
case FragileMacOSX: return getVersion() >= VersionTuple(10, 8);
case MacOSX: return getVersion() >= VersionTuple(10, 8);
case iOS: return getVersion() >= VersionTuple(5);
+ case WatchOS: return true;
case GCC: return false;
case GNUstep: return false;
case ObjFW: return false;
@@ -257,6 +272,7 @@ public:
switch (getKind()) {
case MacOSX: return true;
case iOS: return true;
+ case WatchOS: return true;
case FragileMacOSX: return false;
case GCC: return true;
case GNUstep: return true;
@@ -270,6 +286,7 @@ public:
switch (getKind()) {
case MacOSX: return true;
case iOS: return true;
+ case WatchOS: return true;
case FragileMacOSX: return false;
case GCC: return true;
case GNUstep: return true;
@@ -283,6 +300,7 @@ public:
case FragileMacOSX:
case MacOSX:
case iOS:
+ case WatchOS:
return true;
case GNUstep:
return getVersion() >= VersionTuple(1, 7);
diff --git a/include/clang/Basic/OpenCLExtensions.def b/include/clang/Basic/OpenCLExtensions.def
index 103fa839b8dfb..91fd9195b1902 100644
--- a/include/clang/Basic/OpenCLExtensions.def
+++ b/include/clang/Basic/OpenCLExtensions.def
@@ -26,6 +26,9 @@ OPENCLEXT(cl_khr_local_int32_extended_atomics)
OPENCLEXT(cl_khr_byte_addressable_store)
OPENCLEXT(cl_khr_3d_image_writes)
+// OpenCL 2.0
+OPENCLEXT(cl_khr_gl_msaa_sharing)
+
// Clang Extensions.
OPENCLEXT(cl_clang_storage_class_specifiers)
diff --git a/include/clang/Basic/OpenMPKinds.def b/include/clang/Basic/OpenMPKinds.def
index 67a5068cc2cb7..313e1c1ac686b 100644
--- a/include/clang/Basic/OpenMPKinds.def
+++ b/include/clang/Basic/OpenMPKinds.def
@@ -57,9 +57,30 @@
#ifndef OPENMP_TARGET_CLAUSE
# define OPENMP_TARGET_CLAUSE(Name)
#endif
+#ifndef OPENMP_TARGET_DATA_CLAUSE
+# define OPENMP_TARGET_DATA_CLAUSE(Name)
+#endif
#ifndef OPENMP_TEAMS_CLAUSE
# define OPENMP_TEAMS_CLAUSE(Name)
#endif
+#ifndef OPENMP_CANCEL_CLAUSE
+# define OPENMP_CANCEL_CLAUSE(Name)
+#endif
+#ifndef OPENMP_ORDERED_CLAUSE
+# define OPENMP_ORDERED_CLAUSE(Name)
+#endif
+#ifndef OPENMP_TASKLOOP_CLAUSE
+# define OPENMP_TASKLOOP_CLAUSE(Name)
+#endif
+#ifndef OPENMP_TASKLOOP_SIMD_CLAUSE
+# define OPENMP_TASKLOOP_SIMD_CLAUSE(Name)
+#endif
+#ifndef OPENMP_CRITICAL_CLAUSE
+# define OPENMP_CRITICAL_CLAUSE(Name)
+#endif
+#ifndef OPENMP_DISTRIBUTE_CLAUSE
+#define OPENMP_DISTRIBUTE_CLAUSE(Name)
+#endif
#ifndef OPENMP_DEFAULT_KIND
# define OPENMP_DEFAULT_KIND(Name)
#endif
@@ -69,9 +90,18 @@
#ifndef OPENMP_SCHEDULE_KIND
#define OPENMP_SCHEDULE_KIND(Name)
#endif
+#ifndef OPENMP_SCHEDULE_MODIFIER
+#define OPENMP_SCHEDULE_MODIFIER(Name)
+#endif
#ifndef OPENMP_DEPEND_KIND
#define OPENMP_DEPEND_KIND(Name)
#endif
+#ifndef OPENMP_LINEAR_KIND
+#define OPENMP_LINEAR_KIND(Name)
+#endif
+#ifndef OPENMP_MAP_KIND
+#define OPENMP_MAP_KIND(Name)
+#endif
// OpenMP directives.
OPENMP_DIRECTIVE(threadprivate)
@@ -94,17 +124,22 @@ OPENMP_DIRECTIVE(atomic)
OPENMP_DIRECTIVE(target)
OPENMP_DIRECTIVE(teams)
OPENMP_DIRECTIVE(cancel)
+OPENMP_DIRECTIVE_EXT(target_data, "target data")
OPENMP_DIRECTIVE_EXT(parallel_for, "parallel for")
OPENMP_DIRECTIVE_EXT(parallel_for_simd, "parallel for simd")
OPENMP_DIRECTIVE_EXT(parallel_sections, "parallel sections")
OPENMP_DIRECTIVE_EXT(for_simd, "for simd")
OPENMP_DIRECTIVE_EXT(cancellation_point, "cancellation point")
+OPENMP_DIRECTIVE(taskloop)
+OPENMP_DIRECTIVE_EXT(taskloop_simd, "taskloop simd")
+OPENMP_DIRECTIVE(distribute)
// OpenMP clauses.
OPENMP_CLAUSE(if, OMPIfClause)
OPENMP_CLAUSE(final, OMPFinalClause)
OPENMP_CLAUSE(num_threads, OMPNumThreadsClause)
OPENMP_CLAUSE(safelen, OMPSafelenClause)
+OPENMP_CLAUSE(simdlen, OMPSimdlenClause)
OPENMP_CLAUSE(collapse, OMPCollapseClause)
OPENMP_CLAUSE(default, OMPDefaultClause)
OPENMP_CLAUSE(private, OMPPrivateClause)
@@ -129,6 +164,17 @@ OPENMP_CLAUSE(update, OMPUpdateClause)
OPENMP_CLAUSE(capture, OMPCaptureClause)
OPENMP_CLAUSE(seq_cst, OMPSeqCstClause)
OPENMP_CLAUSE(depend, OMPDependClause)
+OPENMP_CLAUSE(device, OMPDeviceClause)
+OPENMP_CLAUSE(threads, OMPThreadsClause)
+OPENMP_CLAUSE(simd, OMPSIMDClause)
+OPENMP_CLAUSE(map, OMPMapClause)
+OPENMP_CLAUSE(num_teams, OMPNumTeamsClause)
+OPENMP_CLAUSE(thread_limit, OMPThreadLimitClause)
+OPENMP_CLAUSE(priority, OMPPriorityClause)
+OPENMP_CLAUSE(grainsize, OMPGrainsizeClause)
+OPENMP_CLAUSE(nogroup, OMPNogroupClause)
+OPENMP_CLAUSE(num_tasks, OMPNumTasksClause)
+OPENMP_CLAUSE(hint, OMPHintClause)
// Clauses allowed for OpenMP directive 'parallel'.
OPENMP_PARALLEL_CLAUSE(if)
@@ -147,6 +193,7 @@ OPENMP_SIMD_CLAUSE(lastprivate)
OPENMP_SIMD_CLAUSE(linear)
OPENMP_SIMD_CLAUSE(aligned)
OPENMP_SIMD_CLAUSE(safelen)
+OPENMP_SIMD_CLAUSE(simdlen)
OPENMP_SIMD_CLAUSE(collapse)
OPENMP_SIMD_CLAUSE(reduction)
@@ -159,6 +206,7 @@ OPENMP_FOR_CLAUSE(collapse)
OPENMP_FOR_CLAUSE(schedule)
OPENMP_FOR_CLAUSE(ordered)
OPENMP_FOR_CLAUSE(nowait)
+OPENMP_FOR_CLAUSE(linear)
// Clauses allowed for directive 'omp for simd'.
OPENMP_FOR_SIMD_CLAUSE(private)
@@ -169,6 +217,7 @@ OPENMP_FOR_SIMD_CLAUSE(schedule)
OPENMP_FOR_SIMD_CLAUSE(collapse)
OPENMP_FOR_SIMD_CLAUSE(nowait)
OPENMP_FOR_SIMD_CLAUSE(safelen)
+OPENMP_FOR_SIMD_CLAUSE(simdlen)
OPENMP_FOR_SIMD_CLAUSE(linear)
OPENMP_FOR_SIMD_CLAUSE(aligned)
@@ -185,6 +234,9 @@ OPENMP_SINGLE_CLAUSE(firstprivate)
OPENMP_SINGLE_CLAUSE(copyprivate)
OPENMP_SINGLE_CLAUSE(nowait)
+// Clauses allowed for OpenMP directive 'cancel'.
+OPENMP_CANCEL_CLAUSE(if)
+
// Static attributes for 'default' clause.
OPENMP_DEFAULT_KIND(none)
OPENMP_DEFAULT_KIND(shared)
@@ -201,10 +253,22 @@ OPENMP_SCHEDULE_KIND(guided)
OPENMP_SCHEDULE_KIND(auto)
OPENMP_SCHEDULE_KIND(runtime)
+// Modifiers for 'schedule' clause.
+OPENMP_SCHEDULE_MODIFIER(monotonic)
+OPENMP_SCHEDULE_MODIFIER(nonmonotonic)
+OPENMP_SCHEDULE_MODIFIER(simd)
+
// Static attributes for 'depend' clause.
OPENMP_DEPEND_KIND(in)
OPENMP_DEPEND_KIND(out)
OPENMP_DEPEND_KIND(inout)
+OPENMP_DEPEND_KIND(source)
+OPENMP_DEPEND_KIND(sink)
+
+// Modifiers for 'linear' clause.
+OPENMP_LINEAR_KIND(val)
+OPENMP_LINEAR_KIND(ref)
+OPENMP_LINEAR_KIND(uval)
// Clauses allowed for OpenMP directive 'parallel for'.
OPENMP_PARALLEL_FOR_CLAUSE(if)
@@ -220,6 +284,7 @@ OPENMP_PARALLEL_FOR_CLAUSE(lastprivate)
OPENMP_PARALLEL_FOR_CLAUSE(collapse)
OPENMP_PARALLEL_FOR_CLAUSE(schedule)
OPENMP_PARALLEL_FOR_CLAUSE(ordered)
+OPENMP_PARALLEL_FOR_CLAUSE(linear)
// Clauses allowed for OpenMP directive 'parallel for simd'.
OPENMP_PARALLEL_FOR_SIMD_CLAUSE(if)
@@ -235,6 +300,7 @@ OPENMP_PARALLEL_FOR_SIMD_CLAUSE(lastprivate)
OPENMP_PARALLEL_FOR_SIMD_CLAUSE(collapse)
OPENMP_PARALLEL_FOR_SIMD_CLAUSE(schedule)
OPENMP_PARALLEL_FOR_SIMD_CLAUSE(safelen)
+OPENMP_PARALLEL_FOR_SIMD_CLAUSE(simdlen)
OPENMP_PARALLEL_FOR_SIMD_CLAUSE(linear)
OPENMP_PARALLEL_FOR_SIMD_CLAUSE(aligned)
@@ -260,6 +326,7 @@ OPENMP_TASK_CLAUSE(shared)
OPENMP_TASK_CLAUSE(untied)
OPENMP_TASK_CLAUSE(mergeable)
OPENMP_TASK_CLAUSE(depend)
+OPENMP_TASK_CLAUSE(priority)
// Clauses allowed for OpenMP directive 'atomic'.
OPENMP_ATOMIC_CLAUSE(read)
@@ -271,6 +338,14 @@ OPENMP_ATOMIC_CLAUSE(seq_cst)
// Clauses allowed for OpenMP directive 'target'.
// TODO More clauses for 'target' directive.
OPENMP_TARGET_CLAUSE(if)
+OPENMP_TARGET_CLAUSE(device)
+OPENMP_TARGET_CLAUSE(map)
+
+// Clauses allowed for OpenMP directive 'target data'.
+// TODO More clauses for 'target data' directive.
+OPENMP_TARGET_DATA_CLAUSE(if)
+OPENMP_TARGET_DATA_CLAUSE(device)
+OPENMP_TARGET_DATA_CLAUSE(map)
// Clauses allowed for OpenMP directive 'teams'.
// TODO More clauses for 'teams' directive.
@@ -279,14 +354,83 @@ OPENMP_TEAMS_CLAUSE(private)
OPENMP_TEAMS_CLAUSE(firstprivate)
OPENMP_TEAMS_CLAUSE(shared)
OPENMP_TEAMS_CLAUSE(reduction)
+OPENMP_TEAMS_CLAUSE(num_teams)
+OPENMP_TEAMS_CLAUSE(thread_limit)
+
+// Clauses allowed for OpenMP directive 'ordered'.
+// TODO More clauses for 'ordered' directive.
+OPENMP_ORDERED_CLAUSE(threads)
+OPENMP_ORDERED_CLAUSE(simd)
+OPENMP_ORDERED_CLAUSE(depend)
+
+// Map types and map type modifier for 'map' clause.
+OPENMP_MAP_KIND(alloc)
+OPENMP_MAP_KIND(to)
+OPENMP_MAP_KIND(from)
+OPENMP_MAP_KIND(tofrom)
+OPENMP_MAP_KIND(delete)
+OPENMP_MAP_KIND(release)
+OPENMP_MAP_KIND(always)
+// Clauses allowed for OpenMP directive 'taskloop'.
+OPENMP_TASKLOOP_CLAUSE(if)
+OPENMP_TASKLOOP_CLAUSE(shared)
+OPENMP_TASKLOOP_CLAUSE(private)
+OPENMP_TASKLOOP_CLAUSE(firstprivate)
+OPENMP_TASKLOOP_CLAUSE(lastprivate)
+OPENMP_TASKLOOP_CLAUSE(default)
+OPENMP_TASKLOOP_CLAUSE(collapse)
+OPENMP_TASKLOOP_CLAUSE(final)
+OPENMP_TASKLOOP_CLAUSE(untied)
+OPENMP_TASKLOOP_CLAUSE(mergeable)
+OPENMP_TASKLOOP_CLAUSE(priority)
+OPENMP_TASKLOOP_CLAUSE(grainsize)
+OPENMP_TASKLOOP_CLAUSE(nogroup)
+OPENMP_TASKLOOP_CLAUSE(num_tasks)
+
+// Clauses allowed for OpenMP directive 'taskloop simd'.
+OPENMP_TASKLOOP_SIMD_CLAUSE(if)
+OPENMP_TASKLOOP_SIMD_CLAUSE(shared)
+OPENMP_TASKLOOP_SIMD_CLAUSE(private)
+OPENMP_TASKLOOP_SIMD_CLAUSE(firstprivate)
+OPENMP_TASKLOOP_SIMD_CLAUSE(lastprivate)
+OPENMP_TASKLOOP_SIMD_CLAUSE(default)
+OPENMP_TASKLOOP_SIMD_CLAUSE(collapse)
+OPENMP_TASKLOOP_SIMD_CLAUSE(final)
+OPENMP_TASKLOOP_SIMD_CLAUSE(untied)
+OPENMP_TASKLOOP_SIMD_CLAUSE(mergeable)
+OPENMP_TASKLOOP_SIMD_CLAUSE(priority)
+OPENMP_TASKLOOP_SIMD_CLAUSE(linear)
+OPENMP_TASKLOOP_SIMD_CLAUSE(aligned)
+OPENMP_TASKLOOP_SIMD_CLAUSE(safelen)
+OPENMP_TASKLOOP_SIMD_CLAUSE(simdlen)
+OPENMP_TASKLOOP_SIMD_CLAUSE(grainsize)
+OPENMP_TASKLOOP_SIMD_CLAUSE(nogroup)
+OPENMP_TASKLOOP_SIMD_CLAUSE(num_tasks)
+
+// Clauses allowed for OpenMP directive 'critical'.
+OPENMP_CRITICAL_CLAUSE(hint)
+
+// Clauses allowed for OpenMP directive 'distribute'
+OPENMP_DISTRIBUTE_CLAUSE(private)
+OPENMP_DISTRIBUTE_CLAUSE(firstprivate)
+OPENMP_DISTRIBUTE_CLAUSE(lastprivate)
+OPENMP_DISTRIBUTE_CLAUSE(collapse)
+
+#undef OPENMP_TASKLOOP_SIMD_CLAUSE
+#undef OPENMP_TASKLOOP_CLAUSE
+#undef OPENMP_LINEAR_KIND
#undef OPENMP_DEPEND_KIND
+#undef OPENMP_SCHEDULE_MODIFIER
#undef OPENMP_SCHEDULE_KIND
#undef OPENMP_PROC_BIND_KIND
#undef OPENMP_DEFAULT_KIND
#undef OPENMP_DIRECTIVE
#undef OPENMP_DIRECTIVE_EXT
#undef OPENMP_CLAUSE
+#undef OPENMP_CRITICAL_CLAUSE
+#undef OPENMP_ORDERED_CLAUSE
+#undef OPENMP_CANCEL_CLAUSE
#undef OPENMP_SINGLE_CLAUSE
#undef OPENMP_SECTIONS_CLAUSE
#undef OPENMP_PARALLEL_CLAUSE
@@ -296,8 +440,10 @@ OPENMP_TEAMS_CLAUSE(reduction)
#undef OPENMP_TASK_CLAUSE
#undef OPENMP_ATOMIC_CLAUSE
#undef OPENMP_TARGET_CLAUSE
+#undef OPENMP_TARGET_DATA_CLAUSE
#undef OPENMP_TEAMS_CLAUSE
#undef OPENMP_SIMD_CLAUSE
#undef OPENMP_FOR_CLAUSE
#undef OPENMP_FOR_SIMD_CLAUSE
-
+#undef OPENMP_MAP_KIND
+#undef OPENMP_DISTRIBUTE_CLAUSE
diff --git a/include/clang/Basic/OpenMPKinds.h b/include/clang/Basic/OpenMPKinds.h
index 83939bb079a87..d4d3db80329d4 100644
--- a/include/clang/Basic/OpenMPKinds.h
+++ b/include/clang/Basic/OpenMPKinds.h
@@ -62,6 +62,15 @@ enum OpenMPScheduleClauseKind {
OMPC_SCHEDULE_unknown
};
+/// \brief OpenMP modifiers for 'schedule' clause.
+enum OpenMPScheduleClauseModifier {
+ OMPC_SCHEDULE_MODIFIER_unknown = OMPC_SCHEDULE_unknown,
+#define OPENMP_SCHEDULE_MODIFIER(Name) \
+ OMPC_SCHEDULE_MODIFIER_##Name,
+#include "clang/Basic/OpenMPKinds.def"
+ OMPC_SCHEDULE_MODIFIER_last
+};
+
/// \brief OpenMP attributes for 'depend' clause.
enum OpenMPDependClauseKind {
#define OPENMP_DEPEND_KIND(Name) \
@@ -70,6 +79,22 @@ enum OpenMPDependClauseKind {
OMPC_DEPEND_unknown
};
+/// \brief OpenMP attributes for 'linear' clause.
+enum OpenMPLinearClauseKind {
+#define OPENMP_LINEAR_KIND(Name) \
+ OMPC_LINEAR_##Name,
+#include "clang/Basic/OpenMPKinds.def"
+ OMPC_LINEAR_unknown
+};
+
+/// \brief OpenMP mapping kind for 'map' clause.
+enum OpenMPMapClauseKind {
+#define OPENMP_MAP_KIND(Name) \
+ OMPC_MAP_##Name,
+#include "clang/Basic/OpenMPKinds.def"
+ OMPC_MAP_unknown
+};
+
OpenMPDirectiveKind getOpenMPDirectiveKind(llvm::StringRef Str);
const char *getOpenMPDirectiveName(OpenMPDirectiveKind Kind);
@@ -95,12 +120,24 @@ bool isOpenMPLoopDirective(OpenMPDirectiveKind DKind);
/// otherwise - false.
bool isOpenMPWorksharingDirective(OpenMPDirectiveKind DKind);
+/// \brief Checks if the specified directive is a taskloop directive.
+/// \param DKind Specified directive.
+/// \return true - the directive is a worksharing directive like 'omp taskloop',
+/// otherwise - false.
+bool isOpenMPTaskLoopDirective(OpenMPDirectiveKind DKind);
+
/// \brief Checks if the specified directive is a parallel-kind directive.
/// \param DKind Specified directive.
/// \return true - the directive is a parallel-like directive like 'omp
/// parallel', otherwise - false.
bool isOpenMPParallelDirective(OpenMPDirectiveKind DKind);
+/// \brief Checks if the specified directive is a target-kind directive.
+/// \param DKind Specified directive.
+/// \return true - the directive is a target-like directive like 'omp target',
+/// otherwise - false.
+bool isOpenMPTargetDirective(OpenMPDirectiveKind DKind);
+
/// \brief Checks if the specified directive is a teams-kind directive.
/// \param DKind Specified directive.
/// \return true - the directive is a teams-like directive like 'omp teams',
@@ -113,6 +150,13 @@ bool isOpenMPTeamsDirective(OpenMPDirectiveKind DKind);
/// otherwise - false.
bool isOpenMPSimdDirective(OpenMPDirectiveKind DKind);
+/// \brief Checks if the specified directive is a distribute directive.
+/// \param DKind Specified directive.
+/// \return true - the directive is a distribute-directive like 'omp
+/// distribute',
+/// otherwise - false.
+bool isOpenMPDistributeDirective(OpenMPDirectiveKind DKind);
+
/// \brief Checks if the specified clause is one of private clauses like
/// 'private', 'firstprivate', 'reduction' etc..
/// \param Kind Clause kind.
diff --git a/include/clang/Basic/OperatorKinds.def b/include/clang/Basic/OperatorKinds.def
index d011e9d39ff8c..34ad7644cd2ba 100644
--- a/include/clang/Basic/OperatorKinds.def
+++ b/include/clang/Basic/OperatorKinds.def
@@ -101,6 +101,7 @@ OVERLOADED_OPERATOR_MULTI(Subscript , "[]" , false, t
// ?: can *not* be overloaded, but we need the overload
// resolution machinery for it.
OVERLOADED_OPERATOR_MULTI(Conditional , "?" , false, true , false)
+OVERLOADED_OPERATOR(Coawait , "co_await", kw_co_await , true , false, false)
#undef OVERLOADED_OPERATOR_MULTI
#undef OVERLOADED_OPERATOR
diff --git a/include/clang/Basic/PartialDiagnostic.h b/include/clang/Basic/PartialDiagnostic.h
index 84c8dd1596155..53ce95cab1b06 100644
--- a/include/clang/Basic/PartialDiagnostic.h
+++ b/include/clang/Basic/PartialDiagnostic.h
@@ -377,7 +377,7 @@ public:
}
friend inline const PartialDiagnostic &operator<<(const PartialDiagnostic &PD,
- const SourceRange &R) {
+ SourceRange R) {
PD.AddSourceRange(CharSourceRange::getTokenRange(R));
return PD;
}
diff --git a/include/clang/Basic/Sanitizers.def b/include/clang/Basic/Sanitizers.def
index 1b528c8d6f693..4b68593629109 100644
--- a/include/clang/Basic/Sanitizers.def
+++ b/include/clang/Basic/Sanitizers.def
@@ -84,11 +84,13 @@ SANITIZER("dataflow", DataFlow)
// Control Flow Integrity
SANITIZER("cfi-cast-strict", CFICastStrict)
SANITIZER("cfi-derived-cast", CFIDerivedCast)
+SANITIZER("cfi-icall", CFIICall)
SANITIZER("cfi-unrelated-cast", CFIUnrelatedCast)
SANITIZER("cfi-nvcall", CFINVCall)
SANITIZER("cfi-vcall", CFIVCall)
SANITIZER_GROUP("cfi", CFI,
- CFIDerivedCast | CFIUnrelatedCast | CFINVCall | CFIVCall)
+ CFIDerivedCast | CFIICall | CFIUnrelatedCast | CFINVCall |
+ CFIVCall)
// Safe Stack
SANITIZER("safe-stack", SafeStack)
diff --git a/include/clang/Basic/SourceLocation.h b/include/clang/Basic/SourceLocation.h
index 7aaee1df2260d..0aeba5e3f3722 100644
--- a/include/clang/Basic/SourceLocation.h
+++ b/include/clang/Basic/SourceLocation.h
@@ -43,6 +43,7 @@ class FileID {
public:
FileID() : ID(0) {}
+ bool isValid() const { return ID != 0; }
bool isInvalid() const { return ID == 0; }
bool operator==(const FileID &RHS) const { return ID == RHS.ID; }
@@ -252,7 +253,7 @@ public:
SourceLocation getBegin() const { return Range.getBegin(); }
SourceLocation getEnd() const { return Range.getEnd(); }
- const SourceRange &getAsRange() const { return Range; }
+ SourceRange getAsRange() const { return Range; }
void setBegin(SourceLocation b) { Range.setBegin(b); }
void setEnd(SourceLocation e) { Range.setEnd(e); }
diff --git a/include/clang/Basic/SourceManager.h b/include/clang/Basic/SourceManager.h
index 3aea5ea9825ec..99392a0982743 100644
--- a/include/clang/Basic/SourceManager.h
+++ b/include/clang/Basic/SourceManager.h
@@ -39,6 +39,7 @@
#include "clang/Basic/LLVM.h"
#include "clang/Basic/SourceLocation.h"
#include "llvm/ADT/ArrayRef.h"
+#include "llvm/ADT/BitVector.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/IntrusiveRefCntPtr.h"
@@ -121,7 +122,7 @@ namespace SrcMgr {
/// \brief The number of lines in this ContentCache.
///
/// This is only valid if SourceLineCache is non-null.
- unsigned NumLines : 31;
+ unsigned NumLines;
/// \brief Indicates whether the buffer itself was provided to override
/// the actual file contents.
@@ -134,12 +135,17 @@ namespace SrcMgr {
/// file considered as a system one.
unsigned IsSystemFile : 1;
+ /// \brief True if this file may be transient, that is, if it might not
+ /// exist at some later point in time when this content entry is used,
+ /// after serialization and deserialization.
+ unsigned IsTransient : 1;
+
ContentCache(const FileEntry *Ent = nullptr) : ContentCache(Ent, Ent) {}
ContentCache(const FileEntry *Ent, const FileEntry *contentEnt)
: Buffer(nullptr, false), OrigEntry(Ent), ContentsEntry(contentEnt),
SourceLineCache(nullptr), NumLines(0), BufferOverridden(false),
- IsSystemFile(false) {}
+ IsSystemFile(false), IsTransient(false) {}
~ContentCache();
@@ -148,7 +154,7 @@ namespace SrcMgr {
/// is not transferred, so this is a logical error.
ContentCache(const ContentCache &RHS)
: Buffer(nullptr, false), SourceLineCache(nullptr),
- BufferOverridden(false), IsSystemFile(false) {
+ BufferOverridden(false), IsSystemFile(false), IsTransient(false) {
OrigEntry = RHS.OrigEntry;
ContentsEntry = RHS.ContentsEntry;
@@ -388,15 +394,16 @@ namespace SrcMgr {
/// SourceManager keeps an array of these objects, and they are uniquely
/// identified by the FileID datatype.
class SLocEntry {
- unsigned Offset; // low bit is set for expansion info.
+ unsigned Offset : 31;
+ unsigned IsExpansion : 1;
union {
FileInfo File;
ExpansionInfo Expansion;
};
public:
- unsigned getOffset() const { return Offset >> 1; }
+ unsigned getOffset() const { return Offset; }
- bool isExpansion() const { return Offset & 1; }
+ bool isExpansion() const { return IsExpansion; }
bool isFile() const { return !isExpansion(); }
const FileInfo &getFile() const {
@@ -410,15 +417,19 @@ namespace SrcMgr {
}
static SLocEntry get(unsigned Offset, const FileInfo &FI) {
+ assert(!(Offset & (1 << 31)) && "Offset is too large");
SLocEntry E;
- E.Offset = Offset << 1;
+ E.Offset = Offset;
+ E.IsExpansion = false;
E.File = FI;
return E;
}
static SLocEntry get(unsigned Offset, const ExpansionInfo &Expansion) {
+ assert(!(Offset & (1 << 31)) && "Offset is too large");
SLocEntry E;
- E.Offset = (Offset << 1) | 1;
+ E.Offset = Offset;
+ E.IsExpansion = true;
E.Expansion = Expansion;
return E;
}
@@ -560,6 +571,11 @@ class SourceManager : public RefCountedBase<SourceManager> {
/// (likely to change while trying to use them). Defaults to false.
bool UserFilesAreVolatile;
+ /// \brief True if all files read during this compilation should be treated
+ /// as transient (may not be present in later compilations using a module
+ /// file created from this compilation). Defaults to false.
+ bool FilesAreTransient;
+
struct OverriddenFilesInfoTy {
/// \brief Files that have been overridden with the contents from another
/// file.
@@ -615,7 +631,7 @@ class SourceManager : public RefCountedBase<SourceManager> {
/// have already been loaded from the external source.
///
/// Same indexing as LoadedSLocEntryTable.
- std::vector<bool> SLocEntryLoaded;
+ llvm::BitVector SLocEntryLoaded;
/// \brief An external source for source location entries.
ExternalSLocEntrySource *ExternalSLocEntries;
@@ -851,6 +867,15 @@ public:
/// This should be called before parsing has begun.
void disableFileContentsOverride(const FileEntry *File);
+ /// \brief Specify that a file is transient.
+ void setFileIsTransient(const FileEntry *SourceFile);
+
+ /// \brief Specify that all files that are read during this compilation are
+ /// transient.
+ void setAllFilesAreTransient(bool Transient) {
+ FilesAreTransient = Transient;
+ }
+
//===--------------------------------------------------------------------===//
// FileID manipulation methods.
//===--------------------------------------------------------------------===//
@@ -1139,10 +1164,14 @@ public:
/// \brief Tests whether the given source location represents a macro
/// argument's expansion into the function-like macro definition.
///
+ /// \param StartLoc If non-null and function returns true, it is set to the
+ /// start location of the macro argument expansion.
+ ///
/// Such source locations only appear inside of the expansion
/// locations representing where a particular function-like macro was
/// expanded.
- bool isMacroArgExpansion(SourceLocation Loc) const;
+ bool isMacroArgExpansion(SourceLocation Loc,
+ SourceLocation *StartLoc = nullptr) const;
/// \brief Tests whether the given source location represents the expansion of
/// a macro body.
@@ -1463,6 +1492,8 @@ public:
///
void PrintStats() const;
+ void dump() const;
+
/// \brief Get the number of local SLocEntries we have.
unsigned local_sloc_entry_size() const { return LocalSLocEntryTable.size(); }
diff --git a/include/clang/Basic/Specifiers.h b/include/clang/Basic/Specifiers.h
index d95a77f88e97e..1d59d64d6bc7c 100644
--- a/include/clang/Basic/Specifiers.h
+++ b/include/clang/Basic/Specifiers.h
@@ -18,6 +18,7 @@
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/DataTypes.h"
+#include "llvm/Support/ErrorHandling.h"
namespace clang {
/// \brief Specifies the width of a type, e.g., short, long, or long long.
@@ -64,6 +65,7 @@ namespace clang {
TST_underlyingType, // __underlying_type for C++11
TST_auto, // C++11 auto
TST_decltype_auto, // C++1y decltype(auto)
+ TST_auto_type, // __auto_type extension
TST_unknown_anytype, // __unknown_anytype extension
TST_atomic, // C11 _Atomic
TST_error // erroneous type
@@ -156,6 +158,24 @@ namespace clang {
return Kind != TSK_Undeclared && Kind != TSK_ExplicitSpecialization;
}
+ /// \brief True if this template specialization kind is an explicit
+ /// specialization, explicit instantiation declaration, or explicit
+ /// instantiation definition.
+ inline bool isTemplateExplicitInstantiationOrSpecialization(
+ TemplateSpecializationKind Kind) {
+ switch (Kind) {
+ case TSK_ExplicitSpecialization:
+ case TSK_ExplicitInstantiationDeclaration:
+ case TSK_ExplicitInstantiationDefinition:
+ return true;
+
+ case TSK_Undeclared:
+ case TSK_ImplicitInstantiation:
+ return false;
+ }
+ llvm_unreachable("bad template specialization kind");
+ }
+
/// \brief Thread storage-class-specifier.
enum ThreadStorageClassSpecifier {
TSCS_unspecified,
@@ -178,7 +198,6 @@ namespace clang {
SC_PrivateExtern,
// These are only legal on variables.
- SC_OpenCLWorkGroupLocal,
SC_Auto,
SC_Register
};
diff --git a/include/clang/Basic/StmtNodes.td b/include/clang/Basic/StmtNodes.td
index 9d7b6fb0cbe2e..36519ea29c98b 100644
--- a/include/clang/Basic/StmtNodes.td
+++ b/include/clang/Basic/StmtNodes.td
@@ -48,6 +48,10 @@ def CXXCatchStmt : Stmt;
def CXXTryStmt : Stmt;
def CXXForRangeStmt : Stmt;
+// C++ Coroutines TS statements
+def CoroutineBodyStmt : Stmt;
+def CoreturnStmt : Stmt;
+
// Expressions
def Expr : Stmt<1>;
def PredefinedExpr : DStmt<Expr>;
@@ -62,6 +66,7 @@ def UnaryOperator : DStmt<Expr>;
def OffsetOfExpr : DStmt<Expr>;
def UnaryExprOrTypeTraitExpr : DStmt<Expr>;
def ArraySubscriptExpr : DStmt<Expr>;
+def OMPArraySectionExpr : DStmt<Expr>;
def CallExpr : DStmt<Expr>;
def MemberExpr : DStmt<Expr>;
def CastExpr : DStmt<Expr, 1>;
@@ -139,6 +144,11 @@ def MaterializeTemporaryExpr : DStmt<Expr>;
def LambdaExpr : DStmt<Expr>;
def CXXFoldExpr : DStmt<Expr>;
+// C++ Coroutines TS expressions
+def CoroutineSuspendExpr : DStmt<Expr, 1>;
+def CoawaitExpr : DStmt<CoroutineSuspendExpr>;
+def CoyieldExpr : DStmt<CoroutineSuspendExpr>;
+
// Obj-C Expressions.
def ObjCStringLiteral : DStmt<Expr>;
def ObjCBoxedExpr : DStmt<Expr>;
@@ -170,6 +180,7 @@ def TypoExpr : DStmt<Expr>;
// Microsoft Extensions.
def MSPropertyRefExpr : DStmt<Expr>;
+def MSPropertySubscriptExpr : DStmt<Expr>;
def CXXUuidofExpr : DStmt<Expr>;
def SEHTryStmt : Stmt;
def SEHExceptStmt : Stmt;
@@ -204,6 +215,10 @@ def OMPFlushDirective : DStmt<OMPExecutableDirective>;
def OMPOrderedDirective : DStmt<OMPExecutableDirective>;
def OMPAtomicDirective : DStmt<OMPExecutableDirective>;
def OMPTargetDirective : DStmt<OMPExecutableDirective>;
+def OMPTargetDataDirective : DStmt<OMPExecutableDirective>;
def OMPTeamsDirective : DStmt<OMPExecutableDirective>;
def OMPCancellationPointDirective : DStmt<OMPExecutableDirective>;
def OMPCancelDirective : DStmt<OMPExecutableDirective>;
+def OMPTaskLoopDirective : DStmt<OMPLoopDirective>;
+def OMPTaskLoopSimdDirective : DStmt<OMPLoopDirective>;
+def OMPDistributeDirective : DStmt<OMPLoopDirective>;
diff --git a/include/clang/Basic/TargetBuiltins.h b/include/clang/Basic/TargetBuiltins.h
index b4740c5952269..623c0b64dbf31 100644
--- a/include/clang/Basic/TargetBuiltins.h
+++ b/include/clang/Basic/TargetBuiltins.h
@@ -185,6 +185,17 @@ namespace clang {
LastTSBuiltin
};
}
+
+ /// \brief WebAssembly builtins
+ namespace WebAssembly {
+ enum {
+ LastTIBuiltin = clang::Builtin::FirstTSBuiltin-1,
+#define BUILTIN(ID, TYPE, ATTRS) BI##ID,
+#include "clang/Basic/BuiltinsWebAssembly.def"
+ LastTSBuiltin
+ };
+ }
+
} // end namespace clang.
#endif
diff --git a/include/clang/Basic/TargetCXXABI.h b/include/clang/Basic/TargetCXXABI.h
index 42a976b3afdeb..67247ead2eb44 100644
--- a/include/clang/Basic/TargetCXXABI.h
+++ b/include/clang/Basic/TargetCXXABI.h
@@ -71,6 +71,11 @@ public:
/// /help/topic/com.arm.doc.ihi0059a/IHI0059A_cppabi64.pdf
iOS64,
+ /// WatchOS is a modernisation of the iOS ABI, which roughly means it's
+ /// the iOS64 ABI ported to 32-bits. The primary difference from iOS64 is
+ /// that RTTI objects must still be unique at the moment.
+ WatchOS,
+
/// The generic AArch64 ABI is also a modified version of the Itanium ABI,
/// but it has fewer divergences than the 32-bit ARM ABI.
///
@@ -85,6 +90,21 @@ public:
/// - representation of member function pointers adjusted as in ARM.
GenericMIPS,
+ /// The WebAssembly ABI is a modified version of the Itanium ABI.
+ ///
+ /// The changes from the Itanium ABI are:
+ /// - representation of member function pointers is adjusted, as in ARM;
+ /// - member functions are not specially aligned;
+ /// - constructors and destructors return 'this', as in ARM;
+ /// - guard variables are 32-bit on wasm32, as in ARM;
+ /// - unused bits of guard variables are reserved, as in ARM;
+ /// - inline functions are never key functions, as in ARM;
+ /// - C++11 POD rules are used for tail padding, as in iOS64.
+ ///
+ /// TODO: At present the WebAssembly ABI is not considered stable, so none
+ /// of these details is necessarily final yet.
+ WebAssembly,
+
/// The Microsoft ABI is the ABI used by Microsoft Visual Studio (and
/// compatible compilers).
///
@@ -120,7 +140,9 @@ public:
case GenericARM:
case iOS:
case iOS64:
+ case WatchOS:
case GenericMIPS:
+ case WebAssembly:
return true;
case Microsoft:
@@ -137,7 +159,9 @@ public:
case GenericARM:
case iOS:
case iOS64:
+ case WatchOS:
case GenericMIPS:
+ case WebAssembly:
return false;
case Microsoft:
@@ -146,6 +170,36 @@ public:
llvm_unreachable("bad ABI kind");
}
+ /// \brief Are member functions differently aligned?
+ ///
+ /// Many Itanium-style C++ ABIs require member functions to be aligned, so
+ /// that a pointer to such a function is guaranteed to have a zero in the
+ /// least significant bit, so that pointers to member functions can use that
+ /// bit to distinguish between virtual and non-virtual functions. However,
+ /// some Itanium-style C++ ABIs differentiate between virtual and non-virtual
+ /// functions via other means, and consequently don't require that member
+ /// functions be aligned.
+ bool areMemberFunctionsAligned() const {
+ switch (getKind()) {
+ case WebAssembly:
+ // WebAssembly doesn't require any special alignment for member functions.
+ return false;
+ case GenericARM:
+ case GenericAArch64:
+ case GenericMIPS:
+ // TODO: ARM-style pointers to member functions put the discriminator in
+ // the this adjustment, so they don't require functions to have any
+ // special alignment and could therefore also return false.
+ case GenericItanium:
+ case iOS:
+ case iOS64:
+ case WatchOS:
+ case Microsoft:
+ return true;
+ }
+ llvm_unreachable("bad ABI kind");
+ }
+
/// \brief Is the default C++ member function calling convention
/// the same as the default calling convention?
bool isMemberFunctionCCDefault() const {
@@ -214,6 +268,8 @@ public:
switch (getKind()) {
case GenericARM:
case iOS64:
+ case WebAssembly:
+ case WatchOS:
return false;
case GenericAArch64:
@@ -261,7 +317,7 @@ public:
switch (getKind()) {
// To preserve binary compatibility, the generic Itanium ABI has
// permanently locked the definition of POD to the rules of C++ TR1,
- // and that trickles down to all the derived ABIs.
+ // and that trickles down to derived ABIs.
case GenericItanium:
case GenericAArch64:
case GenericARM:
@@ -269,9 +325,11 @@ public:
case GenericMIPS:
return UseTailPaddingUnlessPOD03;
- // iOS on ARM64 uses the C++11 POD rules. It does not honor the
- // Itanium exception about classes with over-large bitfields.
+ // iOS on ARM64 and WebAssembly use the C++11 POD rules. They do not honor
+ // the Itanium exception about classes with over-large bitfields.
case iOS64:
+ case WebAssembly:
+ case WatchOS:
return UseTailPaddingUnlessPOD11;
// MSVC always allocates fields in the tail-padding of a base class
@@ -282,9 +340,6 @@ public:
llvm_unreachable("bad ABI kind");
}
- /// Try to parse an ABI name, returning false on error.
- bool tryParse(llvm::StringRef name);
-
friend bool operator==(const TargetCXXABI &left, const TargetCXXABI &right) {
return left.getKind() == right.getKind();
}
diff --git a/include/clang/Basic/TargetInfo.h b/include/clang/Basic/TargetInfo.h
index 39f575f90ef8c..f1d8338170778 100644
--- a/include/clang/Basic/TargetInfo.h
+++ b/include/clang/Basic/TargetInfo.h
@@ -22,6 +22,8 @@
#include "clang/Basic/TargetOptions.h"
#include "clang/Basic/VersionTuple.h"
#include "llvm/ADT/IntrusiveRefCntPtr.h"
+#include "llvm/ADT/APInt.h"
+#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/StringSwitch.h"
@@ -72,7 +74,7 @@ protected:
unsigned short MaxVectorAlign;
unsigned short MaxTLSAlign;
unsigned short SimdDefaultAlign;
- const char *DescriptionString;
+ const char *DataLayoutString;
const char *UserLabelPrefix;
const char *MCountName;
const llvm::fltSemantics *HalfFormat, *FloatFormat, *DoubleFormat,
@@ -88,6 +90,8 @@ protected:
unsigned RealTypeUsesObjCFPRet : 3;
unsigned ComplexLongDoubleUsesFP2Ret : 1;
+ unsigned HasBuiltinMSVaList : 1;
+
// TargetInfo Constructor. Default initializes all fields.
TargetInfo(const llvm::Triple &T);
@@ -104,9 +108,9 @@ public:
virtual ~TargetInfo();
/// \brief Retrieve the target options.
- TargetOptions &getTargetOpts() const {
+ TargetOptions &getTargetOpts() const {
assert(TargetOpts && "Missing target options");
- return *TargetOpts;
+ return *TargetOpts;
}
///===---- Target Data Type Query Methods -------------------------------===//
@@ -253,10 +257,11 @@ public:
unsigned getTypeWidth(IntType T) const;
/// \brief Return integer type with specified width.
- IntType getIntTypeByWidth(unsigned BitWidth, bool IsSigned) const;
+ virtual IntType getIntTypeByWidth(unsigned BitWidth, bool IsSigned) const;
/// \brief Return the smallest integer type with at least the specified width.
- IntType getLeastIntTypeByWidth(unsigned BitWidth, bool IsSigned) const;
+ virtual IntType getLeastIntTypeByWidth(unsigned BitWidth,
+ bool IsSigned) const;
/// \brief Return floating point type with specified width.
RealType getRealTypeByWidth(unsigned BitWidth) const;
@@ -311,7 +316,9 @@ public:
unsigned getLongLongAlign() const { return LongLongAlign; }
/// \brief Determine whether the __int128 type is supported on this target.
- virtual bool hasInt128Type() const { return getPointerWidth(0) >= 64; } // FIXME
+ virtual bool hasInt128Type() const {
+ return getPointerWidth(0) >= 64;
+ } // FIXME
/// \brief Return the alignment that is suitable for storing any
/// object with a fundamental alignment requirement.
@@ -509,8 +516,7 @@ public:
/// Return information about target-specific builtins for
/// the current primary target, and info about which builtins are non-portable
/// across the current set of primary and secondary targets.
- virtual void getTargetBuiltins(const Builtin::Info *&Records,
- unsigned &NumRecords) const = 0;
+ virtual ArrayRef<Builtin::Info> getTargetBuiltins() const = 0;
/// The __builtin_clz* and __builtin_ctz* built-in
/// functions are specified to have undefined results for zero inputs, but
@@ -523,6 +529,10 @@ public:
/// with this target.
virtual BuiltinVaListKind getBuiltinVaListKind() const = 0;
+ /// Returns whether or not type \c __builtin_ms_va_list type is
+ /// available on this target.
+ bool hasBuiltinMSVaList() const { return HasBuiltinMSVaList; }
+
/// \brief Returns whether the passed in string is a valid clobber in an
/// inline asm statement.
///
@@ -556,6 +566,7 @@ public:
int Min;
int Max;
} ImmRange;
+ llvm::SmallSet<int, 4> ImmSet;
std::string ConstraintStr; // constraint: "=rm"
std::string Name; // Operand name: [foo] with no []'s.
@@ -591,8 +602,10 @@ public:
bool requiresImmediateConstant() const {
return (Flags & CI_ImmediateConstant) != 0;
}
- int getImmConstantMin() const { return ImmRange.Min; }
- int getImmConstantMax() const { return ImmRange.Max; }
+ bool isValidAsmImmediate(const llvm::APInt &Value) const {
+ return (Value.sge(ImmRange.Min) && Value.sle(ImmRange.Max)) ||
+ ImmSet.count(Value.getZExtValue()) != 0;
+ }
void setIsReadWrite() { Flags |= CI_ReadWrite; }
void setEarlyClobber() { Flags |= CI_EarlyClobber; }
@@ -604,9 +617,23 @@ public:
ImmRange.Min = Min;
ImmRange.Max = Max;
}
+ void setRequiresImmediate(llvm::ArrayRef<int> Exacts) {
+ Flags |= CI_ImmediateConstant;
+ for (int Exact : Exacts)
+ ImmSet.insert(Exact);
+ }
+ void setRequiresImmediate(int Exact) {
+ Flags |= CI_ImmediateConstant;
+ ImmSet.insert(Exact);
+ }
+ void setRequiresImmediate() {
+ Flags |= CI_ImmediateConstant;
+ ImmRange.Min = INT_MIN;
+ ImmRange.Max = INT_MAX;
+ }
/// \brief Indicate that this is an input operand that is tied to
- /// the specified output operand.
+ /// the specified output operand.
///
/// Copy over the various constraint information from the output.
void setTiedOperand(unsigned N, ConstraintInfo &Output) {
@@ -617,15 +644,24 @@ public:
}
};
- // Validate the contents of the __builtin_cpu_supports(const char*) argument.
- virtual bool validateCpuSupports(StringRef Name) const { return false; }
+ /// \brief Validate register name used for global register variables.
+ ///
+ /// This function returns true if the register passed in RegName can be used
+ /// for global register variables on this target. In addition, it returns
+ /// true in HasSizeMismatch if the size of the register doesn't match the
+ /// variable size passed in RegSize.
+ virtual bool validateGlobalRegisterVariable(StringRef RegName,
+ unsigned RegSize,
+ bool &HasSizeMismatch) const {
+ HasSizeMismatch = false;
+ return true;
+ }
// validateOutputConstraint, validateInputConstraint - Checks that
// a constraint is valid and provides information about it.
// FIXME: These should return a real error instead of just true/false.
bool validateOutputConstraint(ConstraintInfo &Info) const;
- bool validateInputConstraint(ConstraintInfo *OutputConstraints,
- unsigned NumOutputs,
+ bool validateInputConstraint(MutableArrayRef<ConstraintInfo> OutputConstraints,
ConstraintInfo &info) const;
virtual bool validateOutputSize(StringRef /*Constraint*/,
@@ -644,9 +680,13 @@ public:
std::string &/*SuggestedModifier*/) const {
return true;
}
+ virtual bool
+ validateAsmConstraint(const char *&Name,
+ TargetInfo::ConstraintInfo &info) const = 0;
+
bool resolveSymbolicName(const char *&Name,
- ConstraintInfo *OutputConstraints,
- unsigned NumOutputs, unsigned &Index) const;
+ ArrayRef<ConstraintInfo> OutputConstraints,
+ unsigned &Index) const;
// Constraint parm will be left pointing at the last character of
// the constraint. In practice, it won't be changed unless the
@@ -658,24 +698,23 @@ public:
return std::string(1, *Constraint);
}
+ /// \brief Returns a string of target-specific clobbers, in LLVM format.
+ virtual const char *getClobbers() const = 0;
+
/// \brief Returns true if NaN encoding is IEEE 754-2008.
/// Only MIPS allows a different encoding.
virtual bool isNan2008() const {
return true;
}
- /// \brief Returns a string of target-specific clobbers, in LLVM format.
- virtual const char *getClobbers() const = 0;
-
-
/// \brief Returns the target triple of the primary target.
const llvm::Triple &getTriple() const {
return Triple;
}
- const char *getTargetDescription() const {
- assert(DescriptionString);
- return DescriptionString;
+ const char *getDataLayoutString() const {
+ assert(DataLayoutString && "Uninitialized DataLayoutString!");
+ return DataLayoutString;
}
struct GCCRegAlias {
@@ -721,10 +760,13 @@ public:
/// language options which change the target configuration.
virtual void adjust(const LangOptions &Opts);
- /// \brief Get the default set of target features for the CPU;
- /// this should include all legal feature strings on the target.
- virtual void getDefaultFeatures(llvm::StringMap<bool> &Features) const {
- }
+ /// \brief Initialize the map with the default set of target features for the
+ /// CPU this should include all legal feature strings on the target.
+ ///
+ /// \return False on error (invalid features).
+ virtual bool initFeatureMap(llvm::StringMap<bool> &Features,
+ DiagnosticsEngine &Diags, StringRef CPU,
+ const std::vector<std::string> &FeatureVec) const;
/// \brief Get the ABI currently in use.
virtual StringRef getABI() const { return StringRef(); }
@@ -755,23 +797,6 @@ public:
return false;
}
- /// \brief Use this specified C++ ABI.
- ///
- /// \return False on error (invalid C++ ABI name).
- bool setCXXABI(llvm::StringRef name) {
- TargetCXXABI ABI;
- if (!ABI.tryParse(name)) return false;
- return setCXXABI(ABI);
- }
-
- /// \brief Set the C++ ABI to be used by this implementation.
- ///
- /// \return False on error (ABI not valid on this target)
- virtual bool setCXXABI(TargetCXXABI ABI) {
- TheCXXABI = ABI;
- return true;
- }
-
/// \brief Enable or disable a specific target feature;
/// the feature name must be valid.
virtual void setFeatureEnabled(llvm::StringMap<bool> &Features,
@@ -787,6 +812,8 @@ public:
///
/// The target may modify the features list, to change which options are
/// passed onwards to the backend.
+ /// FIXME: This part should be fixed so that we can change handleTargetFeatures
+ /// to merely a TargetInfo initialization routine.
///
/// \return False on error.
virtual bool handleTargetFeatures(std::vector<std::string> &Features,
@@ -798,7 +825,11 @@ public:
virtual bool hasFeature(StringRef Feature) const {
return false;
}
-
+
+ // \brief Validate the contents of the __builtin_cpu_supports(const char*)
+ // argument.
+ virtual bool validateCpuSupports(StringRef Name) const { return false; }
+
// \brief Returns maximal number of args passed in registers.
unsigned getRegParmMax() const {
assert(RegParmMax < 7 && "RegParmMax value is larger than AST can handle");
@@ -882,7 +913,7 @@ public:
};
/// \brief Determines whether a given calling convention is valid for the
- /// target. A calling convention can either be accepted, produce a warning
+ /// target. A calling convention can either be accepted, produce a warning
/// and be substituted with the default calling convention, or (someday)
/// produce an error (such as using thiscall on a non-instance function).
virtual CallingConvCheckResult checkCallingConvention(CallingConv CC) const {
@@ -910,17 +941,11 @@ protected:
virtual enum IntType getPtrDiffTypeV(unsigned AddrSpace) const {
return PtrDiffType;
}
- virtual void getGCCRegNames(const char * const *&Names,
- unsigned &NumNames) const = 0;
- virtual void getGCCRegAliases(const GCCRegAlias *&Aliases,
- unsigned &NumAliases) const = 0;
- virtual void getGCCAddlRegNames(const AddlRegName *&Addl,
- unsigned &NumAddl) const {
- Addl = nullptr;
- NumAddl = 0;
- }
- virtual bool validateAsmConstraint(const char *&Name,
- TargetInfo::ConstraintInfo &info) const= 0;
+ virtual ArrayRef<const char *> getGCCRegNames() const = 0;
+ virtual ArrayRef<GCCRegAlias> getGCCRegAliases() const = 0;
+ virtual ArrayRef<AddlRegName> getGCCAddlRegNames() const {
+ return None;
+ }
};
} // end namespace clang
diff --git a/include/clang/Basic/TokenKinds.def b/include/clang/Basic/TokenKinds.def
index 8333a4ccf8db5..9252d9947a94c 100644
--- a/include/clang/Basic/TokenKinds.def
+++ b/include/clang/Basic/TokenKinds.def
@@ -242,6 +242,8 @@ PUNCTUATOR(greatergreatergreater, ">>>")
// KEYZVECTOR - This is a keyword for the System z vector extensions,
// which are heavily based on AltiVec
// KEYBORLAND - This is a keyword if Borland extensions are enabled
+// KEYCOROUTINES - This is a keyword if support for the C++ coroutines
+// TS is enabled
// BOOLSUPPORT - This is a keyword if 'bool' is a built-in type
// HALFSUPPORT - This is a keyword if 'half' is a built-in type
// WCHARSUPPORT - This is a keyword if 'wchar_t' is a built-in type
@@ -282,7 +284,7 @@ KEYWORD(volatile , KEYALL)
KEYWORD(while , KEYALL)
KEYWORD(_Alignas , KEYALL)
KEYWORD(_Alignof , KEYALL)
-KEYWORD(_Atomic , KEYALL|KEYNOMS18|KEYNOOPENCL)
+KEYWORD(_Atomic , KEYALL|KEYNOOPENCL)
KEYWORD(_Bool , KEYNOCXX)
KEYWORD(_Complex , KEYALL)
KEYWORD(_Generic , KEYALL)
@@ -356,6 +358,11 @@ CXX11_KEYWORD(thread_local , 0)
CONCEPTS_KEYWORD(concept)
CONCEPTS_KEYWORD(requires)
+// C++ coroutines TS keywords
+KEYWORD(co_await , KEYCOROUTINES)
+KEYWORD(co_return , KEYCOROUTINES)
+KEYWORD(co_yield , KEYCOROUTINES)
+
// GNU Extensions (in impl-reserved namespace)
KEYWORD(_Decimal32 , KEYALL)
KEYWORD(_Decimal64 , KEYALL)
@@ -377,6 +384,7 @@ KEYWORD(__real , KEYALL)
KEYWORD(__thread , KEYALL)
KEYWORD(__FUNCTION__ , KEYALL)
KEYWORD(__PRETTY_FUNCTION__ , KEYALL)
+KEYWORD(__auto_type , KEYALL)
// GNU Extensions (outside impl-reserved namespace)
KEYWORD(typeof , KEYGNU)
@@ -469,8 +477,11 @@ KEYWORD(__array_extent , KEYCXX)
KEYWORD(__private_extern__ , KEYALL)
KEYWORD(__module_private__ , KEYALL)
+// Extension that will be enabled for Microsoft, Borland and PS4, but can be
+// disabled via '-fno-declspec'.
+KEYWORD(__declspec , 0)
+
// Microsoft Extension.
-KEYWORD(__declspec , KEYMS|KEYBORLAND)
KEYWORD(__cdecl , KEYALL)
KEYWORD(__stdcall , KEYALL)
KEYWORD(__fastcall , KEYALL)
diff --git a/include/clang/Basic/VirtualFileSystem.h b/include/clang/Basic/VirtualFileSystem.h
index 1c65fb5eac063..1df4947dd7e81 100644
--- a/include/clang/Basic/VirtualFileSystem.h
+++ b/include/clang/Basic/VirtualFileSystem.h
@@ -45,14 +45,18 @@ public:
public:
Status() : Type(llvm::sys::fs::file_type::status_error) {}
Status(const llvm::sys::fs::file_status &Status);
- Status(StringRef Name, StringRef RealName, llvm::sys::fs::UniqueID UID,
+ Status(StringRef Name, llvm::sys::fs::UniqueID UID,
llvm::sys::TimeValue MTime, uint32_t User, uint32_t Group,
uint64_t Size, llvm::sys::fs::file_type Type,
llvm::sys::fs::perms Perms);
+ /// Get a copy of a Status with a different name.
+ static Status copyWithNewName(const Status &In, StringRef NewName);
+ static Status copyWithNewName(const llvm::sys::fs::file_status &In,
+ StringRef NewName);
+
/// \brief Returns the name that should be used for this file or directory.
StringRef getName() const { return Name; }
- void setName(StringRef N) { Name = N; }
/// @name Status interface from llvm::sys::fs
/// @{
@@ -63,8 +67,6 @@ public:
uint32_t getUser() const { return User; }
uint32_t getGroup() const { return Group; }
uint64_t getSize() const { return Size; }
- void setType(llvm::sys::fs::file_type v) { Type = v; }
- void setPermissions(llvm::sys::fs::perms p) { Perms = p; }
/// @}
/// @name Status queries
/// These are static queries in llvm::sys::fs.
@@ -94,8 +96,6 @@ public:
bool RequiresNullTerminator = true, bool IsVolatile = false) = 0;
/// \brief Closes the file.
virtual std::error_code close() = 0;
- /// \brief Sets the name to use for this file.
- virtual void setName(StringRef Name) = 0;
};
namespace detail {
@@ -199,6 +199,28 @@ public:
/// \note The 'end' iterator is directory_iterator().
virtual directory_iterator dir_begin(const Twine &Dir,
std::error_code &EC) = 0;
+
+ /// Set the working directory. This will affect all following operations on
+ /// this file system and may propagate down for nested file systems.
+ virtual std::error_code setCurrentWorkingDirectory(const Twine &Path) = 0;
+ /// Get the working directory of this file system.
+ virtual llvm::ErrorOr<std::string> getCurrentWorkingDirectory() const = 0;
+
+ /// Check whether a file exists. Provided for convenience.
+ bool exists(const Twine &Path);
+
+ /// Make \a Path an absolute path.
+ ///
+ /// Makes \a Path absolute using the current directory if it is not already.
+ /// An empty \a Path will result in the current directory.
+ ///
+ /// /absolute/path => /absolute/path
+ /// relative/../path => <current-directory>/relative/../path
+ ///
+ /// \param Path A path that is modified to be an absolute path.
+ /// \returns success if \a path has been made absolute, otherwise a
+ /// platform-specific error_code.
+ std::error_code makeAbsolute(SmallVectorImpl<char> &Path) const;
};
/// \brief Gets an \p vfs::FileSystem for the 'real' file system, as seen by
@@ -230,6 +252,8 @@ public:
llvm::ErrorOr<std::unique_ptr<File>>
openFileForRead(const Twine &Path) override;
directory_iterator dir_begin(const Twine &Dir, std::error_code &EC) override;
+ llvm::ErrorOr<std::string> getCurrentWorkingDirectory() const override;
+ std::error_code setCurrentWorkingDirectory(const Twine &Path) override;
typedef FileSystemList::reverse_iterator iterator;
@@ -241,6 +265,46 @@ public:
iterator overlays_end() { return FSList.rend(); }
};
+namespace detail {
+class InMemoryDirectory;
+} // end namespace detail
+
+/// An in-memory file system.
+class InMemoryFileSystem : public FileSystem {
+ std::unique_ptr<detail::InMemoryDirectory> Root;
+ std::string WorkingDirectory;
+ bool UseNormalizedPaths = true;
+
+public:
+ explicit InMemoryFileSystem(bool UseNormalizedPaths = true);
+ ~InMemoryFileSystem() override;
+ /// Add a buffer to the VFS with a path. The VFS owns the buffer.
+ /// \return true if the file was successfully added, false if the file already
+ /// exists in the file system with different contents.
+ bool addFile(const Twine &Path, time_t ModificationTime,
+ std::unique_ptr<llvm::MemoryBuffer> Buffer);
+ /// Add a buffer to the VFS with a path. The VFS does not own the buffer.
+ /// \return true if the file was successfully added, false if the file already
+ /// exists in the file system with different contents.
+ bool addFileNoOwn(const Twine &Path, time_t ModificationTime,
+ llvm::MemoryBuffer *Buffer);
+ std::string toString() const;
+ /// Return true if this file system normalizes . and .. in paths.
+ bool useNormalizedPaths() const { return UseNormalizedPaths; }
+
+ llvm::ErrorOr<Status> status(const Twine &Path) override;
+ llvm::ErrorOr<std::unique_ptr<File>>
+ openFileForRead(const Twine &Path) override;
+ directory_iterator dir_begin(const Twine &Dir, std::error_code &EC) override;
+ llvm::ErrorOr<std::string> getCurrentWorkingDirectory() const override {
+ return WorkingDirectory;
+ }
+ std::error_code setCurrentWorkingDirectory(const Twine &Path) override {
+ WorkingDirectory = Path.str();
+ return std::error_code();
+ }
+};
+
/// \brief Get a globally unique ID for a virtual file or directory.
llvm::sys::fs::UniqueID getNextVirtualUniqueID();
diff --git a/include/clang/Basic/arm_neon.td b/include/clang/Basic/arm_neon.td
index c6f879513eacc..6d95c1ec157a2 100644
--- a/include/clang/Basic/arm_neon.td
+++ b/include/clang/Basic/arm_neon.td
@@ -373,6 +373,10 @@ def OP_QDMLSLHi_LN : Op<(call "vqdmlsl", $p0, (call "vget_high", $p1),
(splat $p2, $p3))>;
def OP_QDMULH_LN : Op<(call "vqdmulh", $p0, (splat $p1, $p2))>;
def OP_QRDMULH_LN : Op<(call "vqrdmulh", $p0, (splat $p1, $p2))>;
+def OP_QRDMLAH : Op<(call "vqadd", $p0, (call "vqrdmulh", $p1, $p2))>;
+def OP_QRDMLSH : Op<(call "vqsub", $p0, (call "vqrdmulh", $p1, $p2))>;
+def OP_QRDMLAH_LN : Op<(call "vqadd", $p0, (call "vqrdmulh", $p1, (splat $p2, $p3)))>;
+def OP_QRDMLSH_LN : Op<(call "vqsub", $p0, (call "vqrdmulh", $p1, (splat $p2, $p3)))>;
def OP_FMS_LN : Op<(call "vfma_lane", $p0, $p1, (op "-", $p2), $p3)>;
def OP_FMS_LNQ : Op<(call "vfma_laneq", $p0, $p1, (op "-", $p2), $p3)>;
def OP_TRN1 : Op<(shuffle $p0, $p1, (interleave (decimate mask0, 2),
@@ -414,7 +418,7 @@ def OP_XTN : Op<(call "vcombine", $p0, (call "vmovn", $p1))>;
def OP_SQXTUN : Op<(call "vcombine", (cast $p0, "U", $p0),
(call "vqmovun", $p1))>;
def OP_QXTN : Op<(call "vcombine", $p0, (call "vqmovn", $p1))>;
-def OP_VCVT_NA_HI_F16 : Op<(call "vcombine", $p0, (call "vcvt_f16", $p1))>;
+def OP_VCVT_NA_HI_F16 : Op<(call "vcombine", $p0, (call "vcvt_f16_f32", $p1))>;
def OP_VCVT_NA_HI_F32 : Op<(call "vcombine", $p0, (call "vcvt_f32_f64", $p1))>;
def OP_VCVT_EX_HI_F32 : Op<(call "vcvt_f32_f16", (call "vget_high", $p0))>;
def OP_VCVT_EX_HI_F64 : Op<(call "vcvt_f64_f32", (call "vget_high", $p0))>;
@@ -473,6 +477,11 @@ def OP_SCALAR_QDMULL_LN : ScalarMulOp<"vqdmull">;
def OP_SCALAR_QDMULH_LN : ScalarMulOp<"vqdmulh">;
def OP_SCALAR_QRDMULH_LN : ScalarMulOp<"vqrdmulh">;
+def OP_SCALAR_QRDMLAH_LN : Op<(call "vqadd", $p0, (call "vqrdmulh", $p1,
+ (call "vget_lane", $p2, $p3)))>;
+def OP_SCALAR_QRDMLSH_LN : Op<(call "vqsub", $p0, (call "vqrdmulh", $p1,
+ (call "vget_lane", $p2, $p3)))>;
+
def OP_SCALAR_HALF_GET_LN : Op<(bitcast "float16_t",
(call "vget_lane",
(bitcast "int16x4_t", $p0), $p1))>;
@@ -514,6 +523,12 @@ def VMLS : IOpInst<"vmls", "dddd", "csifUcUsUiQcQsQiQfQUcQUsQUi", OP_MLS>;
def VMLSL : SOpInst<"vmlsl", "wwdd", "csiUcUsUi", OP_MLSL>;
def VQDMULH : SInst<"vqdmulh", "ddd", "siQsQi">;
def VQRDMULH : SInst<"vqrdmulh", "ddd", "siQsQi">;
+
+let ArchGuard = "defined(__ARM_FEATURE_QRDMX)" in {
+def VQRDMLAH : SOpInst<"vqrdmlah", "dddd", "siQsQi", OP_QRDMLAH>;
+def VQRDMLSH : SOpInst<"vqrdmlsh", "dddd", "siQsQi", OP_QRDMLSH>;
+}
+
def VQDMLAL : SInst<"vqdmlal", "wwdd", "si">;
def VQDMLSL : SInst<"vqdmlsl", "wwdd", "si">;
def VMULL : SInst<"vmull", "wdd", "csiUcUsUiPc">;
@@ -687,16 +702,19 @@ def VGET_LOW : NoTestOpInst<"vget_low", "dk", "csilhfUcUsUiUlPcPs", OP_LO>;
////////////////////////////////////////////////////////////////////////////////
// E.3.22 Converting vectors
+
+def VCVT_F16_F32 : SInst<"vcvt_f16_f32", "md", "Hf">;
+def VCVT_F32_F16 : SInst<"vcvt_f32_f16", "wd", "h">;
+
def VCVT_S32 : SInst<"vcvt_s32", "xd", "fQf">;
def VCVT_U32 : SInst<"vcvt_u32", "ud", "fQf">;
-def VCVT_F16 : SInst<"vcvt_f16", "hk", "f">;
def VCVT_F32 : SInst<"vcvt_f32", "fd", "iUiQiQUi">;
-def VCVT_F32_F16 : SInst<"vcvt_f32_f16", "fd", "h">;
let isVCVT_N = 1 in {
def VCVT_N_S32 : SInst<"vcvt_n_s32", "xdi", "fQf">;
def VCVT_N_U32 : SInst<"vcvt_n_u32", "udi", "fQf">;
def VCVT_N_F32 : SInst<"vcvt_n_f32", "fdi", "iUiQiQUi">;
}
+
def VMOVN : IInst<"vmovn", "hk", "silUsUiUl">;
def VMOVL : SInst<"vmovl", "wd", "csiUcUsUi">;
def VQMOVN : SInst<"vqmovn", "hk", "silUsUiUl">;
@@ -738,6 +756,12 @@ def VQDMULH_N : SInst<"vqdmulh_n", "dda", "siQsQi">;
def VQDMULH_LANE : SOpInst<"vqdmulh_lane", "ddgi", "siQsQi", OP_QDMULH_LN>;
def VQRDMULH_N : SInst<"vqrdmulh_n", "dda", "siQsQi">;
def VQRDMULH_LANE : SOpInst<"vqrdmulh_lane", "ddgi", "siQsQi", OP_QRDMULH_LN>;
+
+let ArchGuard = "defined(__ARM_FEATURE_QRDMX)" in {
+def VQRDMLAH_LANE : SOpInst<"vqrdmlah_lane", "dddgi", "siQsQi", OP_QRDMLAH_LN>;
+def VQRDMLSH_LANE : SOpInst<"vqrdmlsh_lane", "dddgi", "siQsQi", OP_QRDMLSH_LN>;
+}
+
def VMLA_N : IOpInst<"vmla_n", "ddda", "siUsUifQsQiQUsQUiQf", OP_MLA_N>;
def VMLAL_N : SOpInst<"vmlal_n", "wwda", "siUsUi", OP_MLAL_N>;
def VQDMLAL_N : SInst<"vqdmlal_n", "wwda", "si">;
@@ -923,6 +947,9 @@ def USQADD : SInst<"vsqadd", "ddd", "UcUsUiUlQUcQUsQUiQUl">;
// Reciprocal/Sqrt
def FRECPS : IInst<"vrecps", "ddd", "dQd">;
def FRSQRTS : IInst<"vrsqrts", "ddd", "dQd">;
+def FRECPE : SInst<"vrecpe", "dd", "dQd">;
+def FRSQRTE : SInst<"vrsqrte", "dd", "dQd">;
+def FSQRT : SInst<"vsqrt", "dd", "fdQfQd">;
////////////////////////////////////////////////////////////////////////////////
// bitwise reverse
@@ -942,20 +969,21 @@ def QXTN2 : SOpInst<"vqmovn_high", "qhk", "silUsUiUl", OP_QXTN>;
////////////////////////////////////////////////////////////////////////////////
// Converting vectors
-def VCVT_HIGH_F16 : SOpInst<"vcvt_high_f16", "qhj", "f", OP_VCVT_NA_HI_F16>;
-def VCVT_HIGH_F32_F16 : SOpInst<"vcvt_high_f32", "wk", "h", OP_VCVT_EX_HI_F32>;
+
def VCVT_F32_F64 : SInst<"vcvt_f32_f64", "md", "Qd">;
-def VCVT_HIGH_F32_F64 : SOpInst<"vcvt_high_f32", "qfj", "d", OP_VCVT_NA_HI_F32>;
def VCVT_F64_F32 : SInst<"vcvt_f64_f32", "wd", "f">;
+
+def VCVT_S64 : SInst<"vcvt_s64", "xd", "dQd">;
+def VCVT_U64 : SInst<"vcvt_u64", "ud", "dQd">;
def VCVT_F64 : SInst<"vcvt_f64", "Fd", "lUlQlQUl">;
+
+def VCVT_HIGH_F16_F32 : SOpInst<"vcvt_high_f16", "hmj", "Hf", OP_VCVT_NA_HI_F16>;
+def VCVT_HIGH_F32_F16 : SOpInst<"vcvt_high_f32", "wk", "h", OP_VCVT_EX_HI_F32>;
+def VCVT_HIGH_F32_F64 : SOpInst<"vcvt_high_f32", "qfj", "d", OP_VCVT_NA_HI_F32>;
def VCVT_HIGH_F64_F32 : SOpInst<"vcvt_high_f64", "wj", "f", OP_VCVT_EX_HI_F64>;
-def VCVTX_F32_F64 : SInst<"vcvtx_f32", "fj", "d">;
+
+def VCVTX_F32_F64 : SInst<"vcvtx_f32", "fj", "d">;
def VCVTX_HIGH_F32_F64 : SOpInst<"vcvtx_high_f32", "qfj", "d", OP_VCVTX_HI>;
-def VCVT_S64 : SInst<"vcvt_s64", "xd", "dQd">;
-def VCVT_U64 : SInst<"vcvt_u64", "ud", "dQd">;
-def FRECPE : SInst<"vrecpe", "dd", "dQd">;
-def FRSQRTE : SInst<"vrsqrte", "dd", "dQd">;
-def FSQRT : SInst<"vsqrt", "dd", "fdQfQd">;
////////////////////////////////////////////////////////////////////////////////
// Comparison
@@ -1153,6 +1181,11 @@ def VQDMULL_HIGH_LANEQ : SOpInst<"vqdmull_high_laneq", "wkki", "si",
def VQDMULH_LANEQ : SOpInst<"vqdmulh_laneq", "ddji", "siQsQi", OP_QDMULH_LN>;
def VQRDMULH_LANEQ : SOpInst<"vqrdmulh_laneq", "ddji", "siQsQi", OP_QRDMULH_LN>;
+let ArchGuard = "defined(__ARM_FEATURE_QRDMX) && defined(__aarch64__)" in {
+def VQRDMLAH_LANEQ : SOpInst<"vqrdmlah_laneq", "dddji", "siQsQi", OP_QRDMLAH_LN>;
+def VQRDMLSH_LANEQ : SOpInst<"vqrdmlsh_laneq", "dddji", "siQsQi", OP_QRDMLSH_LN>;
+}
+
// Note: d type implemented by SCALAR_VMULX_LANE
def VMULX_LANE : IOpInst<"vmulx_lane", "ddgi", "fQfQd", OP_MULX_LN>;
// Note: d type is implemented by SCALAR_VMULX_LANEQ
@@ -1398,6 +1431,16 @@ def SCALAR_SQDMULH : SInst<"vqdmulh", "sss", "SsSi">;
// Scalar Integer Saturating Rounding Doubling Multiply Half High
def SCALAR_SQRDMULH : SInst<"vqrdmulh", "sss", "SsSi">;
+let ArchGuard = "defined(__ARM_FEATURE_QRDMX) && defined(__aarch64__)" in {
+////////////////////////////////////////////////////////////////////////////////
+// Signed Saturating Rounding Doubling Multiply Accumulate Returning High Half
+def SCALAR_SQRDMLAH : SOpInst<"vqrdmlah", "ssss", "SsSi", OP_QRDMLAH>;
+
+////////////////////////////////////////////////////////////////////////////////
+// Signed Saturating Rounding Doubling Multiply Subtract Returning High Half
+def SCALAR_SQRDMLSH : SOpInst<"vqrdmlsh", "ssss", "SsSi", OP_QRDMLSH>;
+}
+
////////////////////////////////////////////////////////////////////////////////
// Scalar Floating-point Multiply Extended
def SCALAR_FMULX : IInst<"vmulx", "sss", "SfSd">;
@@ -1599,6 +1642,16 @@ def SCALAR_SQDMULH_LANEQ : SOpInst<"vqdmulh_laneq", "ssji", "SsSi", OP_SCALAR_QD
def SCALAR_SQRDMULH_LANE : SOpInst<"vqrdmulh_lane", "ssdi", "SsSi", OP_SCALAR_QRDMULH_LN>;
def SCALAR_SQRDMULH_LANEQ : SOpInst<"vqrdmulh_laneq", "ssji", "SsSi", OP_SCALAR_QRDMULH_LN>;
+let ArchGuard = "defined(__ARM_FEATURE_QRDMX) && defined(__aarch64__)" in {
+// Signed Saturating Rounding Doubling Multiply Accumulate Returning High Half
+def SCALAR_SQRDMLAH_LANE : SOpInst<"vqrdmlah_lane", "sssdi", "SsSi", OP_SCALAR_QRDMLAH_LN>;
+def SCALAR_SQRDMLAH_LANEQ : SOpInst<"vqrdmlah_laneq", "sssji", "SsSi", OP_SCALAR_QRDMLAH_LN>;
+
+// Signed Saturating Rounding Doubling Multiply Subtract Returning High Half
+def SCALAR_SQRDMLSH_LANE : SOpInst<"vqrdmlsh_lane", "sssdi", "SsSi", OP_SCALAR_QRDMLSH_LN>;
+def SCALAR_SQRDMLSH_LANEQ : SOpInst<"vqrdmlsh_laneq", "sssji", "SsSi", OP_SCALAR_QRDMLSH_LN>;
+}
+
def SCALAR_VDUP_LANE : IInst<"vdup_lane", "sdi", "ScSsSiSlSfSdSUcSUsSUiSUlSPcSPs">;
def SCALAR_VDUP_LANEQ : IInst<"vdup_laneq", "sji", "ScSsSiSlSfSdSUcSUsSUiSUlSPcSPs">;
}