30 if (BuiltinID == AArch64::BI__builtin_arm_irg) {
31 if (
SemaRef.checkArgCount(TheCall, 2))
41 return Diag(TheCall->
getBeginLoc(), diag::err_memtag_arg_must_be_pointer)
46 Context, Context.getIntTypeForBitwidth(64,
false),
49 SemaRef.PerformCopyInitialization(Entity,
60 if (BuiltinID == AArch64::BI__builtin_arm_addg) {
61 if (
SemaRef.checkArgCount(TheCall, 2))
70 return Diag(TheCall->
getBeginLoc(), diag::err_memtag_arg_must_be_pointer)
78 return SemaRef.BuiltinConstantArgRange(TheCall, 1, 0, 15);
81 if (BuiltinID == AArch64::BI__builtin_arm_gmi) {
82 if (
SemaRef.checkArgCount(TheCall, 2))
92 return Diag(TheCall->
getBeginLoc(), diag::err_memtag_arg_must_be_pointer)
97 Context, Context.getIntTypeForBitwidth(64,
false),
100 SemaRef.PerformCopyInitialization(Entity,
109 if (BuiltinID == AArch64::BI__builtin_arm_ldg ||
110 BuiltinID == AArch64::BI__builtin_arm_stg) {
111 if (
SemaRef.checkArgCount(TheCall, 1))
120 return Diag(TheCall->
getBeginLoc(), diag::err_memtag_arg_must_be_pointer)
125 if (BuiltinID == AArch64::BI__builtin_arm_ldg)
126 TheCall->
setType(FirstArgType);
130 if (BuiltinID == AArch64::BI__builtin_arm_subp) {
143 auto isNull = [&](
Expr *E) ->
bool {
144 return E->isNullPointerConstant(Context,
150 return Diag(TheCall->
getBeginLoc(), diag::err_memtag_arg_null_or_pointer)
154 return Diag(TheCall->
getBeginLoc(), diag::err_memtag_arg_null_or_pointer)
162 if (!Context.typesAreCompatible(
163 Context.getCanonicalType(pointeeA).getUnqualifiedType(),
164 Context.getCanonicalType(pointeeB).getUnqualifiedType())) {
166 diag::err_typecheck_sub_ptr_compatible)
179 SemaRef.ImpCastExprToType(ArgExprA.
get(), ArgTypeB, CK_NullToPointer);
183 SemaRef.ImpCastExprToType(ArgExprB.
get(), ArgTypeA, CK_NullToPointer);
189 assert(
false &&
"Unhandled ARM MTE intrinsic");
196 int ArgNum,
unsigned ExpectedFieldNum,
198 bool IsARMBuiltin = BuiltinID == ARM::BI__builtin_arm_rsr64 ||
199 BuiltinID == ARM::BI__builtin_arm_wsr64 ||
200 BuiltinID == ARM::BI__builtin_arm_rsr ||
201 BuiltinID == ARM::BI__builtin_arm_rsrp ||
202 BuiltinID == ARM::BI__builtin_arm_wsr ||
203 BuiltinID == ARM::BI__builtin_arm_wsrp;
204 bool IsAArch64Builtin = BuiltinID == AArch64::BI__builtin_arm_rsr64 ||
205 BuiltinID == AArch64::BI__builtin_arm_wsr64 ||
206 BuiltinID == AArch64::BI__builtin_arm_rsr128 ||
207 BuiltinID == AArch64::BI__builtin_arm_wsr128 ||
208 BuiltinID == AArch64::BI__builtin_arm_rsr ||
209 BuiltinID == AArch64::BI__builtin_arm_rsrp ||
210 BuiltinID == AArch64::BI__builtin_arm_wsr ||
211 BuiltinID == AArch64::BI__builtin_arm_wsrp;
212 assert((IsARMBuiltin || IsAArch64Builtin) &&
"Unexpected ARM builtin.");
227 Reg.split(Fields,
":");
229 if (Fields.size() != ExpectedFieldNum && !(AllowName && Fields.size() == 1))
237 if (Fields.size() > 1) {
238 bool FiveFields = Fields.size() == 5;
240 bool ValidString =
true;
242 ValidString &= Fields[0].starts_with_insensitive(
"cp") ||
243 Fields[0].starts_with_insensitive(
"p");
245 Fields[0] = Fields[0].drop_front(
246 Fields[0].starts_with_insensitive(
"cp") ? 2 : 1);
248 ValidString &= Fields[2].starts_with_insensitive(
"c");
250 Fields[2] = Fields[2].drop_front(1);
253 ValidString &= Fields[3].starts_with_insensitive(
"c");
255 Fields[3] = Fields[3].drop_front(1);
261 FieldBitWidths.append({IsAArch64Builtin ? 2 : 4, 3, 4, 4, 3});
263 FieldBitWidths.append({4, 3, 4});
265 for (
unsigned i = 0; i < Fields.size(); ++i) {
267 ValidString &= !Fields[i].getAsInteger(10, IntField);
268 ValidString &= (IntField >= 0 && IntField < (1 << FieldBitWidths[i]));
274 }
else if (IsAArch64Builtin && Fields.size() == 1) {
282 if (BuiltinID == AArch64::BI__builtin_arm_rsr128 ||
283 BuiltinID == AArch64::BI__builtin_arm_wsr128)
288 auto MaxLimit = llvm::StringSwitch<std::optional<unsigned>>(Reg)
289 .CaseLower(
"spsel", 15)
290 .CaseLower(
"daifclr", 15)
291 .CaseLower(
"daifset", 15)
292 .CaseLower(
"pan", 15)
293 .CaseLower(
"uao", 15)
294 .CaseLower(
"dit", 15)
295 .CaseLower(
"ssbs", 15)
296 .CaseLower(
"tco", 15)
297 .CaseLower(
"allint", 1)
299 .Default(std::nullopt);
319 return SemaRef.BuiltinConstantArgRange(TheCall, 1, 0, *MaxLimit);
329 bool IsPolyUnsigned,
bool IsInt64Long) {
332 return Flags.
isUnsigned() ? Context.UnsignedCharTy : Context.SignedCharTy;
334 return Flags.
isUnsigned() ? Context.UnsignedShortTy : Context.ShortTy;
336 return Flags.
isUnsigned() ? Context.UnsignedIntTy : Context.IntTy;
339 return Flags.
isUnsigned() ? Context.UnsignedLongTy : Context.LongTy;
341 return Flags.
isUnsigned() ? Context.UnsignedLongLongTy
342 : Context.LongLongTy;
344 return IsPolyUnsigned ? Context.UnsignedCharTy : Context.SignedCharTy;
346 return IsPolyUnsigned ? Context.UnsignedShortTy : Context.ShortTy;
349 return Context.UnsignedLongTy;
351 return Context.UnsignedLongLongTy;
355 return Context.HalfTy;
357 return Context.FloatTy;
359 return Context.DoubleTy;
361 return Context.BFloat16Ty;
363 return Context.MFloat8Ty;
365 llvm_unreachable(
"Invalid NeonTypeFlag!");
383 unsigned ArgIdx,
unsigned EltBitWidth,
384 unsigned ContainerBitWidth) {
387 auto CheckImmediateInSet = [&](std::initializer_list<int64_t>
Set,
388 int ErrDiag) ->
bool {
396 if (
SemaRef.BuiltinConstantArg(TheCall, ArgIdx, Imm))
399 if (!llvm::is_contained(
Set, Imm.getSExtValue()))
405 case ImmCheckType::ImmCheck0_31:
406 if (
SemaRef.BuiltinConstantArgRange(TheCall, ArgIdx, 0, 31))
409 case ImmCheckType::ImmCheck0_13:
410 if (
SemaRef.BuiltinConstantArgRange(TheCall, ArgIdx, 0, 13))
413 case ImmCheckType::ImmCheck0_63:
414 if (
SemaRef.BuiltinConstantArgRange(TheCall, ArgIdx, 0, 63))
417 case ImmCheckType::ImmCheck1_16:
418 if (
SemaRef.BuiltinConstantArgRange(TheCall, ArgIdx, 1, 16))
421 case ImmCheckType::ImmCheck0_7:
422 if (
SemaRef.BuiltinConstantArgRange(TheCall, ArgIdx, 0, 7))
425 case ImmCheckType::ImmCheck1_1:
426 if (
SemaRef.BuiltinConstantArgRange(TheCall, ArgIdx, 1, 1))
429 case ImmCheckType::ImmCheck1_3:
430 if (
SemaRef.BuiltinConstantArgRange(TheCall, ArgIdx, 1, 3))
433 case ImmCheckType::ImmCheck1_7:
434 if (
SemaRef.BuiltinConstantArgRange(TheCall, ArgIdx, 1, 7))
437 case ImmCheckType::ImmCheckExtract:
438 if (
SemaRef.BuiltinConstantArgRange(TheCall, ArgIdx, 0,
439 (2048 / EltBitWidth) - 1))
442 case ImmCheckType::ImmCheckCvt:
443 case ImmCheckType::ImmCheckShiftRight:
444 if (
SemaRef.BuiltinConstantArgRange(TheCall, ArgIdx, 1, EltBitWidth))
447 case ImmCheckType::ImmCheckShiftRightNarrow:
448 if (
SemaRef.BuiltinConstantArgRange(TheCall, ArgIdx, 1, EltBitWidth / 2))
451 case ImmCheckType::ImmCheckShiftLeft:
452 if (
SemaRef.BuiltinConstantArgRange(TheCall, ArgIdx, 0, EltBitWidth - 1))
455 case ImmCheckType::ImmCheckLaneIndex:
456 if (
SemaRef.BuiltinConstantArgRange(TheCall, ArgIdx, 0,
457 (ContainerBitWidth / EltBitWidth) - 1))
460 case ImmCheckType::ImmCheckLaneIndexCompRotate:
461 if (
SemaRef.BuiltinConstantArgRange(
462 TheCall, ArgIdx, 0, (ContainerBitWidth / (2 * EltBitWidth)) - 1))
465 case ImmCheckType::ImmCheckLaneIndexDot:
466 if (
SemaRef.BuiltinConstantArgRange(
467 TheCall, ArgIdx, 0, (ContainerBitWidth / (4 * EltBitWidth)) - 1))
470 case ImmCheckType::ImmCheckComplexRot90_270:
471 if (CheckImmediateInSet({90, 270}, diag::err_rotation_argument_to_cadd))
474 case ImmCheckType::ImmCheckComplexRotAll90:
475 if (CheckImmediateInSet({0, 90, 180, 270},
476 diag::err_rotation_argument_to_cmla))
479 case ImmCheckType::ImmCheck0_1:
480 if (
SemaRef.BuiltinConstantArgRange(TheCall, ArgIdx, 0, 1))
483 case ImmCheckType::ImmCheck0_2:
484 if (
SemaRef.BuiltinConstantArgRange(TheCall, ArgIdx, 0, 2))
487 case ImmCheckType::ImmCheck0_3:
488 if (
SemaRef.BuiltinConstantArgRange(TheCall, ArgIdx, 0, 3))
491 case ImmCheckType::ImmCheck0_0:
492 if (
SemaRef.BuiltinConstantArgRange(TheCall, ArgIdx, 0, 0))
495 case ImmCheckType::ImmCheck0_15:
496 if (
SemaRef.BuiltinConstantArgRange(TheCall, ArgIdx, 0, 15))
499 case ImmCheckType::ImmCheck0_255:
500 if (
SemaRef.BuiltinConstantArgRange(TheCall, ArgIdx, 0, 255))
503 case ImmCheckType::ImmCheck1_32:
504 if (
SemaRef.BuiltinConstantArgRange(TheCall, ArgIdx, 1, 32))
507 case ImmCheckType::ImmCheck1_64:
508 if (
SemaRef.BuiltinConstantArgRange(TheCall, ArgIdx, 1, 64))
511 case ImmCheckType::ImmCheck2_4_Mul2:
512 if (
SemaRef.BuiltinConstantArgRange(TheCall, ArgIdx, 2, 4) ||
513 SemaRef.BuiltinConstantArgMultiple(TheCall, ArgIdx, 2))
524 bool HasError =
false;
526 for (
const auto &I : ImmChecks) {
527 auto [ArgIdx, CheckTy, ElementBitWidth, VecBitWidth] = I;
529 if (OverloadType >= 0)
541 bool HasError =
false;
543 for (
const auto &I : ImmChecks) {
544 auto [ArgIdx, CheckTy, ElementBitWidth] = I;
553 if (FD->
hasAttr<ArmLocallyStreamingAttr>())
557 if (FPT->getAArch64SMEAttributes() &
560 if (FPT->getAArch64SMEAttributes() &
571 unsigned BuiltinID) {
579 llvm::StringMap<bool> CallerFeatures;
586 const auto FindTopLevelPipe = [](
const char *S) {
588 unsigned I = 0, E = strlen(S);
590 if (S[I] ==
'|' && Depth == 0)
594 else if (S[I] ==
')')
600 const char *RequiredFeatures =
602 unsigned PipeIdx = FindTopLevelPipe(RequiredFeatures);
603 assert(PipeIdx != 0 && PipeIdx != strlen(RequiredFeatures) &&
604 "Expected feature string of the form 'SVE-EXPR|SME-EXPR'");
605 StringRef NonStreamingBuiltinGuard = StringRef(RequiredFeatures, PipeIdx);
606 StringRef StreamingBuiltinGuard = StringRef(RequiredFeatures + PipeIdx + 1);
609 NonStreamingBuiltinGuard, CallerFeatures);
611 StreamingBuiltinGuard, CallerFeatures);
613 if (SatisfiesSVE && SatisfiesSME)
616 else if (SatisfiesSVE)
618 else if (SatisfiesSME)
627 S.
Diag(TheCall->
getBeginLoc(), diag::err_attribute_arm_sm_incompat_builtin)
631 S.
Diag(TheCall->
getBeginLoc(), diag::err_attribute_arm_sm_incompat_builtin)
643#define GET_SME_BUILTIN_GET_STATE
644#include "clang/Basic/arm_sme_builtins_za_state.inc"
645#undef GET_SME_BUILTIN_GET_STATE
652 SemaRef.getCurFunctionDecl(
true)) {
656#define GET_SME_STREAMING_ATTRS
657#include "clang/Basic/arm_sme_streaming_attrs.inc"
658#undef GET_SME_STREAMING_ATTRS
667 diag::warn_attribute_arm_za_builtin_no_za_state)
672 diag::warn_attribute_arm_zt0_builtin_no_zt0_state)
682#define GET_SME_IMMEDIATE_CHECK
683#include "clang/Basic/arm_sme_sema_rangechecks.inc"
684#undef GET_SME_IMMEDIATE_CHECK
693 SemaRef.getCurFunctionDecl(
true)) {
697#define GET_SVE_STREAMING_ATTRS
698#include "clang/Basic/arm_sve_streaming_attrs.inc"
699#undef GET_SVE_STREAMING_ATTRS
711#define GET_SVE_IMMEDIATE_CHECK
712#include "clang/Basic/arm_sve_sema_rangechecks.inc"
713#undef GET_SVE_IMMEDIATE_CHECK
723 SemaRef.getCurFunctionDecl(
true)) {
729#define GET_NEON_STREAMING_COMPAT_FLAG
730#include "clang/Basic/arm_neon.inc"
731#undef GET_NEON_STREAMING_COMPAT_FLAG
742 bool HasConstPtr =
false;
744#define GET_NEON_OVERLOAD_CHECK
745#include "clang/Basic/arm_fp16.inc"
746#include "clang/Basic/arm_neon.inc"
747#undef GET_NEON_OVERLOAD_CHECK
759 TV =
Result.getLimitedValue(64);
760 if ((TV > 63) || (mask & (1ULL << TV)) == 0)
765 if (PtrArgNum >= 0) {
769 Arg = ICE->getSubExpr();
774 bool IsPolyUnsigned =
Arch == llvm::Triple::aarch64 ||
775 Arch == llvm::Triple::aarch64_32 ||
776 Arch == llvm::Triple::aarch64_be;
779 IsPolyUnsigned, IsInt64Long);
784 ConvTy =
SemaRef.CheckSingleAssignmentConstraints(LHSTy, RHS);
799#define GET_NEON_IMMEDIATE_CHECK
800#include "clang/Basic/arm_fp16.inc"
801#include "clang/Basic/arm_neon.inc"
802#undef GET_NEON_IMMEDIATE_CHECK
813#include "clang/Basic/arm_mve_builtin_sema.inc"
824#include "clang/Basic/arm_cde_builtin_sema.inc"
834 const Expr *CoprocArg,
837 if (
SemaRef.isConstantEvaluatedContext())
845 int64_t CoprocNo = CoprocNoAP.getExtValue();
846 assert(CoprocNo >= 0 &&
"Coprocessor immediate must be non-negative");
849 bool IsCDECoproc = CoprocNo <= 7 && (CDECoprocMask & (1 << CoprocNo));
851 if (IsCDECoproc != WantCDE)
861 assert((BuiltinID == ARM::BI__builtin_arm_ldrex ||
862 BuiltinID == ARM::BI__builtin_arm_ldrexd ||
863 BuiltinID == ARM::BI__builtin_arm_ldaex ||
864 BuiltinID == ARM::BI__builtin_arm_strex ||
865 BuiltinID == ARM::BI__builtin_arm_strexd ||
866 BuiltinID == ARM::BI__builtin_arm_stlex ||
867 BuiltinID == AArch64::BI__builtin_arm_ldrex ||
868 BuiltinID == AArch64::BI__builtin_arm_ldaex ||
869 BuiltinID == AArch64::BI__builtin_arm_strex ||
870 BuiltinID == AArch64::BI__builtin_arm_stlex) &&
871 "unexpected ARM builtin");
872 bool IsLdrex = BuiltinID == ARM::BI__builtin_arm_ldrex ||
873 BuiltinID == ARM::BI__builtin_arm_ldrexd ||
874 BuiltinID == ARM::BI__builtin_arm_ldaex ||
875 BuiltinID == AArch64::BI__builtin_arm_ldrex ||
876 BuiltinID == AArch64::BI__builtin_arm_ldaex;
877 bool IsDoubleWord = BuiltinID == ARM::BI__builtin_arm_ldrexd ||
878 BuiltinID == ARM::BI__builtin_arm_strexd;
885 if (
SemaRef.checkArgCount(TheCall, IsLdrex ? 1 : 2))
892 Expr *PointerArg = TheCall->
getArg(IsLdrex ? 0 : 1);
894 SemaRef.DefaultFunctionArrayLvalueConversion(PointerArg);
897 PointerArg = PointerArgRes.
get();
917 CastNeeded = CK_BitCast;
918 Diag(DRE->
getBeginLoc(), diag::ext_typecheck_convert_discards_qualifiers)
919 << PointerArg->
getType() << Context.getPointerType(AddrType)
924 AddrType = Context.getPointerType(AddrType);
925 PointerArgRes =
SemaRef.ImpCastExprToType(PointerArg, AddrType, CastNeeded);
928 PointerArg = PointerArgRes.
get();
930 TheCall->
setArg(IsLdrex ? 0 : 1, PointerArg);
935 Diag(DRE->
getBeginLoc(), diag::err_atomic_builtin_must_be_pointer_intfltptr)
944 unsigned Bits = Context.getTypeSize(ValType);
951 (llvm::isPowerOf2_64(Bits)) && Bits >= 8 && (Mask & (Bits / 8));
961 diag::err_atomic_exclusive_builtin_pointer_size)
963 bool Started =
false;
964 for (
unsigned Size = 1; Size <= 8; Size <<= 1) {
971 if (!(Mask & Size)) {
990 bool EmitDoubleWordDiagnostic =
993 diag::err_atomic_exclusive_builtin_pointer_size_none)
994 << (EmitDoubleWordDiagnostic ? 1 : 0)
1022 Context, ValType,
false);
1030 TheCall->
setType(Context.IntTy);
1037 if (BuiltinID == ARM::BI__builtin_arm_ldrex ||
1038 BuiltinID == ARM::BI__builtin_arm_ldrexd ||
1039 BuiltinID == ARM::BI__builtin_arm_ldaex ||
1040 BuiltinID == ARM::BI__builtin_arm_strex ||
1041 BuiltinID == ARM::BI__builtin_arm_strexd ||
1042 BuiltinID == ARM::BI__builtin_arm_stlex) {
1046 if (BuiltinID == ARM::BI__builtin_arm_prefetch) {
1047 return SemaRef.BuiltinConstantArgRange(TheCall, 1, 0, 1) ||
1048 SemaRef.BuiltinConstantArgRange(TheCall, 2, 0, 1);
1051 if (BuiltinID == ARM::BI__builtin_arm_rsr64 ||
1052 BuiltinID == ARM::BI__builtin_arm_wsr64)
1055 if (BuiltinID == ARM::BI__builtin_arm_rsr ||
1056 BuiltinID == ARM::BI__builtin_arm_rsrp ||
1057 BuiltinID == ARM::BI__builtin_arm_wsr ||
1058 BuiltinID == ARM::BI__builtin_arm_wsrp)
1071 switch (BuiltinID) {
1074 case ARM::BI__builtin_arm_ssat:
1075 return SemaRef.BuiltinConstantArgRange(TheCall, 1, 1, 32);
1076 case ARM::BI__builtin_arm_usat:
1077 return SemaRef.BuiltinConstantArgRange(TheCall, 1, 0, 31);
1078 case ARM::BI__builtin_arm_ssat16:
1079 return SemaRef.BuiltinConstantArgRange(TheCall, 1, 1, 16);
1080 case ARM::BI__builtin_arm_usat16:
1081 return SemaRef.BuiltinConstantArgRange(TheCall, 1, 0, 15);
1082 case ARM::BI__builtin_arm_vcvtr_f:
1083 case ARM::BI__builtin_arm_vcvtr_d:
1084 return SemaRef.BuiltinConstantArgRange(TheCall, 1, 0, 1);
1085 case ARM::BI__builtin_arm_dmb:
1087 case ARM::BI__builtin_arm_dsb:
1089 case ARM::BI__builtin_arm_isb:
1091 case ARM::BI__builtin_arm_dbg:
1092 return SemaRef.BuiltinConstantArgRange(TheCall, 0, 0, 15);
1093 case ARM::BI__builtin_arm_cdp:
1094 case ARM::BI__builtin_arm_cdp2:
1095 case ARM::BI__builtin_arm_mcr:
1096 case ARM::BI__builtin_arm_mcr2:
1097 case ARM::BI__builtin_arm_mrc:
1098 case ARM::BI__builtin_arm_mrc2:
1099 case ARM::BI__builtin_arm_mcrr:
1100 case ARM::BI__builtin_arm_mcrr2:
1101 case ARM::BI__builtin_arm_mrrc:
1102 case ARM::BI__builtin_arm_mrrc2:
1103 case ARM::BI__builtin_arm_ldc:
1104 case ARM::BI__builtin_arm_ldcl:
1105 case ARM::BI__builtin_arm_ldc2:
1106 case ARM::BI__builtin_arm_ldc2l:
1107 case ARM::BI__builtin_arm_stc:
1108 case ARM::BI__builtin_arm_stcl:
1109 case ARM::BI__builtin_arm_stc2:
1110 case ARM::BI__builtin_arm_stc2l:
1111 return SemaRef.BuiltinConstantArgRange(TheCall, 0, 0, 15) ||
1120 if (BuiltinID == AArch64::BI__builtin_arm_ldrex ||
1121 BuiltinID == AArch64::BI__builtin_arm_ldaex ||
1122 BuiltinID == AArch64::BI__builtin_arm_strex ||
1123 BuiltinID == AArch64::BI__builtin_arm_stlex) {
1127 if (BuiltinID == AArch64::BI__builtin_arm_prefetch) {
1128 return SemaRef.BuiltinConstantArgRange(TheCall, 1, 0, 1) ||
1129 SemaRef.BuiltinConstantArgRange(TheCall, 2, 0, 3) ||
1130 SemaRef.BuiltinConstantArgRange(TheCall, 3, 0, 1) ||
1131 SemaRef.BuiltinConstantArgRange(TheCall, 4, 0, 1);
1134 if (BuiltinID == AArch64::BI__builtin_arm_range_prefetch_x) {
1135 return SemaRef.BuiltinConstantArgRange(TheCall, 1, 0, 1) ||
1136 SemaRef.BuiltinConstantArgRange(TheCall, 2, 0, 1) ||
1137 SemaRef.BuiltinConstantArgRange(TheCall, 3, -2097152, 2097151) ||
1138 SemaRef.BuiltinConstantArgRange(TheCall, 4, 1, 65536) ||
1139 SemaRef.BuiltinConstantArgRange(TheCall, 5, -2097152, 2097151);
1142 if (BuiltinID == AArch64::BI__builtin_arm_range_prefetch) {
1143 return SemaRef.BuiltinConstantArgRange(TheCall, 1, 0, 1) ||
1144 SemaRef.BuiltinConstantArgRange(TheCall, 2, 0, 1);
1147 if (BuiltinID == AArch64::BI__builtin_arm_rsr64 ||
1148 BuiltinID == AArch64::BI__builtin_arm_wsr64 ||
1149 BuiltinID == AArch64::BI__builtin_arm_rsr128 ||
1150 BuiltinID == AArch64::BI__builtin_arm_wsr128)
1154 if (BuiltinID == AArch64::BI__builtin_arm_irg ||
1155 BuiltinID == AArch64::BI__builtin_arm_addg ||
1156 BuiltinID == AArch64::BI__builtin_arm_gmi ||
1157 BuiltinID == AArch64::BI__builtin_arm_ldg ||
1158 BuiltinID == AArch64::BI__builtin_arm_stg ||
1159 BuiltinID == AArch64::BI__builtin_arm_subp) {
1163 if (BuiltinID == AArch64::BI__builtin_arm_rsr ||
1164 BuiltinID == AArch64::BI__builtin_arm_rsrp ||
1165 BuiltinID == AArch64::BI__builtin_arm_wsr ||
1166 BuiltinID == AArch64::BI__builtin_arm_wsrp)
1172 if (BuiltinID == AArch64::BI_ReadStatusReg ||
1173 BuiltinID == AArch64::BI_WriteStatusReg)
1174 return SemaRef.BuiltinConstantArgRange(TheCall, 0, 0x4000, 0x7fff);
1176 if (BuiltinID == AArch64::BI__sys)
1177 return SemaRef.BuiltinConstantArgRange(TheCall, 0, 0, 0x3fff);
1179 if (BuiltinID == AArch64::BI__getReg || BuiltinID == AArch64::BI__setReg ||
1180 BuiltinID == AArch64::BI__getRegFp || BuiltinID == AArch64::BI__setRegFp)
1181 return SemaRef.BuiltinConstantArgRange(TheCall, 0, 0, 31);
1183 if (BuiltinID == AArch64::BI__prefetch2)
1184 return SemaRef.BuiltinConstantArgRange(TheCall, 1, 0, 31);
1186 if (BuiltinID == AArch64::BI__break)
1187 return SemaRef.BuiltinConstantArgRange(TheCall, 0, 0, 0xffff);
1189 if (BuiltinID == AArch64::BI__hlt)
1190 return SemaRef.BuiltinConstantArgRange(TheCall, 0, 0, 0xffff);
1203 unsigned i = 0, l = 0, u = 0;
1204 switch (BuiltinID) {
1205 default:
return false;
1206 case AArch64::BI__builtin_arm_dmb:
1207 case AArch64::BI__dmb:
1208 case AArch64::BI__builtin_arm_dsb:
1209 case AArch64::BI__dsb:
1210 case AArch64::BI__builtin_arm_isb:
1211 case AArch64::BI__isb:
1217 return SemaRef.BuiltinConstantArgRange(TheCall, i, l, u + l);
1221struct IntrinToName {
1230 const char *IntrinNames) {
1231 AliasName.consume_front(
"__arm_");
1232 const IntrinToName *It =
1233 llvm::lower_bound(Map, BuiltinID, [](
const IntrinToName &L,
unsigned Id) {
1236 if (It == Map.end() || It->Id != BuiltinID)
1238 StringRef FullName(&IntrinNames[It->FullName]);
1239 if (AliasName == FullName)
1241 if (It->ShortName == -1)
1243 StringRef ShortName(&IntrinNames[It->ShortName]);
1244 return AliasName == ShortName;
1248#include "clang/Basic/arm_mve_builtin_aliases.inc"
1256#include "clang/Basic/arm_cde_builtin_aliases.inc"
1277 Diag(AL.
getLoc(), diag::err_attribute_argument_n_type)
1286 bool IsAArch64 = Context.getTargetInfo().getTriple().isAArch64();
1291 Diag(AL.
getLoc(), diag::err_attribute_arm_builtin_alias);
1295 D->
addAttr(::new (Context) ArmBuiltinAliasAttr(Context, AL, Ident));
1301 auto CheckForIncompatibleAttr =
1303 StringRef IncompatibleStateName) {
1304 if (CurrentState == IncompatibleState) {
1305 S.
Diag(AL.
getLoc(), diag::err_attributes_are_not_compatible)
1306 << (std::string(
"'__arm_new(\"") + StateName.str() +
"\")'")
1307 << (std::string(
"'") + IncompatibleStateName.str() +
"(\"" +
1308 StateName.str() +
"\")'")
1323 Diag(AL.
getLoc(), diag::err_missing_arm_state) << AL;
1328 std::vector<StringRef> NewState;
1329 if (
const auto *ExistingAttr = D->
getAttr<ArmNewAttr>()) {
1330 for (StringRef S : ExistingAttr->newArgs())
1331 NewState.push_back(S);
1335 bool HasZT0 =
false;
1336 for (
unsigned I = 0, E = AL.
getNumArgs(); I != E; ++I) {
1337 StringRef StateName;
1339 if (!
SemaRef.checkStringLiteralArgumentAttr(AL, I, StateName, &LiteralLoc))
1342 if (StateName ==
"za")
1344 else if (StateName ==
"zt0")
1347 Diag(LiteralLoc, diag::err_unknown_arm_state) << StateName;
1352 if (!llvm::is_contained(NewState, StateName))
1353 NewState.push_back(StateName);
1376 Diag(AL.
getLoc(), diag::err_attribute_not_clinkage) << AL;
1381 if (!FD->isExternallyVisible()) {
1382 Diag(AL.
getLoc(), diag::warn_attribute_cmse_entry_static);
1392 Diag(AL.
getLoc(), diag::err_attribute_too_many_arguments) << AL << 1;
1401 else if (!
SemaRef.checkStringLiteralArgumentAttr(AL, 0, Str, &ArgLoc))
1404 ARMInterruptAttr::InterruptType Kind;
1405 if (!ARMInterruptAttr::ConvertStrToInterruptType(Str, Kind)) {
1406 Diag(AL.
getLoc(), diag::warn_attribute_type_not_supported)
1407 << AL << Str << ArgLoc;
1411 if (!D->
hasAttr<ARMSaveFPAttr>()) {
1426 SemaRef.ARM().handleInterruptAttr(D, AL);
1429 if (!D->
hasAttr<ARMInterruptAttr>()) {
1435 bool VFP =
SemaRef.Context.getTargetInfo().hasFeature(
"vfp");
1448 bool UsesSM = FD->
hasAttr<ArmLocallyStreamingAttr>();
1449 bool UsesZA =
Attr &&
Attr->isNewZA();
1450 bool UsesZT0 =
Attr &&
Attr->isNewZT0();
1452 if (UsesZA || UsesZT0) {
1460 if (FD->
hasAttr<ArmLocallyStreamingAttr>()) {
1463 diag::warn_sme_locally_streaming_has_vl_args_returns)
1466 return P->getOriginalType()->isSizelessVectorType();
1469 diag::warn_sme_locally_streaming_has_vl_args_returns)
1482 if (UsesSM || UsesZA) {
1483 llvm::StringMap<bool> FeatureMap;
1484 Context.getFunctionFeatureMap(FeatureMap, FD);
1485 if (!FeatureMap.contains(
"sme")) {
1488 diag::err_sme_definition_using_sm_in_non_sme_target);
1491 diag::err_sme_definition_using_za_in_non_sme_target);
1495 llvm::StringMap<bool> FeatureMap;
1496 Context.getFunctionFeatureMap(FeatureMap, FD);
1497 if (!FeatureMap.contains(
"sme2")) {
1499 diag::err_sme_definition_using_zt0_in_non_sme2_target);
1508 uint64_t VScale = IsStreaming ? Context.getLangOpts().VScaleStreamingMin
1509 : Context.getLangOpts().VScaleMin;
1510 if (Ty->
getKind() == BuiltinType::SveBool ||
1511 Ty->
getKind() == BuiltinType::SveCount)
1512 return (VScale * 128) / Context.getCharWidth();
1513 return VScale * 128;
1517 bool IsStreaming =
false;
1521 SemaRef.getCurFunctionDecl(
true)) {
1524 if (T->getAArch64SMEAttributes() &
1541 return BT->getKind() == BuiltinType::SveBool;
1543 return VT->getElementType().getCanonicalType() ==
1545 BT->getKind() != BuiltinType::SveBool;
1547 return Context.getTypeSize(SecondType) ==
1549 Context.hasSameType(
1550 VT->getElementType(),
1551 Context.getBuiltinVectorTypeInfo(BT).ElementType);
1557 return IsValidCast(FirstType, SecondType) ||
1558 IsValidCast(SecondType, FirstType);
1563 bool IsStreaming =
false;
1567 SemaRef.getCurFunctionDecl(
true)) {
1570 if (T->getAArch64SMEAttributes() &
1593 if (BT->getKind() == BuiltinType::SveBool &&
1603 Context.getTypeSize(SecondType) !=
1615 return VecTy->getElementType().getCanonicalType()->isIntegerType() &&
1622 return IsLaxCompatible(FirstType, SecondType) ||
1623 IsLaxCompatible(SecondType, FirstType);
1627 if (!Buffer.empty())
1629 Buffer.append(Feat);
1634 StringRef PriorityString[8] = {
"P0",
"P1",
"P2",
"P3",
1635 "P4",
"P5",
"P6",
"P7"};
1637 assert(Priority > 0 && Priority < 256 &&
"priority out of range");
1639 for (
unsigned BitPos = 0; BitPos < 8; ++BitPos)
1640 if (Priority & (1U << BitPos))
1649 auto [LHS, RHS] = Param.split(
';');
1651 bool IsDefault =
false;
1653 LHS.split(Features,
'+');
1654 for (StringRef Feat : Features) {
1656 if (Feat ==
"default")
1658 else if (!
getASTContext().getTargetInfo().validateCpuSupports(Feat))
1659 return Diag(Loc, diag::warn_unsupported_target_attribute)
1664 if (!RHS.empty() && RHS.consume_front(
"priority=")) {
1666 Diag(Loc, diag::warn_invalid_default_version_priority);
1669 if (RHS.getAsInteger(0, Digit) || Digit < 1 || Digit > 255)
1670 Diag(Loc, diag::warn_version_priority_out_of_range) << RHS;
1686 assert(Params.size() == Locs.size() &&
1687 "Mismatch between number of string parameters and locations");
1689 bool HasDefault =
false;
1690 bool HasNonDefault =
false;
1691 for (
unsigned I = 0, E = Params.size(); I < E; ++I) {
1692 const StringRef Param = Params[I].trim();
1695 auto [LHS, RHS] = Param.split(
';');
1697 bool HasPriority = !RHS.empty() && RHS.consume_front(
"priority=");
1700 return Diag(Loc, diag::warn_unsupported_target_attribute)
1703 if (LHS ==
"default") {
1705 Diag(Loc, diag::warn_target_clone_duplicate_options);
1708 Diag(Loc, diag::warn_invalid_default_version_priority);
1709 NewParams.push_back(LHS);
1715 bool HasCodeGenImpact =
false;
1718 LHS.split(Features,
'+');
1719 for (StringRef Feat : Features) {
1721 if (!
getASTContext().getTargetInfo().validateCpuSupports(Feat)) {
1722 Diag(Loc, diag::warn_unsupported_target_attribute)
1726 if (
getASTContext().getTargetInfo().doesFeatureAffectCodeGen(Feat))
1727 HasCodeGenImpact =
true;
1728 ValidFeatures.push_back(Feat);
1732 if (!HasCodeGenImpact) {
1733 Diag(Loc, diag::warn_target_clone_no_impact_options);
1737 if (ValidFeatures.empty())
1741 llvm::sort(ValidFeatures);
1743 if (llvm::is_contained(NewParams, NewParam)) {
1744 Diag(Loc, diag::warn_target_clone_duplicate_options);
1750 if (RHS.getAsInteger(0, Digit) || Digit < 1 || Digit > 255)
1751 Diag(Loc, diag::warn_version_priority_out_of_range) << RHS;
1757 NewParams.push_back(NewParam);
1758 HasNonDefault =
true;
1761 return !HasNonDefault;
1766 const llvm::StringMap<bool> &FeatureMap) {
1770 if (FeatureMap.lookup(
"sve"))
1774 if (!FeatureMap.lookup(
"sme"))
1775 return Diag(Loc, diag::err_sve_vector_in_non_sve_target) << Ty;
1780 return Diag(Loc, diag::err_sve_vector_in_non_streaming_function) << Ty;
static bool hasFeature(StringRef Feature, const LangOptions &LangOpts, const TargetInfo &Target)
Determine whether a translation unit built using the current language options has the given feature.
This file declares semantic analysis functions specific to ARM.
Enumerates target-specific builtins in their own namespaces within namespace clang.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
QualType getPointerType(QualType T) const
Return the uniqued reference to the type for a pointer to the specified type.
Builtin::Context & BuiltinInfo
const TargetInfo & getTargetInfo() const
void getFunctionFeatureMap(llvm::StringMap< bool > &FeatureMap, const FunctionDecl *) const
Attr - This represents one attribute.
SourceLocation getLoc() const
This class is used for builtin types like 'int'.
unsigned getAuxBuiltinID(unsigned ID) const
Return real builtin ID (i.e.
const char * getRequiredFeatures(unsigned ID) const
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
Expr * getArg(unsigned Arg)
getArg - Return the specified argument.
SourceLocation getBeginLoc() const
void setArg(unsigned Arg, Expr *ArgExpr)
setArg - Set the specified argument.
unsigned getNumArgs() const
getNumArgs - Return the number of actual arguments to this call.
bool isExternCContext() const
Determines whether this context or some of its ancestors is a linkage specification context that spec...
A reference to a declared variable, function, enum, etc.
SourceLocation getBeginLoc() const
Decl - This represents one declaration (or definition), e.g.
const FunctionType * getFunctionType(bool BlocksToo=true) const
Looks through the Decl's underlying type to extract a FunctionType when possible.
SourceLocation getLocation() const
DeclContext * getDeclContext()
This represents one expression.
Expr * IgnoreParenCasts() LLVM_READONLY
Skip past any parentheses and casts which might surround this expression until reaching a fixed point...
bool isValueDependent() const
Determines whether the value of this expression depends on.
bool isTypeDependent() const
Determines whether the type of this expression depends on.
Expr * IgnoreParenImpCasts() LLVM_READONLY
Skip past any parentheses and implicit casts which might surround this expression until reaching a fi...
std::optional< llvm::APSInt > getIntegerConstantExpr(const ASTContext &Ctx) const
isIntegerConstantExpr - Return the value if this expression is a valid integer constant expression.
@ NPC_ValueDependentIsNotNull
Specifies that a value-dependent expression should be considered to never be a null pointer constant.
Represents a function declaration or definition.
QualType getReturnType() const
ArrayRef< ParmVarDecl * > parameters() const
Represents a prototype with parameter type info, e.g.
@ SME_PStateSMEnabledMask
@ SME_PStateSMCompatibleMask
@ SME_AgnosticZAStateMask
static ArmStateValue getArmZT0State(unsigned AttrBits)
static ArmStateValue getArmZAState(unsigned AttrBits)
One of these records is kept for each identifier that is lexed.
unsigned getBuiltinID() const
Return a value indicating whether this is a builtin function.
IdentifierInfo * getIdentifierInfo() const
ImplicitCastExpr - Allows us to explicitly represent implicit type conversions, which have no direct ...
Describes an entity that is being initialized.
static InitializedEntity InitializeParameter(ASTContext &Context, ParmVarDecl *Parm)
Create the initialization entity for a parameter.
@ Integer
Permit vector bitcasts between integer vectors with different numbers of elements but the same total ...
@ All
Permit vector bitcasts between all vectors with the same total bit-width.
Flags to identify the types for overloaded Neon builtins.
unsigned getEltSizeInBits() const
EltType getEltType() const
Represents a parameter to a function.
ParsedAttr - Represents a syntactic attribute.
IdentifierLoc * getArgAsIdent(unsigned Arg) const
void setInvalid(bool b=true) const
unsigned getNumArgs() const
getNumArgs - Return the number of actual arguments to this attribute.
bool isArgIdent(unsigned Arg) const
PointerType - C99 6.7.5.1 - Pointer Declarators.
A (possibly-)qualified type.
QualType withConst() const
void addConst()
Add the const type qualifier to this QualType.
bool isNull() const
Return true if this QualType doesn't point to a type yet.
QualType withVolatile() const
Qualifiers::ObjCLifetime getObjCLifetime() const
Returns lifetime attribute of this type.
QualType getUnqualifiedType() const
Retrieve the unqualified variant of the given type, removing as little sugar as possible.
const Type * getTypePtrOrNull() const
bool isAtLeastAsQualifiedAs(QualType Other, const ASTContext &Ctx) const
Determine whether this type is at least as qualified as the other given type, requiring exact equalit...
@ OCL_Strong
Assigning into this object requires the old value to be released and the new value to be retained.
@ OCL_ExplicitNone
This object can be modified without requiring retains or releases.
@ OCL_None
There is no lifetime qualification on this type.
@ OCL_Weak
Reading or writing from this object requires a barrier call.
@ OCL_Autoreleasing
Assigning into this object requires a lifetime extension.
void CheckSMEFunctionDefAttributes(const FunctionDecl *FD)
bool CheckARMBuiltinFunctionCall(const TargetInfo &TI, unsigned BuiltinID, CallExpr *TheCall)
void handleInterruptSaveFPAttr(Decl *D, const ParsedAttr &AL)
bool CheckSMEBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall)
bool CheckARMCoprocessorImmediate(const TargetInfo &TI, const Expr *CoprocArg, bool WantCDE)
bool CheckSVEBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall)
bool CheckNeonBuiltinFunctionCall(const TargetInfo &TI, unsigned BuiltinID, CallExpr *TheCall)
bool CheckCDEBuiltinFunctionCall(const TargetInfo &TI, unsigned BuiltinID, CallExpr *TheCall)
bool PerformNeonImmChecks(CallExpr *TheCall, SmallVectorImpl< std::tuple< int, int, int, int > > &ImmChecks, int OverloadType=-1)
bool CheckMVEBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall)
void handleInterruptAttr(Decl *D, const ParsedAttr &AL)
bool PerformSVEImmChecks(CallExpr *TheCall, SmallVectorImpl< std::tuple< int, int, int > > &ImmChecks)
void handleBuiltinAliasAttr(Decl *D, const ParsedAttr &AL)
@ ArmStreaming
Intrinsic is only available in normal mode.
@ VerifyRuntimeMode
Intrinsic is available both in normal and Streaming-SVE mode.
@ ArmStreamingCompatible
Intrinsic is only available in Streaming-SVE mode.
void handleNewAttr(Decl *D, const ParsedAttr &AL)
bool CheckARMBuiltinExclusiveCall(const TargetInfo &TI, unsigned BuiltinID, CallExpr *TheCall)
bool areCompatibleSveTypes(QualType FirstType, QualType SecondType)
Return true if the given types are an SVE builtin and a VectorType that is a fixed-length representat...
bool checkTargetVersionAttr(const StringRef Param, const SourceLocation Loc, SmallString< 64 > &NewParam)
bool checkSVETypeSupport(QualType Ty, SourceLocation Loc, const FunctionDecl *FD, const llvm::StringMap< bool > &FeatureMap)
bool SveAliasValid(unsigned BuiltinID, llvm::StringRef AliasName)
bool areLaxCompatibleSveTypes(QualType FirstType, QualType SecondType)
Return true if the given vector types are lax-compatible SVE vector types, false otherwise.
bool CheckAArch64BuiltinFunctionCall(const TargetInfo &TI, unsigned BuiltinID, CallExpr *TheCall)
bool MveAliasValid(unsigned BuiltinID, llvm::StringRef AliasName)
bool BuiltinARMMemoryTaggingCall(unsigned BuiltinID, CallExpr *TheCall)
BuiltinARMMemoryTaggingCall - Handle calls of memory tagging extensions.
void handleCmseNSEntryAttr(Decl *D, const ParsedAttr &AL)
bool CheckImmediateArg(CallExpr *TheCall, unsigned CheckTy, unsigned ArgIdx, unsigned EltBitWidth, unsigned VecBitWidth)
bool BuiltinARMSpecialReg(unsigned BuiltinID, CallExpr *TheCall, int ArgNum, unsigned ExpectedFieldNum, bool AllowName)
BuiltinARMSpecialReg - Handle a check if argument ArgNum of CallExpr TheCall is an ARM/AArch64 specia...
bool SmeAliasValid(unsigned BuiltinID, llvm::StringRef AliasName)
bool checkTargetClonesAttr(SmallVectorImpl< StringRef > &Params, SmallVectorImpl< SourceLocation > &Locs, SmallVectorImpl< SmallString< 64 > > &NewParams)
bool CdeAliasValid(unsigned BuiltinID, llvm::StringRef AliasName)
ASTContext & getASTContext() const
const LangOptions & getLangOpts() const
SemaDiagnosticBuilder Diag(SourceLocation Loc, unsigned DiagID)
Emit a diagnostic.
Sema - This implements semantic analysis and AST building for C.
Encodes a location in the source.
SourceRange getSourceRange() const LLVM_READONLY
SourceLocation tokens are not useful in isolation - they are low level value objects created/interpre...
SourceLocation getBeginLoc() const LLVM_READONLY
Exposes information about the current target.
const llvm::Triple & getTriple() const
Returns the target triple of the primary target.
IntType getInt64Type() const
@ ARM_LDREX_D
word (32-bit)
virtual unsigned getARMLDREXMask() const
uint32_t getARMCDECoprocMask() const
For ARM targets returns a mask defining which coprocessors are configured as Custom Datapath.
virtual bool hasFeature(StringRef Feature) const
Determine whether the given target has the given feature.
The base class of the type hierarchy.
bool isBlockPointerType() const
bool isIntegerType() const
isIntegerType() does not include complex integers (a GCC extension).
bool isSVESizelessBuiltinType() const
Returns true for SVE scalable vector types.
bool isSveVLSBuiltinType() const
Determines if this is a sizeless type supported by the 'arm_sve_vector_bits' type attribute,...
QualType getPointeeType() const
If this is a pointer, ObjC object pointer, or block pointer, this returns the respective pointee.
QualType getSveEltType(const ASTContext &Ctx) const
Returns the representative type for the element of an SVE builtin type.
bool isFloatingType() const
bool isAnyPointerType() const
const T * getAs() const
Member-template getAs<specific type>'.
bool isSizelessVectorType() const
Returns true for all scalable vector types.
Represents a GCC generic vector type.
Defines the clang::TargetInfo interface.
bool evaluateRequiredTargetFeatures(llvm::StringRef RequiredFatures, const llvm::StringMap< bool > &TargetFetureMap)
Returns true if the required target features of a builtin function are enabled.
Enums for the diagnostics of target, target_version and target_clones.
const AstTypeMatcher< PointerType > pointerType
The JSON file list parser is used to communicate input to InstallAPI.
bool isa(CodeGen::Address addr)
static void convertPriorityString(unsigned Priority, SmallString< 64 > &NewParam)
static bool BuiltinAliasValid(unsigned BuiltinID, StringRef AliasName, ArrayRef< IntrinToName > Map, const char *IntrinNames)
static ArmSMEState getSMEState(unsigned BuiltinID)
static bool checkArmStreamingBuiltin(Sema &S, CallExpr *TheCall, const FunctionDecl *FD, SemaARM::ArmStreamingType BuiltinType, unsigned BuiltinID)
SemaARM::ArmStreamingType getArmStreamingFnType(const FunctionDecl *FD)
static uint64_t getSVETypeSize(ASTContext &Context, const BuiltinType *Ty, bool IsStreaming)
getSVETypeSize - Return SVE vector or predicate register size.
@ AANT_ArgumentIdentifier
@ Result
The result type of a method or function.
AssignConvertType
AssignConvertType - All of the 'assignment' semantic checks return this enum to indicate whether the ...
bool hasArmZT0State(const FunctionDecl *FD)
Returns whether the given FunctionDecl has Arm ZT0 state.
CastKind
CastKind - The kind of operation required for a conversion.
static QualType getNeonEltType(NeonTypeFlags Flags, ASTContext &Context, bool IsPolyUnsigned, bool IsInt64Long)
getNeonEltType - Return the QualType corresponding to the elements of the vector type specified by th...
static bool checkNewAttrMutualExclusion(Sema &S, const ParsedAttr &AL, const FunctionProtoType *FPT, FunctionType::ArmStateValue CurrentState, StringRef StateName)
static void appendFeature(StringRef Feat, SmallString< 64 > &Buffer)
@ SveFixedLengthData
is AArch64 SVE fixed-length data vector
@ Generic
not a target-specific vector type
@ SveFixedLengthPredicate
is AArch64 SVE fixed-length predicate vector
U cast(CodeGen::Address addr)
@ None
The alignment was not explicit in code.
bool IsArmStreamingFunction(const FunctionDecl *FD, bool IncludeLocallyStreaming)
Returns whether the given FunctionDecl has an __arm[_locally]_streaming attribute.
ActionResult< Expr * > ExprResult
bool hasArmZAState(const FunctionDecl *FD)
Returns whether the given FunctionDecl has Arm ZA state.
__packed_splat4 __packed_splat2 __packed_splat8 __packed_splat4 int32_t
__packed_splat4 __packed_splat2 __packed_splat8 __packed_splat4 __packed_splat2 __packed_splat4 __packed_splat2 __packed_splat8 __packed_splat4 uint32_t
Extra information about a function prototype.
unsigned AArch64SMEAttributes