Skip to content

Commit 039d374

Browse files
author
z1_cciauto
authored
merge main into amd-staging (llvm#3563)
2 parents a7976c0 + afe3924 commit 039d374

File tree

130 files changed

+3995
-2000
lines changed

Some content is hidden

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

130 files changed

+3995
-2000
lines changed

.github/workflows/libcxx-build-and-test.yaml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ concurrency:
3636
jobs:
3737
stage1:
3838
if: github.repository_owner == 'llvm'
39-
runs-on: llvm-premerge-libcxx-runners
39+
runs-on: llvm-premerge-libcxx-next-runners
4040
continue-on-error: false
4141
strategy:
4242
fail-fast: false
@@ -47,8 +47,8 @@ jobs:
4747
'generic-cxx26',
4848
'generic-modules'
4949
]
50-
cc: [ 'clang-21' ]
51-
cxx: [ 'clang++-21' ]
50+
cc: [ 'clang-22' ]
51+
cxx: [ 'clang++-22' ]
5252
include:
5353
- config: 'generic-gcc'
5454
cc: 'gcc-15'
@@ -73,7 +73,7 @@ jobs:
7373
**/crash_diagnostics/*
7474
stage2:
7575
if: github.repository_owner == 'llvm'
76-
runs-on: llvm-premerge-libcxx-runners
76+
runs-on: llvm-premerge-libcxx-next-runners
7777
needs: [ stage1 ]
7878
continue-on-error: false
7979
strategy:
@@ -86,18 +86,18 @@ jobs:
8686
'generic-cxx20',
8787
'generic-cxx23'
8888
]
89-
cc: [ 'clang-21' ]
90-
cxx: [ 'clang++-21' ]
89+
cc: [ 'clang-22' ]
90+
cxx: [ 'clang++-22' ]
9191
include:
9292
- config: 'generic-gcc-cxx11'
9393
cc: 'gcc-15'
9494
cxx: 'g++-15'
95+
- config: 'generic-cxx26'
96+
cc: 'clang-21'
97+
cxx: 'clang++-21'
9598
- config: 'generic-cxx26'
9699
cc: 'clang-20'
97100
cxx: 'clang++-20'
98-
- config: 'generic-cxx26'
99-
cc: 'clang-19'
100-
cxx: 'clang++-19'
101101
steps:
102102
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
103103
- name: ${{ matrix.config }}
@@ -148,27 +148,27 @@ jobs:
148148
'generic-static',
149149
'bootstrapping-build'
150150
]
151-
machine: [ 'llvm-premerge-libcxx-runners' ]
151+
machine: [ 'llvm-premerge-libcxx-next-runners' ]
152152
include:
153153
- config: 'generic-cxx26'
154-
machine: llvm-premerge-libcxx-runners
154+
machine: llvm-premerge-libcxx-next-runners
155155
- config: 'generic-asan'
156-
machine: llvm-premerge-libcxx-runners
156+
machine: llvm-premerge-libcxx-next-runners
157157
- config: 'generic-tsan'
158-
machine: llvm-premerge-libcxx-runners
158+
machine: llvm-premerge-libcxx-next-runners
159159
- config: 'generic-ubsan'
160-
machine: llvm-premerge-libcxx-runners
160+
machine: llvm-premerge-libcxx-next-runners
161161
# Use a larger machine for MSAN to avoid timeout and memory allocation issues.
162162
- config: 'generic-msan'
163-
machine: llvm-premerge-libcxx-runners
163+
machine: llvm-premerge-libcxx-next-runners
164164
runs-on: ${{ matrix.machine }}
165165
steps:
166166
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
167167
- name: ${{ matrix.config }}
168168
run: libcxx/utils/ci/run-buildbot ${{ matrix.config }}
169169
env:
170-
CC: clang-21
171-
CXX: clang++-21
170+
CC: clang-22
171+
CXX: clang++-22
172172
- uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
173173
if: always()
174174
with:

clang/include/clang/Basic/BuiltinsX86.td

Lines changed: 0 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -945,10 +945,6 @@ let Features = "xop", Attributes = [NoThrow, Const, RequiredVectorWidth<128>] in
945945
def vphsubwd : X86Builtin<"_Vector<4, int>(_Vector<8, short>)">;
946946
def vphsubdq : X86Builtin<"_Vector<2, long long int>(_Vector<4, int>)">;
947947
def vpperm : X86Builtin<"_Vector<16, char>(_Vector<16, char>, _Vector<16, char>, _Vector<16, char>)">;
948-
def vprotb : X86Builtin<"_Vector<16, char>(_Vector<16, char>, _Vector<16, char>)">;
949-
def vprotw : X86Builtin<"_Vector<8, short>(_Vector<8, short>, _Vector<8, short>)">;
950-
def vprotd : X86Builtin<"_Vector<4, int>(_Vector<4, int>, _Vector<4, int>)">;
951-
def vprotq : X86Builtin<"_Vector<2, long long int>(_Vector<2, long long int>, _Vector<2, long long int>)">;
952948
def vprotbi : X86Builtin<"_Vector<16, char>(_Vector<16, char>, _Constant char)">;
953949
def vprotwi : X86Builtin<"_Vector<8, short>(_Vector<8, short>, _Constant char)">;
954950
def vprotdi : X86Builtin<"_Vector<4, int>(_Vector<4, int>, _Constant char)">;
@@ -1882,78 +1878,6 @@ let Features = "avx512vbmi2,evex512", Attributes = [NoThrow, Const, RequiredVect
18821878
def vpshldw512 : X86Builtin<"_Vector<32, short>(_Vector<32, short>, _Vector<32, short>, _Constant int)">;
18831879
}
18841880

1885-
let Features = "avx512vl,avx512vbmi2", Attributes = [NoThrow, Const, RequiredVectorWidth<128>] in {
1886-
def vpshldvd128 : X86Builtin<"_Vector<4, int>(_Vector<4, int>, _Vector<4, int>, _Vector<4, int>)">;
1887-
}
1888-
1889-
let Features = "avx512vl,avx512vbmi2", Attributes = [NoThrow, Const, RequiredVectorWidth<256>] in {
1890-
def vpshldvd256 : X86Builtin<"_Vector<8, int>(_Vector<8, int>, _Vector<8, int>, _Vector<8, int>)">;
1891-
}
1892-
1893-
let Features = "avx512vbmi2,evex512", Attributes = [NoThrow, Const, RequiredVectorWidth<512>] in {
1894-
def vpshldvd512 : X86Builtin<"_Vector<16, int>(_Vector<16, int>, _Vector<16, int>, _Vector<16, int>)">;
1895-
}
1896-
1897-
let Features = "avx512vl,avx512vbmi2", Attributes = [NoThrow, Const, RequiredVectorWidth<128>] in {
1898-
def vpshldvq128 : X86Builtin<"_Vector<2, long long int>(_Vector<2, long long int>, _Vector<2, long long int>, _Vector<2, long long int>)">;
1899-
}
1900-
1901-
let Features = "avx512vl,avx512vbmi2", Attributes = [NoThrow, Const, RequiredVectorWidth<256>] in {
1902-
def vpshldvq256 : X86Builtin<"_Vector<4, long long int>(_Vector<4, long long int>, _Vector<4, long long int>, _Vector<4, long long int>)">;
1903-
}
1904-
1905-
let Features = "avx512vbmi2,evex512", Attributes = [NoThrow, Const, RequiredVectorWidth<512>] in {
1906-
def vpshldvq512 : X86Builtin<"_Vector<8, long long int>(_Vector<8, long long int>, _Vector<8, long long int>, _Vector<8, long long int>)">;
1907-
}
1908-
1909-
let Features = "avx512vl,avx512vbmi2", Attributes = [NoThrow, Const, RequiredVectorWidth<128>] in {
1910-
def vpshldvw128 : X86Builtin<"_Vector<8, short>(_Vector<8, short>, _Vector<8, short>, _Vector<8, short>)">;
1911-
}
1912-
1913-
let Features = "avx512vl,avx512vbmi2", Attributes = [NoThrow, Const, RequiredVectorWidth<256>] in {
1914-
def vpshldvw256 : X86Builtin<"_Vector<16, short>(_Vector<16, short>, _Vector<16, short>, _Vector<16, short>)">;
1915-
}
1916-
1917-
let Features = "avx512vbmi2,evex512", Attributes = [NoThrow, Const, RequiredVectorWidth<512>] in {
1918-
def vpshldvw512 : X86Builtin<"_Vector<32, short>(_Vector<32, short>, _Vector<32, short>, _Vector<32, short>)">;
1919-
}
1920-
1921-
let Features = "avx512vl,avx512vbmi2", Attributes = [NoThrow, Const, RequiredVectorWidth<128>] in {
1922-
def vpshrdvd128 : X86Builtin<"_Vector<4, int>(_Vector<4, int>, _Vector<4, int>, _Vector<4, int>)">;
1923-
}
1924-
1925-
let Features = "avx512vl,avx512vbmi2", Attributes = [NoThrow, Const, RequiredVectorWidth<256>] in {
1926-
def vpshrdvd256 : X86Builtin<"_Vector<8, int>(_Vector<8, int>, _Vector<8, int>, _Vector<8, int>)">;
1927-
}
1928-
1929-
let Features = "avx512vbmi2,evex512", Attributes = [NoThrow, Const, RequiredVectorWidth<512>] in {
1930-
def vpshrdvd512 : X86Builtin<"_Vector<16, int>(_Vector<16, int>, _Vector<16, int>, _Vector<16, int>)">;
1931-
}
1932-
1933-
let Features = "avx512vl,avx512vbmi2", Attributes = [NoThrow, Const, RequiredVectorWidth<128>] in {
1934-
def vpshrdvq128 : X86Builtin<"_Vector<2, long long int>(_Vector<2, long long int>, _Vector<2, long long int>, _Vector<2, long long int>)">;
1935-
}
1936-
1937-
let Features = "avx512vl,avx512vbmi2", Attributes = [NoThrow, Const, RequiredVectorWidth<256>] in {
1938-
def vpshrdvq256 : X86Builtin<"_Vector<4, long long int>(_Vector<4, long long int>, _Vector<4, long long int>, _Vector<4, long long int>)">;
1939-
}
1940-
1941-
let Features = "avx512vbmi2,evex512", Attributes = [NoThrow, Const, RequiredVectorWidth<512>] in {
1942-
def vpshrdvq512 : X86Builtin<"_Vector<8, long long int>(_Vector<8, long long int>, _Vector<8, long long int>, _Vector<8, long long int>)">;
1943-
}
1944-
1945-
let Features = "avx512vl,avx512vbmi2", Attributes = [NoThrow, Const, RequiredVectorWidth<128>] in {
1946-
def vpshrdvw128 : X86Builtin<"_Vector<8, short>(_Vector<8, short>, _Vector<8, short>, _Vector<8, short>)">;
1947-
}
1948-
1949-
let Features = "avx512vl,avx512vbmi2", Attributes = [NoThrow, Const, RequiredVectorWidth<256>] in {
1950-
def vpshrdvw256 : X86Builtin<"_Vector<16, short>(_Vector<16, short>, _Vector<16, short>, _Vector<16, short>)">;
1951-
}
1952-
1953-
let Features = "avx512vbmi2,evex512", Attributes = [NoThrow, Const, RequiredVectorWidth<512>] in {
1954-
def vpshrdvw512 : X86Builtin<"_Vector<32, short>(_Vector<32, short>, _Vector<32, short>, _Vector<32, short>)">;
1955-
}
1956-
19571881
let Features = "avx512vl,avx512vbmi2", Attributes = [NoThrow, Const, RequiredVectorWidth<128>] in {
19581882
def vpshrdd128 : X86Builtin<"_Vector<4, int>(_Vector<4, int>, _Vector<4, int>, _Constant int)">;
19591883
}
@@ -2165,28 +2089,10 @@ let Features = "avx512vl", Attributes = [NoThrow, Const, RequiredVectorWidth<256
21652089
}
21662090

21672091
let Features = "avx512f,evex512", Attributes = [NoThrow, Const, RequiredVectorWidth<512>] in {
2168-
def prolvd512 : X86Builtin<"_Vector<16, int>(_Vector<16, int>, _Vector<16, int>)">;
2169-
def prolvq512 : X86Builtin<"_Vector<8, long long int>(_Vector<8, long long int>, _Vector<8, long long int>)">;
21702092
def prord512 : X86Builtin<"_Vector<16, int>(_Vector<16, int>, _Constant int)">;
21712093
def prorq512 : X86Builtin<"_Vector<8, long long int>(_Vector<8, long long int>, _Constant int)">;
21722094
}
21732095

2174-
let Features = "avx512vl", Attributes = [NoThrow, Const, RequiredVectorWidth<128>] in {
2175-
def prolvd128 : X86Builtin<"_Vector<4, int>(_Vector<4, int>, _Vector<4, int>)">;
2176-
}
2177-
2178-
let Features = "avx512vl", Attributes = [NoThrow, Const, RequiredVectorWidth<256>] in {
2179-
def prolvd256 : X86Builtin<"_Vector<8, int>(_Vector<8, int>, _Vector<8, int>)">;
2180-
}
2181-
2182-
let Features = "avx512vl", Attributes = [NoThrow, Const, RequiredVectorWidth<128>] in {
2183-
def prolvq128 : X86Builtin<"_Vector<2, long long int>(_Vector<2, long long int>, _Vector<2, long long int>)">;
2184-
}
2185-
2186-
let Features = "avx512vl", Attributes = [NoThrow, Const, RequiredVectorWidth<256>] in {
2187-
def prolvq256 : X86Builtin<"_Vector<4, long long int>(_Vector<4, long long int>, _Vector<4, long long int>)">;
2188-
}
2189-
21902096
let Features = "avx512vl", Attributes = [NoThrow, Const, RequiredVectorWidth<128>] in {
21912097
def prord128 : X86Builtin<"_Vector<4, int>(_Vector<4, int>, _Constant int)">;
21922098
}
@@ -2203,27 +2109,6 @@ let Features = "avx512vl", Attributes = [NoThrow, Const, RequiredVectorWidth<256
22032109
def prorq256 : X86Builtin<"_Vector<4, long long int>(_Vector<4, long long int>, _Constant int)">;
22042110
}
22052111

2206-
let Features = "avx512f,evex512", Attributes = [NoThrow, Const, RequiredVectorWidth<512>] in {
2207-
def prorvd512 : X86Builtin<"_Vector<16, int>(_Vector<16, int>, _Vector<16, int>)">;
2208-
def prorvq512 : X86Builtin<"_Vector<8, long long int>(_Vector<8, long long int>, _Vector<8, long long int>)">;
2209-
}
2210-
2211-
let Features = "avx512vl", Attributes = [NoThrow, Const, RequiredVectorWidth<128>] in {
2212-
def prorvd128 : X86Builtin<"_Vector<4, int>(_Vector<4, int>, _Vector<4, int>)">;
2213-
}
2214-
2215-
let Features = "avx512vl", Attributes = [NoThrow, Const, RequiredVectorWidth<256>] in {
2216-
def prorvd256 : X86Builtin<"_Vector<8, int>(_Vector<8, int>, _Vector<8, int>)">;
2217-
}
2218-
2219-
let Features = "avx512vl", Attributes = [NoThrow, Const, RequiredVectorWidth<128>] in {
2220-
def prorvq128 : X86Builtin<"_Vector<2, long long int>(_Vector<2, long long int>, _Vector<2, long long int>)">;
2221-
}
2222-
2223-
let Features = "avx512vl", Attributes = [NoThrow, Const, RequiredVectorWidth<256>] in {
2224-
def prorvq256 : X86Builtin<"_Vector<4, long long int>(_Vector<4, long long int>, _Vector<4, long long int>)">;
2225-
}
2226-
22272112
let Features = "avx512bw,evex512", Attributes = [NoThrow, Const, RequiredVectorWidth<512>] in {
22282113
def pshufhw512 : X86Builtin<"_Vector<32, short>(_Vector<32, short>, _Constant int)">;
22292114
def pshuflw512 : X86Builtin<"_Vector<32, short>(_Vector<32, short>, _Constant int)">;

clang/include/clang/Basic/TokenKinds.h

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,20 @@ inline bool isStringLiteral(TokenKind K) {
9595
/// Return true if this is a "literal" kind, like a numeric
9696
/// constant, string, etc.
9797
inline bool isLiteral(TokenKind K) {
98-
return K == tok::numeric_constant || K == tok::char_constant ||
99-
K == tok::wide_char_constant || K == tok::utf8_char_constant ||
100-
K == tok::utf16_char_constant || K == tok::utf32_char_constant ||
101-
isStringLiteral(K) || K == tok::header_name || K == tok::binary_data;
98+
const bool isInLiteralRange =
99+
K >= tok::numeric_constant && K <= tok::utf32_string_literal;
100+
101+
#if !NDEBUG
102+
const bool isLiteralExplicit =
103+
K == tok::numeric_constant || K == tok::char_constant ||
104+
K == tok::wide_char_constant || K == tok::utf8_char_constant ||
105+
K == tok::utf16_char_constant || K == tok::utf32_char_constant ||
106+
isStringLiteral(K) || K == tok::header_name || K == tok::binary_data;
107+
assert(isInLiteralRange == isLiteralExplicit &&
108+
"TokenKind literals should be contiguous");
109+
#endif
110+
111+
return isInLiteralRange;
102112
}
103113

104114
/// Return true if this is any of tok::annot_* kinds.

0 commit comments

Comments
 (0)