Skip to content

Commit 149009f

Browse files
authored
Merge branch 'main' into issue-165239
2 parents 56bc0ba + 7377ac0 commit 149009f

File tree

60 files changed

+1848
-1168
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+1848
-1168
lines changed

clang/docs/ClangFormatStyleOptions.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1673,6 +1673,16 @@ the configuration (without a prefix: ``Auto``).
16731673

16741674
int abcdef; // but this isn't
16751675

1676+
* ``bool AlignPPAndNotPP`` If comments following preprocessor directive should be aligned with
1677+
comments that don't.
1678+
1679+
.. code-block:: c++
1680+
1681+
true: false:
1682+
#define A // Comment vs. #define A // Comment
1683+
#define AB // Aligned #define AB // Aligned
1684+
int i; // Aligned int i; // Not aligned
1685+
16761686

16771687
.. _AllowAllArgumentsOnNextLine:
16781688

clang/docs/ReleaseNotes.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,16 @@ Potentially Breaking Changes
6969
call the member ``operator delete`` instead of the expected global
7070
delete operator. The old behavior is retained under ``-fclang-abi-compat=21``
7171
flag.
72+
- Trailing null statements in GNU statement expressions are no longer
73+
ignored by Clang; they now result in a void type. Clang previously
74+
matched GCC's behavior, which was recently clarified to be incorrect.
75+
76+
.. code-block:: c++
77+
78+
// The resulting type is 'void', not 'int'
79+
void foo(void) {
80+
return ({ 1;; });
81+
}
7282

7383
C/C++ Language Potentially Breaking Changes
7484
-------------------------------------------
@@ -562,6 +572,8 @@ X86 Support
562572

563573
Arm and AArch64 Support
564574
^^^^^^^^^^^^^^^^^^^^^^^
575+
- More intrinsics for the following AArch64 instructions:
576+
FCVTZ[US], FCVTN[US], FCVTM[US], FCVTP[US], FCVTA[US]
565577

566578
Android Support
567579
^^^^^^^^^^^^^^^
@@ -641,6 +653,7 @@ clang-format
641653
- Deprecate ``AlwaysBreak`` and ``BlockIndent`` suboptions from the
642654
``AlignAfterOpenBracket`` option, and make ``AlignAfterOpenBracket`` a
643655
``bool`` type.
656+
- Add ``AlignPPAndNotPP`` suboption to ``AlignTrailingComments``.
644657

645658
libclang
646659
--------

clang/include/clang/AST/Stmt.h

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1831,26 +1831,6 @@ class CompoundStmt final
18311831
return const_reverse_body_iterator(body_begin());
18321832
}
18331833

1834-
// Get the Stmt that StmtExpr would consider to be the result of this
1835-
// compound statement. This is used by StmtExpr to properly emulate the GCC
1836-
// compound expression extension, which ignores trailing NullStmts when
1837-
// getting the result of the expression.
1838-
// i.e. ({ 5;;; })
1839-
// ^^ ignored
1840-
// If we don't find something that isn't a NullStmt, just return the last
1841-
// Stmt.
1842-
Stmt *getStmtExprResult() {
1843-
for (auto *B : llvm::reverse(body())) {
1844-
if (!isa<NullStmt>(B))
1845-
return B;
1846-
}
1847-
return body_back();
1848-
}
1849-
1850-
const Stmt *getStmtExprResult() const {
1851-
return const_cast<CompoundStmt *>(this)->getStmtExprResult();
1852-
}
1853-
18541834
SourceLocation getBeginLoc() const { return LBraceLoc; }
18551835
SourceLocation getEndLoc() const { return RBraceLoc; }
18561836

clang/include/clang/Basic/arm_neon.td

