Skip to content

Commit ec5c582

Browse files
authored
Merge branch 'main' into fix-up-for-vop3p-gisel
2 parents a897290 + ee2d7a6 commit ec5c582

File tree

138 files changed

+3898
-3265
lines changed

Some content is hidden

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

138 files changed

+3898
-3265
lines changed

clang/include/clang/Basic/riscv_vector.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2397,7 +2397,7 @@ let RequiredFeatures = ["zvfbfmin"] in {
23972397
}
23982398
defm vrgatherei16 : RVVOutBuiltinSet<"vrgatherei16_vv", "csilfd",
23992399
[["vv", "v", "vv(Log2EEW:4)Uv"]]>;
2400-
let RequiredFeatures = ["zvfh"] in
2400+
let RequiredFeatures = ["zvfhmin"] in
24012401
defm vrgatherei16 : RVVOutBuiltinSet<"vrgatherei16_vv", "x",
24022402
[["vv", "v", "vv(Log2EEW:4)Uv"]]>;
24032403
// unsigned type

clang/include/clang/Basic/riscv_vector_common.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ let UnMaskedPolicyScheme = HasPolicyOperand,
593593
multiclass RVVSlideUpBuiltinSet {
594594
defm "" : RVVOutBuiltinSet<NAME, "csilfd",
595595
[["vx","v", "vvvz"]]>;
596-
let RequiredFeatures = ["zvfh"] in
596+
let RequiredFeatures = ["zvfhmin"] in
597597
defm "" : RVVOutBuiltinSet<NAME, "x",
598598
[["vx","v", "vvvz"]]>;
599599
defm "" : RVVOutBuiltinSet<NAME, "csil",
@@ -618,7 +618,7 @@ let UnMaskedPolicyScheme = HasPassthruOperand,
618618
multiclass RVVSlideDownBuiltinSet {
619619
defm "" : RVVOutBuiltinSet<NAME, "csilfd",
620620
[["vx","v", "vvz"]]>;
621-
let RequiredFeatures = ["zvfh"] in
621+
let RequiredFeatures = ["zvfhmin"] in
622622
defm "" : RVVOutBuiltinSet<NAME, "x",
623623
[["vx","v", "vvz"]]>;
624624
defm "" : RVVOutBuiltinSet<NAME, "csil",

clang/lib/AST/ByteCode/InterpBuiltin.cpp

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1423,7 +1423,6 @@ static bool interp__builtin_operator_new(InterpState &S, CodePtr OpPC,
14231423
// Walk up the call stack to find the appropriate caller and get the
14241424
// element type from it.
14251425
auto [NewCall, ElemType] = S.getStdAllocatorCaller("allocate");
1426-
APSInt Bytes = popToAPSInt(S.Stk, *S.getContext().classify(Call->getArg(0)));
14271426

14281427
if (ElemType.isNull()) {
14291428
S.FFDiag(Call, S.getLangOpts().CPlusPlus20
@@ -1439,6 +1438,25 @@ static bool interp__builtin_operator_new(InterpState &S, CodePtr OpPC,
14391438
return false;
14401439
}
14411440

1441+
// We only care about the first parameter (the size), so discard all the
1442+
// others.
1443+
{
1444+
unsigned NumArgs = Call->getNumArgs();
1445+
assert(NumArgs >= 1);
1446+
1447+
// The std::nothrow_t arg never gets put on the stack.
1448+
if (Call->getArg(NumArgs - 1)->getType()->isNothrowT())
1449+
--NumArgs;
1450+
auto Args = llvm::ArrayRef(Call->getArgs(), Call->getNumArgs());
1451+
// First arg is needed.
1452+
Args = Args.drop_front();
1453+
1454+
// Discard the rest.
1455+
for (const Expr *Arg : Args)
1456+
discard(S.Stk, *S.getContext().classify(Arg));
1457+
}
1458+
1459+
APSInt Bytes = popToAPSInt(S.Stk, *S.getContext().classify(Call->getArg(0)));
14421460
CharUnits ElemSize = S.getASTContext().getTypeSizeInChars(ElemType);
14431461
assert(!ElemSize.isZero());
14441462
// Divide the number of bytes by sizeof(ElemType), so we get the number of

clang/lib/Analysis/UnsafeBufferUsage.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
#include "llvm/ADT/SmallSet.h"
3131
#include "llvm/ADT/SmallVector.h"
3232
#include "llvm/ADT/StringRef.h"
33-
#include "llvm/Support/Casting.h"
3433
#include <cstddef>
3534
#include <optional>
3635
#include <queue>

clang/lib/Basic/LangOptions.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
//===----------------------------------------------------------------------===//
1212

1313
#include "clang/Basic/LangOptions.h"
14-
#include "llvm/ADT/SmallString.h"
1514
#include "llvm/Support/Path.h"
1615

1716
using namespace clang;

clang/lib/Basic/TargetInfo.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -555,8 +555,7 @@ void TargetInfo::adjust(DiagnosticsEngine &Diags, LangOptions &Opts) {
555555
bool TargetInfo::initFeatureMap(
556556
llvm::StringMap<bool> &Features, DiagnosticsEngine &Diags, StringRef CPU,
557557
const std::vector<std::string> &FeatureVec) const {
558-
for (const auto &F : FeatureVec) {
559-
StringRef Name = F;
558+
for (StringRef Name : FeatureVec) {
560559
if (Name.empty())
561560
continue;
562561
// Apply the feature via the target.

clang/lib/Basic/Targets/AVR.cpp

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,9 @@ static MCUInfo AVRMcus[] = {
336336
{"attiny1624", "__AVR_ATtiny1624__", "103", 1},
337337
{"attiny1626", "__AVR_ATtiny1626__", "103", 1},
338338
{"attiny1627", "__AVR_ATtiny1627__", "103", 1},
339+
{"attiny3224", "__AVR_ATtiny3224__", "103", 1},
340+
{"attiny3226", "__AVR_ATtiny3226__", "103", 1},
341+
{"attiny3227", "__AVR_ATtiny3227__", "103", 1},
339342
{"atmega808", "__AVR_ATmega808__", "103", 1},
340343
{"atmega809", "__AVR_ATmega809__", "103", 1},
341344
{"atmega1608", "__AVR_ATmega1608__", "103", 1},
@@ -344,6 +347,72 @@ static MCUInfo AVRMcus[] = {
344347
{"atmega3209", "__AVR_ATmega3209__", "103", 1},
345348
{"atmega4808", "__AVR_ATmega4808__", "103", 1},
346349
{"atmega4809", "__AVR_ATmega4809__", "103", 1},
350+
351+
// gcc 14 additions:
352+
353+
{"avr64da28", "__AVR_AVR64DA28__", "102", 1},
354+
{"avr64da32", "__AVR_AVR64DA32__", "102", 1},
355+
{"avr64da48", "__AVR_AVR64DA48__", "102", 1},
356+
{"avr64da64", "__AVR_AVR64DA64__", "102", 1},
357+
{"avr64db28", "__AVR_AVR64DB28__", "102", 1},
358+
{"avr64db32", "__AVR_AVR64DB32__", "102", 1},
359+
{"avr64db48", "__AVR_AVR64DB48__", "102", 1},
360+
{"avr64db64", "__AVR_AVR64DB64__", "102", 1},
361+
{"avr64dd14", "__AVR_AVR64DD14__", "102", 1},
362+
{"avr64dd20", "__AVR_AVR64DD20__", "102", 1},
363+
{"avr64dd28", "__AVR_AVR64DD28__", "102", 1},
364+
{"avr64dd32", "__AVR_AVR64DD32__", "102", 1},
365+
{"avr64du28", "__AVR_AVR64DU28__", "102", 1},
366+
{"avr64du32", "__AVR_AVR64DU32__", "102", 1},
367+
{"avr64ea28", "__AVR_AVR64EA28__", "102", 1},
368+
{"avr64ea32", "__AVR_AVR64EA32__", "102", 1},
369+
{"avr64ea48", "__AVR_AVR64EA48__", "102", 1},
370+
{"avr64sd28", "__AVR_AVR64SD28__", "102", 1},
371+
{"avr64sd32", "__AVR_AVR64SD32__", "102", 1},
372+
{"avr64sd48", "__AVR_AVR64SD48__", "102", 1},
373+
374+
{"avr16dd20", "__AVR_AVR16DD20__", "103", 1},
375+
{"avr16dd28", "__AVR_AVR16DD28__", "103", 1},
376+
{"avr16dd32", "__AVR_AVR16DD32__", "103", 1},
377+
{"avr16du14", "__AVR_AVR16DU14__", "103", 1},
378+
{"avr16du20", "__AVR_AVR16DU20__", "103", 1},
379+
{"avr16du28", "__AVR_AVR16DU28__", "103", 1},
380+
{"avr16du32", "__AVR_AVR16DU32__", "103", 1},
381+
{"avr32da28", "__AVR_AVR32DA28__", "103", 1},
382+
{"avr32da32", "__AVR_AVR32DA32__", "103", 1},
383+
{"avr32da48", "__AVR_AVR32DA48__", "103", 1},
384+
{"avr32db28", "__AVR_AVR32DB28__", "103", 1},
385+
{"avr32db32", "__AVR_AVR32DB32__", "103", 1},
386+
{"avr32db48", "__AVR_AVR32DB48__", "103", 1},
387+
{"avr32dd14", "__AVR_AVR32DD14__", "103", 1},
388+
{"avr32dd20", "__AVR_AVR32DD20__", "103", 1},
389+
{"avr32dd28", "__AVR_AVR32DD28__", "103", 1},
390+
{"avr32dd32", "__AVR_AVR32DD32__", "103", 1},
391+
{"avr32du14", "__AVR_AVR32DU14__", "103", 1},
392+
{"avr32du20", "__AVR_AVR32DU20__", "103", 1},
393+
{"avr32du28", "__AVR_AVR32DU28__", "103", 1},
394+
{"avr32du32", "__AVR_AVR32DU32__", "103", 1},
395+
{"avr16eb14", "__AVR_AVR16EB14__", "103", 1},
396+
{"avr16eb20", "__AVR_AVR16EB20__", "103", 1},
397+
{"avr16eb28", "__AVR_AVR16EB28__", "103", 1},
398+
{"avr16eb32", "__AVR_AVR16EB32__", "103", 1},
399+
{"avr16ea28", "__AVR_AVR16EA28__", "103", 1},
400+
{"avr16ea32", "__AVR_AVR16EA32__", "103", 1},
401+
{"avr16ea48", "__AVR_AVR16EA48__", "103", 1},
402+
{"avr32ea28", "__AVR_AVR32EA28__", "103", 1},
403+
{"avr32ea32", "__AVR_AVR32EA32__", "103", 1},
404+
{"avr32ea48", "__AVR_AVR32EA48__", "103", 1},
405+
{"avr32sd20", "__AVR_AVR32SD20__", "103", 1},
406+
{"avr32sd28", "__AVR_AVR32SD28__", "103", 1},
407+
{"avr32sd32", "__AVR_AVR32SD32__", "103", 1},
408+
{"avr128da28", "__AVR_AVR128DA28__", "104", 2},
409+
{"avr128da32", "__AVR_AVR128DA32__", "104", 2},
410+
{"avr128da48", "__AVR_AVR128DA48__", "104", 2},
411+
{"avr128da64", "__AVR_AVR128DA64__", "104", 2},
412+
{"avr128db28", "__AVR_AVR128DB28__", "104", 2},
413+
{"avr128db32", "__AVR_AVR128DB32__", "104", 2},
414+
{"avr128db48", "__AVR_AVR128DB48__", "104", 2},
415+
{"avr128db64", "__AVR_AVR128DB64__", "104", 2},
347416
};
348417

349418
} // namespace targets

clang/lib/CodeGen/CGBuiltin.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#include "CGDebugInfo.h"
1818
#include "CGObjCRuntime.h"
1919
#include "CGOpenCLRuntime.h"
20-
#include "CGPointerAuthInfo.h"
2120
#include "CGRecordLayout.h"
2221
#include "CGValue.h"
2322
#include "CodeGenFunction.h"

clang/lib/CodeGen/CGHLSLRuntime.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
#include "llvm/Support/Alignment.h"
3636
#include "llvm/Support/ErrorHandling.h"
3737
#include "llvm/Support/FormatVariadic.h"
38-
#include <utility>
3938

4039
using namespace clang;
4140
using namespace CodeGen;

clang/lib/Driver/ToolChains/AVR.cpp

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,8 +326,78 @@ constexpr struct {
326326
{"attiny1624", "avrxmega3", "avrxmega3", 0x803800},
327327
{"attiny1626", "avrxmega3", "avrxmega3", 0x803800},
328328
{"attiny1627", "avrxmega3", "avrxmega3", 0x803800},
329+
{"attiny3224", "avrxmega3", "avrxmega3", 0x803400},
330+
{"attiny3226", "avrxmega3", "avrxmega3", 0x803400},
331+
{"attiny3227", "avrxmega3", "avrxmega3", 0x803400},
329332
{"attiny3216", "avrxmega3", "avrxmega3", 0x803800},
330333
{"attiny3217", "avrxmega3", "avrxmega3", 0x803800},
334+
335+
// gcc 14 additions:
336+
337+
{"avr64da28", "avrxmega2", "avrxmega2", 0x806000},
338+
{"avr64da32", "avrxmega2", "avrxmega2", 0x806000},
339+
{"avr64da48", "avrxmega2", "avrxmega2", 0x806000},
340+
{"avr64da64", "avrxmega2", "avrxmega2", 0x806000},
341+
{"avr64db28", "avrxmega2", "avrxmega2", 0x806000},
342+
{"avr64db32", "avrxmega2", "avrxmega2", 0x806000},
343+
{"avr64db48", "avrxmega2", "avrxmega2", 0x806000},
344+
{"avr64db64", "avrxmega2", "avrxmega2", 0x806000},
345+
{"avr64dd14", "avrxmega2", "avrxmega2", 0x806000},
346+
{"avr64dd20", "avrxmega2", "avrxmega2", 0x806000},
347+
{"avr64dd28", "avrxmega2", "avrxmega2", 0x806000},
348+
{"avr64dd32", "avrxmega2", "avrxmega2", 0x806000},
349+
{"avr64du28", "avrxmega2", "avrxmega2", 0x806000},
350+
{"avr64du32", "avrxmega2", "avrxmega2", 0x806000},
351+
{"avr64ea28", "avrxmega2", "avrxmega2", 0x806800},
352+
{"avr64ea32", "avrxmega2", "avrxmega2", 0x806800},
353+
{"avr64ea48", "avrxmega2", "avrxmega2", 0x806800},
354+
{"avr64sd28", "avrxmega2", "avrxmega2", 0x806000},
355+
{"avr64sd32", "avrxmega2", "avrxmega2", 0x806000},
356+
{"avr64sd48", "avrxmega2", "avrxmega2", 0x806000},
357+
358+
{"avr16dd20", "avrxmega3", "avrxmega3", 0x807800},
359+
{"avr16dd28", "avrxmega3", "avrxmega3", 0x807800},
360+
{"avr16dd32", "avrxmega3", "avrxmega3", 0x807800},
361+
{"avr16du14", "avrxmega3", "avrxmega3", 0x807800},
362+
{"avr16du20", "avrxmega3", "avrxmega3", 0x807800},
363+
{"avr16du28", "avrxmega3", "avrxmega3", 0x807800},
364+
{"avr16du32", "avrxmega3", "avrxmega3", 0x807800},
365+
{"avr32da28", "avrxmega3", "avrxmega3", 0x807000},
366+
{"avr32da32", "avrxmega3", "avrxmega3", 0x807000},
367+
{"avr32da48", "avrxmega3", "avrxmega3", 0x807000},
368+
{"avr32db28", "avrxmega3", "avrxmega3", 0x807000},
369+
{"avr32db32", "avrxmega3", "avrxmega3", 0x807000},
370+
{"avr32db48", "avrxmega3", "avrxmega3", 0x807000},
371+
{"avr32dd14", "avrxmega3", "avrxmega3", 0x807000},
372+
{"avr32dd20", "avrxmega3", "avrxmega3", 0x807000},
373+
{"avr32dd28", "avrxmega3", "avrxmega3", 0x807000},
374+
{"avr32dd32", "avrxmega3", "avrxmega3", 0x807000},
375+
{"avr32du14", "avrxmega3", "avrxmega3", 0x807000},
376+
{"avr32du20", "avrxmega3", "avrxmega3", 0x807000},
377+
{"avr32du28", "avrxmega3", "avrxmega3", 0x807000},
378+
{"avr32du32", "avrxmega3", "avrxmega3", 0x807000},
379+
{"avr16eb14", "avrxmega3", "avrxmega3", 0x807800},
380+
{"avr16eb20", "avrxmega3", "avrxmega3", 0x807800},
381+
{"avr16eb28", "avrxmega3", "avrxmega3", 0x807800},
382+
{"avr16eb32", "avrxmega3", "avrxmega3", 0x807800},
383+
{"avr16ea28", "avrxmega3", "avrxmega3", 0x807800},
384+
{"avr16ea32", "avrxmega3", "avrxmega3", 0x807800},
385+
{"avr16ea48", "avrxmega3", "avrxmega3", 0x807800},
386+
{"avr32ea28", "avrxmega3", "avrxmega3", 0x807000},
387+
{"avr32ea32", "avrxmega3", "avrxmega3", 0x807000},
388+
{"avr32ea48", "avrxmega3", "avrxmega3", 0x807000},
389+
{"avr32sd20", "avrxmega3", "avrxmega3", 0x807000},
390+
{"avr32sd28", "avrxmega3", "avrxmega3", 0x807000},
391+
{"avr32sd32", "avrxmega3", "avrxmega3", 0x807000},
392+
{"avr128da28", "avrxmega4", "avrxmega4", 0x804000},
393+
{"avr128da32", "avrxmega4", "avrxmega4", 0x804000},
394+
{"avr128da48", "avrxmega4", "avrxmega4", 0x804000},
395+
{"avr128da64", "avrxmega4", "avrxmega4", 0x804000},
396+
{"avr128db28", "avrxmega4", "avrxmega4", 0x804000},
397+
{"avr128db32", "avrxmega4", "avrxmega4", 0x804000},
398+
{"avr128db48", "avrxmega4", "avrxmega4", 0x804000},
399+
{"avr128db64", "avrxmega4", "avrxmega4", 0x804000},
400+
331401
};
332402

333403
std::string GetMCUSubPath(StringRef MCUName) {

0 commit comments

Comments
 (0)