Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
81c69e1
Bump version to 22.1.7
dyung May 19, 2026
e624f12
[CoroSplit] Never collect allocas used by catchpad into frame (#186728)
NewSigma Mar 25, 2026
823afe0
Reland [C++20] [Modules] Don't profiling the callee of CXXFoldExpr (#…
ChuanqiXu9 May 8, 2026
4d5dffb
[ELF] Initialize Symbol fields in the constructor instead of via mems…
MaskRay May 16, 2026
6e5effc
[LoongArch] Revert "Add patterns to support vector type average instr…
heiher May 20, 2026
8798085
[libc] Demote compiler check error to a warning (#198033)
jhuber6 May 18, 2026
48967cc
build: adjust LLDB and clang library naming on Windows (#185084)
compnerd Mar 10, 2026
ad9524f
[PowerPC] Fix i128 vcmpequb optimization for loads with range metadat…
amy-kwan May 17, 2026
6ac6877
[X86] Add test coverage for #137422 (#182832)
RKSimon Feb 23, 2026
c43c9b4
[X86] lowerV64I8Shuffle - prefer VPERMV3 byte shuffles to OR(PSHUFB,P…
RKSimon Feb 23, 2026
6db0725
[X86] lowerV64I8Shuffle - avoid lowerShuffleAsRepeatedMaskAndLanePerm…
RKSimon Feb 24, 2026
294ae8d
[PowerPC] Drop invalid range metadata when lowering i64 load to fp in…
amy-kwan May 27, 2026
a760d7c
[LLD] [COFF] Fix handling of immediates in ARM64_SECREL_HIGH12A (#200…
mstorsjo May 28, 2026
2615295
[libc++] Fix multi{map,set}::extract not returning the first matching…
philnik777 May 28, 2026
a2b7790
[SystemZ] Fix off-by-one error in backend (#200141)
dominik-steenken May 29, 2026
a255c1e
[WebAssembly] Avoid crash in LateEHPrepare with empty cleanup pads (#…
dschuff May 29, 2026
ec9ab9d
Merge tag 'llvmorg-22.1.7' into rustc/22.1-2026-05-19
daltenty Jun 12, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion clang/lib/AST/StmtProfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2369,7 +2369,26 @@ void StmtProfiler::VisitMaterializeTemporaryExpr(
}

void StmtProfiler::VisitCXXFoldExpr(const CXXFoldExpr *S) {
VisitExpr(S);
VisitStmtNoChildren(S);
// The callee sub-expression is not part of how the expression is written,
// so it's not added to the profile.
//
// Example:
// template <typename... T> requires ((sizeof(T) > 0) && ...) void f() {}
// class A;
// void operator&&(A, A);
// template <typename... T> requires ((sizeof(T) > 0) && ...) void f() {}
//
// Both definitions have identically written fold expressions, but semantic
// analysis adds the overloaded operator to the second one.
if (S->getLHS())
Visit(S->getLHS());
else
ID.AddInteger(0);
if (S->getRHS())
Visit(S->getRHS());
else
ID.AddInteger(0);
ID.AddInteger(S->getOperator());
}

Expand Down
79 changes: 0 additions & 79 deletions clang/test/Modules/polluted-operator.cppm

This file was deleted.

6 changes: 6 additions & 0 deletions clang/test/SemaCXX/GH190333.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// RUN: %clang_cc1 -std=c++20 -fsyntax-only -verify %s

template <typename... T> requires ((sizeof(T) > 0) && ...) void f() {} // expected-note{{previous definition is here}}
class A;
void operator&&(A, A);
template <typename... T> requires ((sizeof(T) > 0) && ...) void f() {} // expected-error{{redefinition of 'f'}}
2 changes: 1 addition & 1 deletion clang/tools/libclang/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ if (MSVC AND ENABLE_SHARED AND ENABLE_STATIC)
unset(ENABLE_STATIC)
endif()

if(MSVC)
if(WIN32 AND NOT MINGW)
set(output_name "libclang")
else()
set(output_name "clang")
Expand Down
2 changes: 1 addition & 1 deletion cmake/Modules/LLVMVersion.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if(NOT DEFINED LLVM_VERSION_MINOR)
set(LLVM_VERSION_MINOR 1)
endif()
if(NOT DEFINED LLVM_VERSION_PATCH)
set(LLVM_VERSION_PATCH 6)
set(LLVM_VERSION_PATCH 7)
endif()
if(NOT DEFINED LLVM_VERSION_SUFFIX)
set(LLVM_VERSION_SUFFIX)
Expand Down
2 changes: 1 addition & 1 deletion libc/cmake/modules/prepare_libc_gpu_build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ endif()
set(req_ver "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}")
if(LLVM_VERSION_MAJOR AND NOT (CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang" AND
${CMAKE_CXX_COMPILER_VERSION} VERSION_EQUAL "${req_ver}"))
message(FATAL_ERROR "Cannot build libc for GPU. CMake compiler "
message(WARNING "libc for GPU requires an up-to-date clang. CMake compiler "
"'${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}' "
" is not 'Clang ${req_ver}'.")
endif()
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__config
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
// _LIBCPP_VERSION represents the version of libc++, which matches the version of LLVM.
// Given a LLVM release LLVM XX.YY.ZZ (e.g. LLVM 17.0.1 == 17.00.01), _LIBCPP_VERSION is
// defined to XXYYZZ.
# define _LIBCPP_VERSION 220106
# define _LIBCPP_VERSION 220107

# define _LIBCPP_CONCAT_IMPL(_X, _Y) _X##_Y
# define _LIBCPP_CONCAT(_X, _Y) _LIBCPP_CONCAT_IMPL(_X, _Y)
Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__tree
Original file line number Diff line number Diff line change
Expand Up @@ -2026,8 +2026,8 @@ __tree<_Tp, _Compare, _Allocator>::__node_handle_insert_unique(const_iterator __
template <class _Tp, class _Compare, class _Allocator>
template <class _NodeHandle>
_LIBCPP_HIDE_FROM_ABI _NodeHandle __tree<_Tp, _Compare, _Allocator>::__node_handle_extract(key_type const& __key) {
iterator __it = find(__key);
if (__it == end())
iterator __it = __lower_bound_multi(__key);
if (__it == end() || __value_comp_(__key, *__it))
return _NodeHandle();
return __node_handle_extract<_NodeHandle>(__it);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,19 @@ int main(int, char**) {
test(m, std::begin(keys), std::end(keys));
}

{ // Check that the first element is returned
std::multimap<int, int> m = {{1, 1}, {1, 2}, {1, 3}};
auto ptr = std::addressof(m.begin()->first);
auto res = m.extract(1);
assert(std::addressof(res.key()) == ptr);
}

{ // Check that no element is returned if there is no match
std::multimap<int, int> m = {{1, 1}, {2, 2}, {3, 3}, {4, 4}, {5, 5}, {6, 6}};
auto res = m.extract(0);
assert(!res);
}

{
std::multimap<Counter<int>, Counter<int>> m = {{1, 1}, {2, 2}, {3, 3}, {4, 4}, {5, 5}, {6, 6}};
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,19 @@ int main(int, char**) {
test(m, std::begin(keys), std::end(keys));
}

{ // Check that the first element is returned
std::multiset<int> m = {1, 1, 1};
auto ptr = std::addressof(*m.begin());
auto res = m.extract(1);
assert(std::addressof(res.value()) == ptr);
}

{ // Check that no element is returned if there is no match
std::multiset<int> m = {1, 2, 3};
auto res = m.extract(0);
assert(!res);
}

{
std::multiset<Counter<int>> m = {1, 2, 3, 4, 5, 6};
{
Expand Down
9 changes: 6 additions & 3 deletions lld/COFF/Chunks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,13 +300,16 @@ static void applySecRelHigh12A(const SectionChunk *sec, uint8_t *off,
OutputSection *os, uint64_t s) {
if (!checkSecRel(sec, os))
return;
uint64_t secRel = (s - os->getRVA()) >> 12;
if (0xfff < secRel) {
uint32_t orig = read32le(off);
uint64_t imm = (orig >> 10) & 0xFFF;
orig &= ~(0xFFF << 10);
imm = (s + imm - os->getRVA()) >> 12;
if (0xfff < imm) {
error("overflow in SECREL_HIGH12A relocation in section: " +
sec->getSectionName());
return;
}
applyArm64Imm(off, secRel & 0xfff, 0);
write32le(off, orig | (imm << 10));
}

static void applySecRelLdr(const SectionChunk *sec, uint8_t *off,
Expand Down
2 changes: 0 additions & 2 deletions lld/ELF/InputFiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1261,7 +1261,6 @@ void ObjFile<ELFT>::initSectionsAndLocalSyms(bool ignoreComdats) {
if (!firstGlobal)
return;
SymbolUnion *locals = makeThreadLocalN<SymbolUnion>(firstGlobal);
memset(locals, 0, sizeof(SymbolUnion) * firstGlobal);

ArrayRef<Elf_Sym> eSyms = this->getELFSyms<ELFT>();
for (size_t i = 0, end = firstGlobal; i != end; ++i) {
Expand Down Expand Up @@ -1297,7 +1296,6 @@ void ObjFile<ELFT>::initSectionsAndLocalSyms(bool ignoreComdats) {
else
new (symbols[i]) Defined(ctx, this, name, STB_LOCAL, eSym.st_other, type,
eSym.st_value, eSym.st_size, sec);
symbols[i]->partition = 1;
symbols[i]->isUsedInRegularObj = true;
}
}
Expand Down
20 changes: 12 additions & 8 deletions lld/ELF/Symbols.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class Symbol {
uint8_t symbolKind;

// The partition whose dynamic symbol table contains this symbol's definition.
uint8_t partition;
uint8_t partition = 1;

// True if this symbol is preemptible at load time.
//
Expand Down Expand Up @@ -242,8 +242,13 @@ class Symbol {
Symbol(Kind k, InputFile *file, StringRef name, uint8_t binding,
uint8_t stOther, uint8_t type)
: file(file), nameData(name.data()), nameSize(name.size()), type(type),
binding(binding), stOther(stOther), symbolKind(k), ltoCanOmit(false),
archSpecificBit(false) {}
binding(binding), stOther(stOther), symbolKind(k), isPreemptible(false),
isUsedInRegularObj(false), isExported(false), ltoCanOmit(false),
traced(false), hasVersionSuffix(false), isInIplt(false),
gotInIgot(false), folded(false), archSpecificBit(false),
scriptDefined(false), dsoDefined(false), dsoProtected(false),
versionScriptAssigned(false), thunkAccessed(false),
inDynamicList(false), referenced(false), referencedAfterWrap(false) {}

void overwrite(Symbol &sym, Kind k) const {
if (sym.traced)
Expand Down Expand Up @@ -302,20 +307,20 @@ class Symbol {

// Temporary flags used to communicate which symbol entries need PLT and GOT
// entries during postScanRelocations();
std::atomic<uint16_t> flags;
std::atomic<uint16_t> flags = 0;

// A ctx.symAux index used to access GOT/PLT entry indexes. This is allocated
// in postScanRelocations().
uint32_t auxIdx;
uint32_t dynsymIndex;
uint32_t auxIdx = 0;
uint32_t dynsymIndex = 0;

// If `file` is SharedFile (for SharedSymbol or copy-relocated Defined), this
// represents the Verdef index within the input DSO, which will be converted
// to a Verneed index in the output. Otherwise, this represents the Verdef
// index (VER_NDX_LOCAL, VER_NDX_GLOBAL, or a named version).
// VER_NDX_LOCAL indicates a defined symbol that has been localized by a
// version script's local: directive or --exclude-libs.
uint16_t versionId;
uint16_t versionId = 0;
LLVM_PREFERRED_TYPE(bool)
uint8_t versionScriptAssigned : 1;

Expand Down Expand Up @@ -526,7 +531,6 @@ union SymbolUnion {

template <typename... T> Defined *makeDefined(T &&...args) {
auto *sym = getSpecificAllocSingleton<SymbolUnion>().Allocate();
memset(sym, 0, sizeof(Symbol));
auto &s = *new (reinterpret_cast<Defined *>(sym)) Defined(std::forward<T>(args)...);
return &s;
}
Expand Down
10 changes: 5 additions & 5 deletions lld/test/COFF/arm64-relocs-imports.test
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
# BEFORE: 74: 00000000 udf #0
# BEFORE: 78: 00000001 udf #1
# BEFORE: 7c: 00000001 udf #1
# BEFORE: 80: 91000000 add x0, x0, #0
# BEFORE: 84: 91400000 add x0, x0, #0, lsl #12
# BEFORE: 80: 913c0000 add x0, x0, #3840
# BEFORE: 84: 917c0000 add x0, x0, #3840, lsl #12
# BEFORE: 88: f9400000 ldr x0, [x0]
# BEFORE: 8c: 00000001 udf #1
# BEFORE: 90: 30091a20 adr x0, 0x123d5
Expand Down Expand Up @@ -83,8 +83,8 @@
# AFTER: 140001074: 00000001 udf #1
# AFTER: 140001078: 00002009 udf #8201
# AFTER: 14000107c: 00000009 udf #9
# AFTER: 140001080: 910e2000 add x0, x0, #904
# AFTER: 140001084: 91400400 add x0, x0, #1, lsl #12
# AFTER: 140001080: 910a2000 add x0, x0, #648
# AFTER: 140001084: 91400800 add x0, x0, #2, lsl #12
# AFTER: 140001088: f941c400 ldr x0, [x0, #904]
# AFTER: 14000108c: 00000003 udf #3
# AFTER: 140001090: 300995e0 adr x0, 0x14001434d
Expand All @@ -104,7 +104,7 @@ sections:
- Name: .text
Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
Alignment: 4
SectionData: FE0F1FF80000009000080091000000940001403900014079000140B9000140F90001003900010079000100B9000100F90001403D0001407D000140BD000140FD0001C03D0001003D0001007D000100BD000100FD0001803D000540F9201A01B000FC4FF9E0031F2AFE0741F8C0035FD6080000000000000001000000010000000000009100004091000040f901000000201a093001000054000000360100000002008090
SectionData: FE0F1FF80000009000080091000000940001403900014079000140B9000140F90001003900010079000100B9000100F90001403D0001407D000140BD000140FD0001C03D0001003D0001007D000100BD000100FD0001803D000540F9201A01B000FC4FF9E0031F2AFE0741F8C0035FD60800000000000000010000000100000000003C9100007C91000040f901000000201a093001000054000000360100000002008090
Relocations:
- VirtualAddress: 4
SymbolName: .Lstr
Expand Down
2 changes: 1 addition & 1 deletion lldb/source/API/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ elseif (LLDB_EXPORT_ALL_SYMBOLS)
add_llvm_symbol_exports(liblldb ${exported_symbol_file})
endif()

if (NOT MSVC)
if(NOT WIN32 OR MINGW)
set_target_properties(liblldb
PROPERTIES
OUTPUT_NAME lldb
Expand Down
3 changes: 3 additions & 0 deletions llvm/docs/Coroutines.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2252,4 +2252,7 @@ Areas Requiring Attention
#. Make required changes to make sure that coroutine optimizations work with
LTO.

#. In Windows EH, exception objects must be allocated on the stack (see :ref:wineh for details).
We identify an exception object as an alloca that has `catchpad` users.

#. More tests, more tests, more tests
18 changes: 0 additions & 18 deletions llvm/lib/Target/LoongArch/LoongArchLASXInstrInfo.td
Original file line number Diff line number Diff line change
Expand Up @@ -2037,24 +2037,6 @@ def : Pat<(v4i32(fp_to_uint v4f64:$vj)),
(XVFTINTRZ_LU_D v4f64:$vj)),
sub_128)>;

// XVAVG_{B/H/W/D/BU/HU/WU/DU}, XVAVGR_{B/H/W/D/BU/HU/WU/DU}
defm : VAvgPat<sra, "XVAVG_B", v32i8>;
defm : VAvgPat<sra, "XVAVG_H", v16i16>;
defm : VAvgPat<sra, "XVAVG_W", v8i32>;
defm : VAvgPat<sra, "XVAVG_D", v4i64>;
defm : VAvgPat<srl, "XVAVG_BU", v32i8>;
defm : VAvgPat<srl, "XVAVG_HU", v16i16>;
defm : VAvgPat<srl, "XVAVG_WU", v8i32>;
defm : VAvgPat<srl, "XVAVG_DU", v4i64>;
defm : VAvgrPat<sra, "XVAVGR_B", v32i8>;
defm : VAvgrPat<sra, "XVAVGR_H", v16i16>;
defm : VAvgrPat<sra, "XVAVGR_W", v8i32>;
defm : VAvgrPat<sra, "XVAVGR_D", v4i64>;
defm : VAvgrPat<srl, "XVAVGR_BU", v32i8>;
defm : VAvgrPat<srl, "XVAVGR_HU", v16i16>;
defm : VAvgrPat<srl, "XVAVGR_WU", v8i32>;
defm : VAvgrPat<srl, "XVAVGR_DU", v4i64>;

// abs
def : Pat<(abs v32i8:$xj), (XVSIGNCOV_B v32i8:$xj, v32i8:$xj)>;
def : Pat<(abs v16i16:$xj), (XVSIGNCOV_H v16i16:$xj, v16i16:$xj)>;
Expand Down
Loading
Loading