Lines changed: 53 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1466,26 +1466,51 @@ def SCALAR_UCVTFD : SInst<"vcvt_f64", "(1F)(1!)", "SUl">;
14661466
////////////////////////////////////////////////////////////////////////////////
14671467
// Scalar Floating-point Converts
14681468
def SCALAR_FCVTXN : IInst<"vcvtx_f32", "(1F<)(1!)", "Sd">;
1469-
def SCALAR_FCVTNSS : SInst<"vcvtn_s32", "(1S)1", "Sf">;
1470-
def SCALAR_FCVTNUS : SInst<"vcvtn_u32", "(1U)1", "Sf">;
1471-
def SCALAR_FCVTNSD : SInst<"vcvtn_s64", "(1S)1", "Sd">;
1472-
def SCALAR_FCVTNUD : SInst<"vcvtn_u64", "(1U)1", "Sd">;
1473-
def SCALAR_FCVTMSS : SInst<"vcvtm_s32", "(1S)1", "Sf">;
1474-
def SCALAR_FCVTMUS : SInst<"vcvtm_u32", "(1U)1", "Sf">;
1475-
def SCALAR_FCVTMSD : SInst<"vcvtm_s64", "(1S)1", "Sd">;
1476-
def SCALAR_FCVTMUD : SInst<"vcvtm_u64", "(1U)1", "Sd">;
1477-
def SCALAR_FCVTASS : SInst<"vcvta_s32", "(1S)1", "Sf">;
1478-
def SCALAR_FCVTAUS : SInst<"vcvta_u32", "(1U)1", "Sf">;
1479-
def SCALAR_FCVTASD : SInst<"vcvta_s64", "(1S)1", "Sd">;
1480-
def SCALAR_FCVTAUD : SInst<"vcvta_u64", "(1U)1", "Sd">;
1481-
def SCALAR_FCVTPSS : SInst<"vcvtp_s32", "(1S)1", "Sf">;
1482-
def SCALAR_FCVTPUS : SInst<"vcvtp_u32", "(1U)1", "Sf">;
1483-
def SCALAR_FCVTPSD : SInst<"vcvtp_s64", "(1S)1", "Sd">;
1484-
def SCALAR_FCVTPUD : SInst<"vcvtp_u64", "(1U)1", "Sd">;
1485-
def SCALAR_FCVTZSS : SInst<"vcvt_s32", "(1S)1", "Sf">;
1486-
def SCALAR_FCVTZUS : SInst<"vcvt_u32", "(1U)1", "Sf">;
1487-
def SCALAR_FCVTZSD : SInst<"vcvt_s64", "(1S)1", "Sd">;
1488-
def SCALAR_FCVTZUD : SInst<"vcvt_u64", "(1U)1", "Sd">;
1469+
1470+
def SCALAR_FCVTN_F32toSS : SInst<"vcvtn_s32", "(1S)1", "Sf">;
1471+
def SCALAR_FCVTN_F32toUS : SInst<"vcvtn_u32", "(1U)1", "Sf">;
1472+
def SCALAR_FCVTN_F64toSS : SInst<"vcvtn_s32", "(1S<)1", "Sd">;
1473+
def SCALAR_FCVTN_F64toUS : SInst<"vcvtn_u32", "(1U<)1", "Sd">;
1474+
def SCALAR_FCVTN_F32toSD : SInst<"vcvtn_s64", "(1S>)1", "Sf">;
1475+
def SCALAR_FCVTN_F32toUD : SInst<"vcvtn_u64", "(1U>)1", "Sf">;
1476+
def SCALAR_FCVTN_F64toSD : SInst<"vcvtn_s64", "(1S)1", "Sd">;
1477+
def SCALAR_FCVTN_F64toUD : SInst<"vcvtn_u64", "(1U)1", "Sd">;
1478+
1479+
def SCALAR_FCVTM_F32toSS : SInst<"vcvtm_s32", "(1S)1", "Sf">;
1480+
def SCALAR_FCVTM_F32toUS : SInst<"vcvtm_u32", "(1U)1", "Sf">;
1481+
def SCALAR_FCVTM_F64toSS : SInst<"vcvtm_s32", "(1S<)1", "Sd">;
1482+
def SCALAR_FCVTM_F64toUS : SInst<"vcvtm_u32", "(1U<)1", "Sd">;
1483+
def SCALAR_FCVTM_F32toSD : SInst<"vcvtm_s64", "(1S>)1", "Sf">;
1484+
def SCALAR_FCVTM_F32toUD : SInst<"vcvtm_u64", "(1U>)1", "Sf">;
1485+
def SCALAR_FCVTM_F64toSD : SInst<"vcvtm_s64", "(1S)1", "Sd">;
1486+
def SCALAR_FCVTM_F64toUD : SInst<"vcvtm_u64", "(1U)1", "Sd">;
1487+
1488+
def SCALAR_FCVTA_F32toSS : SInst<"vcvta_s32", "(1S)1", "Sf">;
1489+
def SCALAR_FCVTA_F32toUS : SInst<"vcvta_u32", "(1U)1", "Sf">;
1490+
def SCALAR_FCVTA_F64toSS : SInst<"vcvta_s32", "(1S<)1", "Sd">;
1491+
def SCALAR_FCVTA_F64toUS : SInst<"vcvta_u32", "(1U<)1", "Sd">;
1492+
def SCALAR_FCVTA_F32toSD : SInst<"vcvta_s64", "(1S>)1", "Sf">;
1493+
def SCALAR_FCVTA_F32toUD : SInst<"vcvta_u64", "(1U>)1", "Sf">;
1494+
def SCALAR_FCVTA_F64toSD : SInst<"vcvta_s64", "(1S)1", "Sd">;
1495+
def SCALAR_FCVTA_F64toUD : SInst<"vcvta_u64", "(1U)1", "Sd">;
1496+
1497+
def SCALAR_FCVTP_F32toSS : SInst<"vcvtp_s32", "(1S)1", "Sf">;
1498+
def SCALAR_FCVTP_F32toUS : SInst<"vcvtp_u32", "(1U)1", "Sf">;
1499+
def SCALAR_FCVTP_F64toSS : SInst<"vcvtp_s32", "(1S<)1", "Sd">;
1500+
def SCALAR_FCVTP_F64toUS : SInst<"vcvtp_u32", "(1U<)1", "Sd">;
1501+
def SCALAR_FCVTP_F32toSD : SInst<"vcvtp_s64", "(1S>)1", "Sf">;
1502+
def SCALAR_FCVTP_F32toUD : SInst<"vcvtp_u64", "(1U>)1", "Sf">;
1503+
def SCALAR_FCVTP_F64toSD : SInst<"vcvtp_s64", "(1S)1", "Sd">;
1504+
def SCALAR_FCVTP_F64toUD : SInst<"vcvtp_u64", "(1U)1", "Sd">;
1505+
1506+
def SCALAR_FCVTZ_F32toSS : SInst<"vcvt_s32", "(1S)1", "Sf">;
1507+
def SCALAR_FCVTZ_F32toUS : SInst<"vcvt_u32", "(1U)1", "Sf">;
1508+
def SCALAR_FCVTZ_F64toSS : SInst<"vcvt_s32", "(1S<)1", "Sd">;
1509+
def SCALAR_FCVTZ_F64toUS : SInst<"vcvt_u32", "(1U<)1", "Sd">;
1510+
def SCALAR_FCVTZ_F32toSD : SInst<"vcvt_s64", "(1S>)1", "Sf">;
1511+
def SCALAR_FCVTZ_F32toUD : SInst<"vcvt_u64", "(1U>)1", "Sf">;
1512+
def SCALAR_FCVTZ_F64toSD : SInst<"vcvt_s64", "(1S)1", "Sd">;
1513+
def SCALAR_FCVTZ_F64toUD : SInst<"vcvt_u64", "(1U)1", "Sd">;
14891514

