568685 Commits

Author SHA1 Message Date
Vlad Serebrennikov
604e4adef0
[clang] Non-trivial fixes in C++ DR tests (#179813)
This is a follow-up to #179674, which applies various fixes across C++
DR tests uncovered by `-verify-directives` (#179835
).

Changes here serve double duty. First, they fix actual problems found by
`-verify-directives`, because I've been manually enforcing those rules
manually for quite a while. Second, they show typical problems and
possible solutions when you opt-in a test to use `-verify-directives`.
This PR focuses on interesting cases, as partial diagnostic matches,
which are trivial to fix, are fixed in boring #179674

Changes include:
1. Getting rid of instantiations at the end of TU that emit diagnostics:
either trigger them earlier, or move them to a separate file
2. Reordering of `expected-error` and `expected-note` to match the order
in which corresponding diagnsotics are emitted.
3. Eliminating leftover partial matches of diagnostic text
4. Removing some extension warnings, because C++ DR tests are not
interested in features backported to older language modes.
5. Fix for a hilarious case of CWG413 test, which was checking for a
note from a typo correction that happened in another test.
2026-02-10 21:09:20 +00:00
Sam Elliott
49c052363b
[RISCV] Use ADDD for GPR Pair Move with P (#180671) 2026-02-10 12:59:06 -08:00
Florian Hahn
5131186506
[VPlan] Use UTC to auto-generate more VPlan checks.
Update more VPlan tests to use auto-generated check lines via new UTC
support.
2026-02-10 20:56:05 +00:00
Alexey Bataev
78490acb32 [SLP]Support for zext i1 %x modeling as select %x, 1, 0
Model zext i1 %x to in as select i1 %x, in 1, in 0 in case, if there are
other select instructions, which can be combined into a bundle.

Fixes #178403

Recommit after revert in 993e1f66afcfe9da03bd813e669eada341b11d2f

Reviewers: hiraditya, RKSimon

Pull Request: https://github.com/llvm/llvm-project/pull/180635
2026-02-10 12:54:12 -08:00
Aiden Grossman
6e6f76026d [MLIR][OpenMP] Fix unused variable warning
7c07cb6542a0c5e4340e09a9a247e3e5123c6567 introduced a variable created
in an if statement that is only used in an assertion. Per the coding
guidelines, mark it [[maybe_unused]].
2026-02-10 20:40:29 +00:00
Stanislav Mekhanoshin
058cad9f82
Add "noconvergent" flag to MachineInstr::print() (#180818) 2026-02-10 12:37:40 -08:00
Craig Topper
f134b802ee
[RISCV] Refactor the MC layer SiFive VCIX classes. (#180433)
My initial goal was to name bits {19-15} as either rs1, vs1, or imm as
appropriate.

The VCIX instructions effectively have 3 properties that are combined:
the type of bits 19-15 (determined by funct3), how many vector registers
are sources (determined by funct6), and whether vd is a written or not
(determined by vm).

I found the VCIXInfo class very hard to read and understand. This patch
breaks it up into simpler steps and moves some properties to flags in
the existing VCIXType classs. A new VCIXRs1Info class is added to
contain the properties for bits 19-15. The VCIXInfo now combines the
properties from these 2 classes and the HaveOutputDst flag to create the
various things needed to build the final instruction. To reduce the
number of template arguments, the VCIXInfo is passed all the way down to
the base class.

Much of the refactoring in this patch was accomplished with AI. I have
looked at the diffs in the output tablegen files to verify it works as
expected. RISCVGenInstrInfo.inc only changes line number comments.
RISCVGenDisassembler.inc doesn't change at all as expected.
RISCVGenMCCodeEmitter.inc changes due to the different field names and
orders in the record.
2026-02-10 12:34:15 -08:00
Craig Topper
f668c9ff2b
[RISCV] Add (BSETI x0, 11) to isLoadImm for optimizeCondBranch (#180820)
optimizeCondBranch is looking for immediates that are 1 apart to rewrite
the branch by sharing a constant. BSETI x0, 11 can be used to produce
2048 which is one more than the largest positive constant produced by
addi.
2026-02-10 12:32:36 -08:00
Thibault Monnier
c322e374fe
[ADT][NFC] Remove else after return in APSInt.h (#180790)
Align with the LLVM coding standard:
https://llvm.org/docs/CodingStandards.html#don-t-use-else-after-a-return
2026-02-10 21:27:32 +01:00
RattataKing
d380b29a7c
[MLIR][Python] Remove partial LLVM APIs in python bindings (5/n) (#180644)
This PR continues work from
https://github.com/llvm/llvm-project/pull/178290
Added local helper functions to avoid dependency on LLVM APIs.

---------

Co-authored-by: Jakub Kuderski <kubakuderski@gmail.com>
2026-02-10 15:24:56 -05:00
Aiden Grossman
e678e00dd7
[ProfCheck] Exclude passes not in standard pipelines (#180814)
This patch excludes seven more passes by default (rather than in
profcheck-xfail.txt) that are not in standard pipelines. We should
eventually get to these, but for now we can punt them.
2026-02-10 12:18:21 -08:00
Utkarsh Saxena
3db01f0373
[LifetimeSafety] Remove "experimental" from option descriptions (#180723) 2026-02-10 21:09:11 +01:00
Joseph Huber
c9ee81a59e
[libc] Fix unit test dependency and respect LIBC_INCLUDE_BENCHMARKS (#180812)
Summary:
The unittest framework function is defined in another CMake file which
may not be present if the uesr disabled tests, provide a smaller version
here to keep this private. Also respesct the LIBC_INCLUDE_BENCHMARKS
variable.
2026-02-10 14:08:48 -06:00
hjagasiaAMD
4926bef3b7
[AMDGPU] Use enum instead of literal for MadFmaMixFP16Pats (#180802) 2026-02-10 14:08:12 -06:00
Fatih BAKIR
c703f5a163
[lld][Webassembly] Avoid a signed overflow on large sections (#178287)
wasm sections sizes are specified as u32s, and thus can be as large as
4GB. wasm-ld currently stores the offset into a section as an int32_t
which overflows on large sections and results in a crash. This change
makes it a int64_t to accommodate any valid wasm section and allow
catching even larger sections instead of wrapping around.

This PR fixes the issue by storing the offset as a int64_t, as well as
adding extra checks to handle un-encodeable sections to fail instead of
producing garbage wasm binaries, and also adds lit tests to make sure it
works. I confirmed the test fails on `main` but passes with this fix.

Fixes: #178286
2026-02-10 12:04:05 -08:00
Yury Plyakhin
81a8363ae3
[Offload][SYCL] Refactoring: get rid of newline separators (#180274)
Previously, kernel symbols in offload binaries for SYCL had to be stored
as newline-separated strings and we had to use llvm::join and
line_iterator. It was needed because Offload Binary v1 format did not
store string value sizes. It is not necessary with Offload Binary v2
format, which stores string value size and hence eliminates the need for
newline separators.
2026-02-10 12:01:13 -08:00
Peter Rong
c436838b64
Revert "[clang] Fix sema on ObjCLifetime conversion (#178524)" (#180811)
This reverts commit bc3b4462f06b988d2f5b5dec997a3bc9fcf518b6.
2026-02-10 11:42:39 -08:00
Changpeng Fang
12294021c3
[AMDGPU] Clean up VOP3PWMMA_Profile by removing XF32 related stuff (#180688)
XF32 is no longer supported in WMMA (the support was removed already)
2026-02-10 11:15:01 -08:00
vangthao95
d354ea6add
AMDGPU/GlobalISel: RegBankLegalize rules for buffer atomic cmpswap (#180666) 2026-02-10 11:11:38 -08:00
Sam Clegg
11c2613342
[WebAssembly] Add initial support for compact imports proposal (#176617)
This change adds initial support to libObject for reading compact
imports and support for writing compact imports in the linker.

There is minimal testing here since to tools like lllvm-readobj, and
obj2yaml don't currently report compact imports any differently.

See https://github.com/WebAssembly/compact-import-section
2026-02-10 10:57:45 -08:00
Marcos Maronas
ce94d63f0f
Make OpenCL an OSType rather than an EnvironmentType. (#170297)
OpenCL was added as an `EnvironmentType` in
https://github.com/llvm/llvm-project/pull/78655, but there is no
explanation as to why it was added as such, even after explicitly asking
in the PR
(https://github.com/llvm/llvm-project/pull/78655#issuecomment-2743162853).
This PR makes it an `OSType` instead, which feels more natural, and
updates tests accordingly.

---------

Co-authored-by: Marcos Maronas <marcos.maronas@intel.com>
2026-02-10 18:45:50 +00:00
Nerixyz
cdbe28887b
[LLDB] Set and verify paths of properties from tablegen (#179524)
In #168245, I attempted to dump the available settings to Markdown. That
required a full build of LLDB. However, to build the docs, only the swig
wrappers should need to be compiled. The comment was that we should be
able to use the definitions from the TableGen files.

Currently, the property definitions in don't have information about the
path where they will be available. They only contain a `Definition`
which groups properties, so they can be added to
`OptionValueProperties`.

With this PR, I'm adding the path for each property definition. For
example, `symbols.enable-external-lookup` would have `Name =
enable-external-lookup, Path = symbols`. In LLDB itself, we don't need
this path, we only need it for the documentation. To avoid mismatches
between the actual path and the declared one, I added a debug-only check
when a property group is added to a parent
(`OptionValueProperties::AppendProperty`).

The TableGen emitter for the properties now additionally emits
`g_{definition}_properties_def`, which includes both the array of
properties and the expected path. This constant has to be used to
initialize a `OptionValueProperties`.

I couldn't test this for everything (e.g. IntelPT or ProcessKDP), but
the necessary changes are simple: (1) set the `Path` in the TableGen
file, (2) update `initialize` to use `_def`.
2026-02-10 19:43:29 +01:00
Caroline Newcombe
d3a70f3b2c
[flang] Implement 'F_C_STRING' library function (Fortran 2023) (#174474)
Implement `F_C_STRING` to convert a Fortran string to a C
null-terminated string. Documented in F2023 Standard: 18.2.3.9
`F_C_STRING (STRING [, ASIS])`.
2026-02-10 13:30:31 -05:00
Razvan Lupusoru
a88274f008
[mlir][acc] Support lazy remark message construction (#180665)
The OpenACC remark emission utilities previously only accepted Twine for
message construction. However, complex remarks often require additional
logic to build messages, such as resolving variable names. This results
in unnecessary work when remarks are disabled.

Add an overload that accepts a lambda for message generation, which is
only invoked when remark emission is enabled. Update ACCLoopTiling to
use this lazy API for tile size reporting.

Additionally, getVariableName now returns numeric strings for constant
integer values. This is also being used by ACCLoopTiling along with the
lazy remark update.
2026-02-10 10:13:19 -08:00
Justin Fargnoli
9475f6af81
Reland "[NVPTX] Validate user-specified PTX version against SM version" (#180116)
Previous commit message: 

>Previous commit message: 
>
>> Original commit message:
>>
>>>When users explicitly specify a PTX version via -mattr=+ptxNN that's
insufficient for their target SM, we now emit a fatal error. Previously,
we silently upgraded the PTX version to the minimum required for the
target SM.
>>>
>>>When no SM or PTX version is specified, we now use PTX 3.2 (the
minimum for the default SM 3.0) instead of PTX 6.0.
>>
>>The following commits should fix the failures that arose when I
previously tried to land this commit:
>>
>>

>>9fc5fd0ad6
should address the llvm-nvptx*-nvidia-* build failures:
https://github.com/llvm/llvm-project/pull/174834#issuecomment-3742242651
>>
>>

>>600514a637
should address the MLIR failures
>
>The previous commit was reverted with
d23cb79ba4
because the
[mlir-nvidia](https://lab.llvm.org/buildbot/#/builders/138/builds/24797)
and
[mlir-nvidia-gcc7](https://lab.llvm.org/buildbot/#/builders/116/builds/23929)
Buildbots were failing.
>
>Those tests failed because MLIR's default SM was 5.0, which caused
NVPTX
to target PTX ISA v4.0, which did not support the intrinsics used in the
failing tests.
>

>243f011577
should address this by bumping MLIR's default SM to 7.5. Now, using
MLIR's new default SM, NVPTX
targets the PTX ISA v6.3, which supports the intrinsics used in the
failing tests.

---

The previous commit was reverted with
e9b578a4d77025e18318efedd0f3f3764338d859
[because](https://github.com/llvm/llvm-project/pull/179304#issuecomment-3856301333)
the clang driver set the default PTX ISA version to v4.2 when no CUDA
installation is found. However, given our patch, we should not set a
default; instead, let the LLVM backend select the appropriate PTX ISA
version for the target SM.
2026-02-10 18:11:54 +00:00
Louis Dionne
30f4b9c8be
[libc++] Use ValueError instead of non-existent ArgumentError (#179526)
ArgumentError does not exist. argparse.ArgumentError does exist, but
that is not what we want to use. I presume this was never caught because
we never execute that line.
2026-02-10 12:47:06 -05:00
Peter Rong
bc3b4462f0
[clang] Fix sema on ObjCLifetime conversion (#178524)
Clang can't handle objc lifetime correctly when casting 
We reuse the approach similar to lifetime: First remove it before the
conversion, then add it back.

Add a test 

Fixes https://github.com/llvm/llvm-project/issues/177478
2026-02-10 09:35:41 -08:00
JaydeepChauhan14
5df173263b
[NFC] Initialize AtomicLoadExtActions array (#180752) 2026-02-10 22:52:35 +05:30
Peter Klausler
076da86cd3
[flang][runtime] OPEN(STATUS='NEW') should fail on extant file (#180605)
An OPEN(..., STATUS='NEW') statement should fail when the named file
exists, and also should not delete it when the failure is a recoverable
error.
2026-02-10 09:22:05 -08:00
Peter Klausler
7e1fff4d50
[flang][runtime] Improve handling of short DATE_AND_TIME(VALUES=) (#180557)
When the actual argument associated with the VALUES= dummy argument of
the intrinsic subroutine DATE_AND_TIME has fewer than eight elements, we
crash with an internal error in the runtime.

With this patch, the compiler now checks the size of the vector at
compilation time, when it is known, and gracefully copes with a short
vector at execution time otherwise, without crashing.
2026-02-10 09:21:31 -08:00
Peter Klausler
0d64801bc3
[flang] Recognize compiler directives after expansion in comment (#180062)
The compiler can recognize a compiler directive when one results from a
macro expansion at the beginning of a non-comment source line, as in
"#define FOO !$OMP". But it can't recognize a compiler directive that
initially appears as a comment line, as in "!BAR" after "#define BAR
$OMP". Extend the prescanner to recognize such cases in free form
source. (Fixed form is a much more complicated case for this recognition
and will be addressed later if needed.)

Fixes https://github.com/llvm/llvm-project/issues/178481.
2026-02-10 09:20:57 -08:00
Ryan Mitchell
4b8f866b36
[AMDGPU][NFC] Use RegisterOperand instead of RegisterClass (#180574)
RegisterOperand has decoder/other methods and is generally preferred for
operands.
2026-02-10 16:47:46 +00:00
Ben Dunbobbin
e6f5e4910d
[Windows][Support] Add helper to expand short 8.3 form paths (#178480)
Windows supports short 8.3 form filenames (for example,
`compile_commands.json` -> `COMPIL~1.JSO`) for legacy reasons. See:
https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#short-vs-long-names

Such paths are not unusual because, on Windows, the system temporary
directory is commonly derived from the `TMP`/`TEMP` environment
variables. For historical compatibility reasons, these variables are
often set to short 8.3 form paths on systems where user names exceed
eight characters.

Introduce `windows::makeLongFormPath()` to convert paths to their long
form by expanding any 8.3 components via `GetLongPathNameW`.

As part of this change:
- Extended-length path prefix handling is centralized by adding
`stripExtendedPrefix()` and reusing it in `realPathFromHandle()`.
- `widenPath()` is cleaned up to use shared prefix constants.

This was split out from #178303 at the request of the codeowner so that
the Windows support parts can be reviewed separately.
2026-02-10 16:44:02 +00:00
Andrzej Warzyński
1d13412cd3
[clang][nfc] Remove else after return in ARM.cpp (#180733)
Align with the LLVM coding standard:
* https://llvm.org/docs/CodingStandards.html#don-t-use-else-after-a-return
2026-02-10 16:35:52 +00:00
Björn Svensson
b526df55db
Correcting sanitizer-ld test to expect -lstdc++ or -lc++ (#180736)
#164842 introduced a new testcase which failed in the following
test-builders:

- [fuchsia-x86_64-linux](https://lab.llvm.org/buildbot/#/builders/11/builds/33349)
- [llvm-clang-win-x-aarch](https://lab.llvm.org/buildbot/#/builders/193/builds/14309)
- [llvm-clang-win-x-armv7l](https://lab.llvm.org/buildbot/#/builders/38/builds/7708)

 In these setups `-lc++` is expected instead of `-lstdc++`.

Signed-off-by: Björn Svensson <bjorn.a.svensson@est.tech>
2026-02-10 08:34:26 -08:00
Twice
b48833bf66
[MLIR] Make the verification order fixed in DynamicOpTraitList (#180758)
Currently we use `DenseMap` in `DynamicOpTraitList` to store traits and
iterate over the `DenseMap`, and we found that the order is not fixed
and we also cannot control verification order.

In this PR we use `MapVector` to preserve the insertion order so that
the verification order over traits can be fixed and users can tune the
verification order.
2026-02-11 00:28:20 +08:00
Joseph Huber
a969d572c2
[OpenMP] Remove special handling for SPIR-V uinc atomic (#180747)
Summary:
No longer necessary after
https://github.com/llvm/llvm-project/pull/179114
2026-02-10 10:21:16 -06:00
Luke Lau
f81889da29
[VPlan] Fix convertToPhisToBlends folding non poison blend to poison (#180686)
This fixes a miscompile in #180005 where we didn't check that the first
incoming value isn't poison.

We should use the first non-poison incoming value if it exists, or just
poison if all the incoming values are poison.
2026-02-10 16:15:57 +00:00
Jonas Paulsson
d80a729572
[LoopVectorizer] Rename variable (NFC). (#180585)
Since TargetTransformInfo::enableAggressiveInterleaving(bool
HasReductions) takes the HasReductions argument, the LoopVectorizer
should save its returned value in a variable called AggressivelyInterleave
instead of AggressivelyInterleaveReductions.
2026-02-10 10:11:43 -06:00
Andrei Elovikov
f96c1ccc1e
[VPlan] Add -vplan-print-after= option (#178700)
UpdateTestChecks support is updated in subsequent
https://github.com/llvm/llvm-project/pull/178736.
2026-02-10 16:07:25 +00:00
Nikita Popov
067f1c95a4 [LoopVectorizer] Generate test checks (NFC) 2026-02-10 17:01:49 +01:00
Rahul Joshi
d8b87934f0
[NFC][TableGen] Adopt CodeGenHelpers in GobalISel emitters (#180143)
Add specific emitters for `#ifdef` and `#ifndef` based guards and adopt
them and other CodeGenHelpers in Global ISel emitters.
2026-02-10 07:58:35 -08:00
LLVM GN Syncbot
a81b7dead6 [gn build] Port a56b877056ab 2026-02-10 15:46:17 +00:00
LLVM GN Syncbot
50c430d0e1 [gn build] Port 239876941273 2026-02-10 15:46:16 +00:00
LLVM GN Syncbot
5335e8ac89 [gn build] Port 1bfa71743b08 2026-02-10 15:46:15 +00:00
Charles Zablit
67e571df8c
[lldb-dap][windows] add support for out of PATH python.dll resolution (#179306) 2026-02-10 16:45:36 +01:00
Frank Schlimbach
a6929f7937
[mlir][shard,mpi] Allowing 2d-grids and simplifying lowering shard.all_gather (#180243)
- fixing incorrect assertion and related function name
- MPI_comm_split is not pure
- simplifying/standardizing permutation in all_gather

---------

Co-authored-by: Rolf Morel <rolfmorel@gmail.com>
2026-02-10 16:04:22 +01:00
Christian Sigg
5e0e389360 [bazel] Port a29f0dd, second attempt. 2026-02-10 15:59:18 +01:00
Nico Weber
22c6b7047b [gn] port a29f0dd09680 (llubi) 2026-02-10 09:53:25 -05:00
Alexey Bataev
993e1f66af Revert "[SLP]Support for zext i1 %x modeling as select %x, 1, 0"
This reverts commit 70aebae2a13114f4e3d5e2460c052d8f3de295be to fix
buildbots https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flab.llvm.org%2Fbuildbot%2F%23%2Fbuilders%2F85%2Fbuilds%2F18614&data=05%7C02%7C%7Ce5641da3fe984280a6e908de68b3658c%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C639063316889757116%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=65hUwLDdZkXq3zUEt3cVuqJNwXN7Alw4JKDggDbjeVk%3D&reserved=0
2026-02-10 06:49:53 -08:00