14901515
////////////////////////////////////////////////////////////////////////////////
14911516
// Scalar Floating-point Reciprocal Estimate
@@ -1896,6 +1921,14 @@ let ArchGuard = "defined(__aarch64__) || defined(__arm64ec__)", TargetGuard = "f
18961921
def VFMLSL_LANEQ_HIGH : SOpInst<"vfmlsl_laneq_high", "(F>)(F>)F(FQ)I", "hQh", OP_FMLSL_LN_Hi>;
18971922
}
18981923

1924+
let ArchGuard = "defined(__aarch64__)", TargetGuard = "f8f16mm,neon" in {
1925+
def VMMLA_F16_MF8 : VInst<"vmmla_f16_mf8_fpm", "(>F)(>F)..V", "Qm">;
1926+
}
1927+
1928+
let ArchGuard = "defined(__aarch64__)", TargetGuard = "f8f32mm,neon" in {
1929+
def VMMLA_F32_MF8 : VInst<"vmmla_f32_mf8_fpm", "(>>F)(>>F)..V", "Qm">;
1930+
}
1931+
18991932
let TargetGuard = "i8mm,neon" in {
19001933
def VMMLA : SInst<"vmmla", "..(<<)(<<)", "QUiQi">;
19011934
def VUSMMLA : SInst<"vusmmla", "..(<<U)(<<)", "Qi">;

clang/include/clang/Format/Format.h

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,9 +601,19 @@ struct FormatStyle {
601601
/// int abcdef; // but this isn't
602602
/// \endcode
603603
unsigned OverEmptyLines;
604+
/// If comments following preprocessor directive should be aligned with
605+
/// comments that don't.
606+
/// \code
607+
/// true: false:
608+
/// #define A // Comment vs. #define A // Comment
609+
/// #define AB // Aligned #define AB // Aligned
610+
/// int i; // Aligned int i; // Not aligned
611+
/// \endcode
612+
bool AlignPPAndNotPP;
604613

605614
bool operator==(const TrailingCommentsAlignmentStyle &R) const {
606-
return Kind == R.Kind && OverEmptyLines == R.OverEmptyLines;
615+
return Kind == R.Kind && OverEmptyLines == R.OverEmptyLines &&
616+
AlignPPAndNotPP == R.AlignPPAndNotPP;
607617
}
608618
bool operator!=(const TrailingCommentsAlignmentStyle &R) const {
609619
return !(*this == R);

clang/lib/AST/ByteCode/Compiler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4175,7 +4175,7 @@ bool Compiler<Emitter>::VisitStmtExpr(const StmtExpr *E) {
41754175
StmtExprScope<Emitter> SS(this);
41764176

41774177
const CompoundStmt *CS = E->getSubStmt();
4178-
const Stmt *Result = CS->getStmtExprResult();
4178+
const Stmt *Result = CS->body_back();
41794179
for (const Stmt *S : CS->body()) {
41804180
if (S != Result) {
41814181
if (!this->visitStmt(S))

clang/lib/AST/ComputeDependence.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ ExprDependence clang::computeDependence(StmtExpr *E, unsigned TemplateDepth) {
178178
auto D = toExprDependenceForImpliedType(E->getType()->getDependence());
179179
// Propagate dependence of the result.
180180
if (const auto *CompoundExprResult =
181-
dyn_cast_or_null<ValueStmt>(E->getSubStmt()->getStmtExprResult()))
181+
dyn_cast_or_null<ValueStmt>(E->getSubStmt()->body_back()))
182182
if (const Expr *ResultExpr = CompoundExprResult->getExprStmt())
183183
D |= ResultExpr->getDependence();
184184
// Note: we treat a statement-expression in a dependent context as always

clang/lib/Basic/BuiltinTargetFeatures.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ using llvm::StringRef;
2020
namespace clang {
2121
namespace Builtin {
2222
/// TargetFeatures - This class is used to check whether the builtin function
23-
/// has the required tagert specific features. It is able to support the
23+
/// has the required target specific features. It is able to support the
2424
/// combination of ','(and), '|'(or), and '()'. By default, the priority of
2525
/// ',' is higher than that of '|' .
2626
/// E.g:

clang/lib/CodeGen/CGStmt.cpp

Lines changed: 33 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -582,48 +582,45 @@ CodeGenFunction::EmitCompoundStmtWithoutScope(const CompoundStmt &S,
582582
bool GetLast,
583583
AggValueSlot AggSlot) {
584584

585-
const Stmt *ExprResult = S.getStmtExprResult();
586-
assert((!GetLast || (GetLast && ExprResult)) &&
587-
"If GetLast is true then the CompoundStmt must have a StmtExprResult");
585+
for (CompoundStmt::const_body_iterator I = S.body_begin(),
586+
E = S.body_end() - GetLast;
587+
I != E; ++I)
588+
EmitStmt(*I);
588589

589590
Address RetAlloca = Address::invalid();
590-
591-
for (auto *CurStmt : S.body()) {
592-
if (GetLast && ExprResult == CurStmt) {
593-
// We have to special case labels here. They are statements, but when put
594-
// at the end of a statement expression, they yield the value of their
595-
// subexpression. Handle this by walking through all labels we encounter,
596-
// emitting them before we evaluate the subexpr.
597-
// Similar issues arise for attributed statements.
598-
while (!isa<Expr>(ExprResult)) {
599-
if (const auto *LS = dyn_cast<LabelStmt>(ExprResult)) {
600-
EmitLabel(LS->getDecl());
601-
ExprResult = LS->getSubStmt();
602-
} else if (const auto *AS = dyn_cast<AttributedStmt>(ExprResult)) {
603-
// FIXME: Update this if we ever have attributes that affect the
604-
// semantics of an expression.
605-
ExprResult = AS->getSubStmt();
606-
} else {
607-
llvm_unreachable("unknown value statement");
608-
}
591+
if (GetLast) {
592+
// We have to special case labels here. They are statements, but when put
593+
// at the end of a statement expression, they yield the value of their
594+
// subexpression. Handle this by walking through all labels we encounter,
595+
// emitting them before we evaluate the subexpr.
596+
// Similar issues arise for attributed statements.
597+
const Stmt *LastStmt = S.body_back();
598+
while (!isa<Expr>(LastStmt)) {
599+
if (const auto *LS = dyn_cast<LabelStmt>(LastStmt)) {
600+
EmitLabel(LS->getDecl());
601+
LastStmt = LS->getSubStmt();
602+
} else if (const auto *AS = dyn_cast<AttributedStmt>(LastStmt)) {
603+
// FIXME: Update this if we ever have attributes that affect the
604+
// semantics of an expression.
605+
LastStmt = AS->getSubStmt();
606+
} else {
607+
llvm_unreachable("unknown value statement");
609608
}
609+
}
610610

611-
EnsureInsertPoint();
611+
EnsureInsertPoint();
612612

613-
const Expr *E = cast<Expr>(ExprResult);
614-
QualType ExprTy = E->getType();
615-
if (hasAggregateEvaluationKind(ExprTy)) {
616-
EmitAggExpr(E, AggSlot);
617-
} else {
618-
// We can't return an RValue here because there might be cleanups at
619-
// the end of the StmtExpr. Because of that, we have to emit the result
620-
// here into a temporary alloca.
621-
RetAlloca = CreateMemTemp(ExprTy);
622-
EmitAnyExprToMem(E, RetAlloca, Qualifiers(),
623-
/*IsInit*/ false);
624-
}
613+
const Expr *E = cast<Expr>(LastStmt);
614+
QualType ExprTy = E->getType();
615+
if (hasAggregateEvaluationKind(ExprTy)) {
616+
EmitAggExpr(E, AggSlot);
625617
} else {
626-
EmitStmt(CurStmt);
618+
// We can't return an RValue here because there might be cleanups at
619+
// the end of the StmtExpr. Because of that, we have to emit the result
620+
// here into a temporary alloca.
621+
RetAlloca = CreateMemTemp(ExprTy);
622+
EmitAnyExprToMem(E, RetAlloca, Qualifiers(),
623+
/*IsInit*/ false);
627624
}
628625
}
629626

clang/lib/CodeGen/TargetBuiltins/ARM.cpp

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,7 @@ struct ARMVectorIntrinsicInfo {
590590
Intrinsic::LLVMIntrinsic, Intrinsic::AltLLVMIntrinsic, \
591591
TypeModifier }
592592

593+
// clang-format off
593594
static const ARMVectorIntrinsicInfo ARMSIMDIntrinsicMap [] = {
594595
NEONMAP1(__a32_vcvt_bf16_f32, arm_neon_vcvtfp2bf, 0),
595596
NEONMAP0(splat_lane_v),
@@ -1217,35 +1218,55 @@ static const ARMVectorIntrinsicInfo AArch64SISDIntrinsicMap[] = {
12171218
NEONMAP1(vcales_f32, aarch64_neon_facge, AddRetType | Add1ArgType),
12181219
NEONMAP1(vcaltd_f64, aarch64_neon_facgt, AddRetType | Add1ArgType),
12191220
NEONMAP1(vcalts_f32, aarch64_neon_facgt, AddRetType | Add1ArgType),
1221+
NEONMAP1(vcvtad_s32_f64, aarch64_neon_fcvtas, AddRetType | Add1ArgType),
12201222
NEONMAP1(vcvtad_s64_f64, aarch64_neon_fcvtas, AddRetType | Add1ArgType),
1223+
NEONMAP1(vcvtad_u32_f64, aarch64_neon_fcvtau, AddRetType | Add1ArgType),
12211224
NEONMAP1(vcvtad_u64_f64, aarch64_neon_fcvtau, AddRetType | Add1ArgType),
12221225
NEONMAP1(vcvtas_s32_f32, aarch64_neon_fcvtas, AddRetType | Add1ArgType),
1226+
NEONMAP1(vcvtas_s64_f32, aarch64_neon_fcvtas, AddRetType | Add1ArgType),
12231227
NEONMAP1(vcvtas_u32_f32, aarch64_neon_fcvtau, AddRetType | Add1ArgType),
1228+
NEONMAP1(vcvtas_u64_f32, aarch64_neon_fcvtau, AddRetType | Add1ArgType),
12241229
NEONMAP1(vcvtd_n_f64_s64, aarch64_neon_vcvtfxs2fp, AddRetType | Add1ArgType),
12251230
NEONMAP1(vcvtd_n_f64_u64, aarch64_neon_vcvtfxu2fp, AddRetType | Add1ArgType),
12261231
NEONMAP1(vcvtd_n_s64_f64, aarch64_neon_vcvtfp2fxs, AddRetType | Add1ArgType),
12271232
NEONMAP1(vcvtd_n_u64_f64, aarch64_neon_vcvtfp2fxu, AddRetType | Add1ArgType),
1233+
NEONMAP1(vcvtd_s32_f64, aarch64_neon_fcvtzs, AddRetType | Add1ArgType),
12281234
NEONMAP1(vcvtd_s64_f64, aarch64_neon_fcvtzs, AddRetType | Add1ArgType),
1235+
NEONMAP1(vcvtd_u32_f64, aarch64_neon_fcvtzu, AddRetType | Add1ArgType),
12291236
NEONMAP1(vcvtd_u64_f64, aarch64_neon_fcvtzu, AddRetType | Add1ArgType),
12301237
NEONMAP0(vcvth_bf16_f32),
1238+
NEONMAP1(vcvtmd_s32_f64, aarch64_neon_fcvtms, AddRetType | Add1ArgType),
12311239
NEONMAP1(vcvtmd_s64_f64, aarch64_neon_fcvtms, AddRetType | Add1ArgType),
1240+
NEONMAP1(vcvtmd_u32_f64, aarch64_neon_fcvtmu, AddRetType | Add1ArgType),
12321241
NEONMAP1(vcvtmd_u64_f64, aarch64_neon_fcvtmu, AddRetType | Add1ArgType),
12331242
NEONMAP1(vcvtms_s32_f32, aarch64_neon_fcvtms, AddRetType | Add1ArgType),
1243+
NEONMAP1(vcvtms_s64_f32, aarch64_neon_fcvtms, AddRetType | Add1ArgType),
12341244
NEONMAP1(vcvtms_u32_f32, aarch64_neon_fcvtmu, AddRetType | Add1ArgType),
1245+
NEONMAP1(vcvtms_u64_f32, aarch64_neon_fcvtmu, AddRetType | Add1ArgType),
1246+
NEONMAP1(vcvtnd_s32_f64, aarch64_neon_fcvtns, AddRetType | Add1ArgType),
12351247
NEONMAP1(vcvtnd_s64_f64, aarch64_neon_fcvtns, AddRetType | Add1ArgType),
1248+
NEONMAP1(vcvtnd_u32_f64, aarch64_neon_fcvtnu, AddRetType | Add1ArgType),
12361249
NEONMAP1(vcvtnd_u64_f64, aarch64_neon_fcvtnu, AddRetType | Add1ArgType),
12371250
NEONMAP1(vcvtns_s32_f32, aarch64_neon_fcvtns, AddRetType | Add1ArgType),
1251+
NEONMAP1(vcvtns_s64_f32, aarch64_neon_fcvtns, AddRetType | Add1ArgType),
12381252
NEONMAP1(vcvtns_u32_f32, aarch64_neon_fcvtnu, AddRetType | Add1ArgType),
1253+
NEONMAP1(vcvtns_u64_f32, aarch64_neon_fcvtnu, AddRetType | Add1ArgType),
1254+
NEONMAP1(vcvtpd_s32_f64, aarch64_neon_fcvtps, AddRetType | Add1ArgType),
12391255
NEONMAP1(vcvtpd_s64_f64, aarch64_neon_fcvtps, AddRetType | Add1ArgType),
1256+
NEONMAP1(vcvtpd_u32_f64, aarch64_neon_fcvtpu, AddRetType | Add1ArgType),
12401257
NEONMAP1(vcvtpd_u64_f64, aarch64_neon_fcvtpu, AddRetType | Add1ArgType),
12411258
NEONMAP1(vcvtps_s32_f32, aarch64_neon_fcvtps, AddRetType | Add1ArgType),
1259+
NEONMAP1(vcvtps_s64_f32, aarch64_neon_fcvtps, AddRetType | Add1ArgType),
12421260
NEONMAP1(vcvtps_u32_f32, aarch64_neon_fcvtpu, AddRetType | Add1ArgType),
1261+
NEONMAP1(vcvtps_u64_f32, aarch64_neon_fcvtpu, AddRetType | Add1ArgType),
12431262
NEONMAP1(vcvts_n_f32_s32, aarch64_neon_vcvtfxs2fp, AddRetType | Add1ArgType),
12441263
NEONMAP1(vcvts_n_f32_u32, aarch64_neon_vcvtfxu2fp, AddRetType | Add1ArgType),
12451264
NEONMAP1(vcvts_n_s32_f32, aarch64_neon_vcvtfp2fxs, AddRetType | Add1ArgType),
12461265
NEONMAP1(vcvts_n_u32_f32, aarch64_neon_vcvtfp2fxu, AddRetType | Add1ArgType),
12471266
NEONMAP1(vcvts_s32_f32, aarch64_neon_fcvtzs, AddRetType | Add1ArgType),
1267+
NEONMAP1(vcvts_s64_f32, aarch64_neon_fcvtzs, AddRetType | Add1ArgType),
12481268
NEONMAP1(vcvts_u32_f32, aarch64_neon_fcvtzu, AddRetType | Add1ArgType),
1269+
NEONMAP1(vcvts_u64_f32, aarch64_neon_fcvtzu, AddRetType | Add1ArgType),
12491270
NEONMAP1(vcvtxd_f32_f64, aarch64_sisd_fcvtxn, 0),
12501271
NEONMAP1(vmaxnmv_f32, aarch64_neon_fmaxnmv, AddRetType | Add1ArgType),
12511272
NEONMAP1(vmaxnmvq_f32, aarch64_neon_fmaxnmv, AddRetType | Add1ArgType),
@@ -1446,6 +1467,7 @@ static const ARMVectorIntrinsicInfo AArch64SISDIntrinsicMap[] = {
14461467
NEONMAP1(vrsqrteh_f16, aarch64_neon_frsqrte, Add1ArgType),
14471468
NEONMAP1(vrsqrtsh_f16, aarch64_neon_frsqrts, Add1ArgType),
14481469
};
1470+
// clang-format on
14491471

14501472
// Some intrinsics are equivalent for codegen.
14511473
static const std::pair<unsigned, unsigned> NEONEquivalentIntrinsicMap[] = {
@@ -7624,6 +7646,16 @@ Value *CodeGenFunction::EmitAArch64BuiltinExpr(unsigned BuiltinID,
76247646
Int = Intrinsic::aarch64_neon_vluti4q_laneq_x2;
76257647
return EmitNeonCall(CGM.getIntrinsic(Int, Ty), Ops, "vluti4q_laneq_x2");
76267648
}
7649+
case NEON::BI__builtin_neon_vmmlaq_f16_mf8_fpm:
7650+
return EmitFP8NeonCall(Intrinsic::aarch64_neon_fmmla,
7651+
{llvm::FixedVectorType::get(HalfTy, 8),
7652+
llvm::FixedVectorType::get(Int8Ty, 16)},
7653+
Ops, E, "fmmla");
7654+
case NEON::BI__builtin_neon_vmmlaq_f32_mf8_fpm:
7655+
return EmitFP8NeonCall(Intrinsic::aarch64_neon_fmmla,
7656+
{llvm::FixedVectorType::get(FloatTy, 4),
7657+
llvm::FixedVectorType::get(Int8Ty, 16)},
7658+
Ops, E, "fmmla");
76277659
case NEON::BI__builtin_neon_vcvt1_low_bf16_mf8_fpm:
76287660
ExtractLow = true;
76297661
[[fallthrough]];

0 commit comments

Comments
 (0)