575400 Commits

Author SHA1 Message Date
Donát Nagy
c80443cd37
[NFC][analyzer] Eliminate SwitchNodeBuilder (#188096)
This commit removes the class `SwitchNodeBuilder` because it just
obscured the logic of switch handling by hiding some parts of it in
another source file.
2026-04-03 09:46:06 +02:00
David Green
e46c5a831e
[AArch64] Regenerate arm64-stur.ll. NFC (#190317) 2026-04-03 08:27:29 +01:00
Michael Buch
f91124a55b
[lldb][Module] Only call LoadScriptingResourceInTarget via ModuleList (#190136)
This patch is motivated by
https://github.com/llvm/llvm-project/pull/189943, where we would like to
print the "these module scripts weren't loaded" warning for *all*
modules batched together. I.e., we want to print the warning *after* all
the script loading attempts, not from within each attempt.

To do so we want to hoist the `ReportWarning` calls in
`Module::LoadScriptingResourceInTarget` out into the callsites. But if
we do that, the callers have to remember to print the warnings. To avoid
this, we redirect all callsites to use
`ModuleList::LoadScriptingResourceInTarget`, which will be responsible
for printing the warnings.

To avoid future accidental uses of
`Module::LoadScriptingResourceInTarget` I moved the API into
`ModuleList` and made it `private`.
2026-04-03 07:03:11 +00:00
lonely eagle
8db1f6492a
[mlir][reducer] Remove the restriction that OptReductionPass must be a ModuleOp (#189038)
This PR aims to make the pass more generic by removing the ModuleOp
restriction. This PR reimplements the logic using a standalone
PassManager. Additionally, the isInteresting method has been updated to
accept Operation* for better flexibility. Finally, a dedicated test
directory has been added to improve the organization of OptReductionPass
tests.
2026-04-03 14:49:01 +08:00
michaelselehov
df48719df3
[AMDGPU] Add !noalias metadata to mem-accessing calls w/o pointer args (#188949)
addAliasScopeMetadata in AMDGPULowerKernelArguments skips instructions
with empty PtrArgs, including memory-accessing calls that have no
pointer arguments (e.g. builtins like threadIdx()). Because these calls
never receive !noalias metadata, ScopedNoAliasAA cannot prove they don't
alias noalias kernel arguments. MemorySSA then conservatively reports
them as clobbers, which prevents AMDGPUAnnotateUniformValues from
marking loads as noclobber, blocking scalarization (s_load) and forcing
expensive vector loads (global_load) instead.

Fix by adding all noalias kernel argument scopes to !noalias metadata
for memory-accessing instructions with no pointer arguments. Since such
instructions cannot access memory through any kernel pointer argument,
all noalias scopes are safe to apply.

This fixes a performance regression in rocFFT introduced by bd9668df0f00
("[AMDGPU] Propagate alias information in AMDGPULowerKernelArguments").

Assisted-by: Claude Opus
2026-04-03 08:41:05 +02:00
Ramkumar Ramachandra
e09d1e3ff1
[VPlan] Use not_equal_to to improve code (NFC) (#190262) 2026-04-03 07:32:34 +01:00
Paul Kirth
a52a504e69
[clang-doc] Prepare Info types for Arena allocation (#190046)
To allocate Info structures directly in an Arena, they cannot have
members with nontrivial destructors, or we will leak memory. Before we
migrate them, we can replace growable vector types with intrusive lists.

This introduces some slight overhead as these types now have new pointer
members for use in ilists in later patches.

| Metric | Baseline | Prev | This | Culm% | Seq% |
| :--- | :--- | :--- | :--- | :--- | :--- |
| Time | 920.5s | 1005.7s | 1010.5s | +9.8% | +0.5% |
| Memory | 86.0G | 42.1G | 42.9G | -50.2% | +1.8% |

| Benchmark | Baseline | Prev | This | Culm% | Seq% |
| :--- | :--- | :--- | :--- | :--- | :--- |
| BM_BitcodeReader_Scale/10 | 67.9us | 68.6us | 69.2us | +1.9% | +0.9% |
| BM_BitcodeReader_Scale/10000 | 70.5ms | 21.3ms | 21.9ms | -68.9% |
+2.8% |
| BM_BitcodeReader_Scale/4096 | 23.2ms | 4.6ms | 4.6ms | -80.0% | +0.8%
|
| BM_BitcodeReader_Scale/512 | 509.4us | 546.3us | 541.8us | +6.4% |
-0.8% |
| BM_BitcodeReader_Scale/64 | 114.8us | 117.9us | 117.6us | +2.5% |
-0.2% |
| BM_EmitInfoFunction | 1.6us | 1.5us | 1.6us | -1.9% | +3.9% |
| BM_Index_Insertion/10 | 2.3us | 3.9us | 4.0us | +75.3% | +3.0% |
| BM_Index_Insertion/10000 | 3.1ms | 5.3ms | 5.4ms | +72.7% | +2.4% |
| BM_Index_Insertion/4096 | 1.3ms | 2.1ms | 2.1ms | +67.1% | +1.8% |
| BM_Index_Insertion/512 | 153.6us | 253.0us | 259.0us | +68.6% | +2.4%
|
| BM_Index_Insertion/64 | 18.1us | 30.1us | 30.3us | +67.8% | +0.5% |
| BM_JSONGenerator_Scale/10 | 36.8us | 37.0us | 38.2us | +3.6% | +3.2% |
| BM_JSONGenerator_Scale/10000 | 89.6ms | 91.7ms | 90.7ms | +1.2% |
-1.1% |
| BM_JSONGenerator_Scale/4096 | 33.7ms | 35.1ms | 34.7ms | +2.9% | -1.1%
|
| BM_JSONGenerator_Scale/512 | 1.9ms | 1.9ms | 2.0ms | +3.9% | +4.0% |
| BM_JSONGenerator_Scale/64 | 222.4us | 223.3us | 230.1us | +3.5% |
+3.1% |
| BM_Mapper_Scale/10000 | 104.3ms | 105.6ms | 100.9ms | -3.2% | -4.4% |
| BM_Mapper_Scale/4096 | 44.3ms | 44.8ms | 42.8ms | -3.5% | -4.4% |
| BM_Mapper_Scale/512 | 7.6ms | 7.6ms | 7.4ms | -2.6% | -3.2% |
| BM_Mapper_Scale/64 | 3.1ms | 3.0ms | 3.0ms | -2.0% | -1.3% |
| BM_MergeInfos_Scale/10000 | 12.2ms | 1.4ms | 1.6ms | -86.7% | +12.5% |
| BM_MergeInfos_Scale/2 | 1.9us | 1.7us | 1.7us | -10.2% | -1.9% |
| BM_MergeInfos_Scale/4096 | 2.8ms | 487.3us | 503.4us | -81.9% | +3.3%
|
| BM_MergeInfos_Scale/512 | 68.9us | 38.7us | 38.1us | -44.6% | -1.4% |
| BM_MergeInfos_Scale/64 | 10.3us | 6.4us | 6.4us | -37.6% | -0.4% |
| BM_MergeInfos_Scale/8 | 2.8us | 2.2us | 2.2us | -21.7% | -1.5% |
| BM_SerializeFunctionInfo | 25.5us | 25.9us | 26.0us | +1.9% | +0.4% |
2026-04-03 06:02:32 +00:00
Paul Kirth
4b2623d03c
[clang-doc] Introduce TransientArena for short lived allocations (#190045)
With strings interned, we can move the StringRefs in various Info
structs into a new short lived arena. This change migrates the remaining
SmallVectors in CommentInfo to use an ArrayRef backed by the new
transient arena.

This results in further minor reductions in overall memory usage, but no
significant effect on runtime performance.

| Metric | Baseline | Prev | This | Culm% | Seq% |
| :--- | :--- | :--- | :--- | :--- | :--- |
| Time | 920.5s | 1011.0s | 1005.7s | +9.2% | -0.5% |
| Memory | 86.0G | 44.9G | 42.1G | -51.0% | -6.2% |

| Benchmark | Baseline | Prev | This | Culm% | Seq% |
| :--- | :--- | :--- | :--- | :--- | :--- |
| BM_BitcodeReader_Scale/10 | 67.9us | 70.0us | 68.6us | +1.0% | -2.0% |
| BM_BitcodeReader_Scale/10000 | 70.5ms | 21.3ms | 21.3ms | -69.8% |
-0.0% |
| BM_BitcodeReader_Scale/4096 | 23.2ms | 4.5ms | 4.6ms | -80.2% | +2.8%
|
| BM_BitcodeReader_Scale/512 | 509.4us | 538.8us | 546.3us | +7.3% |
+1.4% |
| BM_BitcodeReader_Scale/64 | 114.8us | 118.0us | 117.9us | +2.7% |
-0.1% |
| BM_EmitInfoFunction | 1.6us | 1.6us | 1.5us | -5.5% | -6.2% |
| BM_Index_Insertion/10 | 2.3us | 4.0us | 3.9us | +70.3% | -0.7% |
| BM_Index_Insertion/10000 | 3.1ms | 5.0ms | 5.3ms | +68.6% | +5.0% |
| BM_Index_Insertion/4096 | 1.3ms | 2.0ms | 2.1ms | +64.2% | +4.5% |
| BM_Index_Insertion/512 | 153.6us | 245.0us | 253.0us | +64.8% | +3.2%
|
| BM_Index_Insertion/64 | 18.1us | 28.9us | 30.1us | +67.0% | +4.4% |
| BM_JSONGenerator_Scale/10 | 36.8us | 36.4us | 37.0us | +0.4% | +1.7% |
| BM_JSONGenerator_Scale/10000 | 89.6ms | 90.4ms | 91.7ms | +2.3% |
+1.5% |
| BM_JSONGenerator_Scale/4096 | 33.7ms | 34.0ms | 35.1ms | +4.0% | +3.0%
|
| BM_JSONGenerator_Scale/64 | 222.4us | 220.5us | 223.3us | +0.4% |
+1.3% |
| BM_Mapper_Scale/10000 | 104.3ms | 105.4ms | 105.6ms | +1.3% | +0.3% |
| BM_Mapper_Scale/4096 | 44.3ms | 44.7ms | 44.8ms | +1.0% | +0.1% |
| BM_Mapper_Scale/512 | 7.6ms | 7.7ms | 7.6ms | +0.7% | -1.2% |
| BM_MergeInfos_Scale/10000 | 12.2ms | 1.4ms | 1.4ms | -88.2% | +0.1% |
| BM_MergeInfos_Scale/2 | 1.9us | 1.7us | 1.7us | -8.5% | +2.1% |
| BM_MergeInfos_Scale/4096 | 2.8ms | 495.6us | 487.3us | -82.5% | -1.7%
|
| BM_MergeInfos_Scale/512 | 68.9us | 34.6us | 38.7us | -43.9% | +11.6% |
| BM_MergeInfos_Scale/64 | 10.3us | 6.0us | 6.4us | -37.4% | +7.2% |
| BM_MergeInfos_Scale/8 | 2.8us | 2.1us | 2.2us | -20.6% | +5.1% |
| BM_SerializeFunctionInfo | 25.5us | 26.8us | 25.9us | +1.4% | -3.3% |
2026-04-03 05:46:25 +00:00
Amit Tiwari
1972cf64fd
[Clang][OpenMP] Implement Loop splitting #pragma omp split directive (#183261)
OpenMP 6.0 Loop-splitting directive `#pragma omp split` construct with `counts`
clause
2026-04-03 10:42:31 +05:30
Fangrui Song
2f7bd4fa97
[ELF] Enable parallel relocation scanning for -z nocombreloc and PPC64 (#190309)
The `bool serial` condition in scanRelocations disabled parallelism for
three cases: -z nocombreloc, MIPS, and PPC64. Resolve two cases:

- nocombreloc: .rela.dyn is now always created with combreloc=true so
  non-relative relocations are sorted deterministically. Since
  #187964 already separates relative relocations unconditionally,
  the only remaining effect of -z nocombreloc is suppressing
  DT_RELACOUNT (gated on ctx.arg.zCombreloc in DynamicSection).

- PPC64: After #181496 moved scanning into scanSectionImpl, the
  sole thread-unsafe access is ctx.ppc64noTocRelax (DenseSet::insert).
  Protect it with ctx.relocMutex, which is already used for rare
  operations during parallel scanning.

MIPS retains serial scanning due to `MipsGotSection` mutations.
2026-04-02 22:00:15 -07:00
Weibo He
bc11c85b6b
[clang][CodeGen] Emit coro.dead intrinsic to improve coroutine allocation elision (#190295)
Part 4/4: Implement HALO for coroutines that flow off final suspend.
Parent PR: #185336
2026-04-03 02:06:10 +00:00
Jackson Stogel
8b903fe38b
[clang][DebugInfo][test] Set -fuse-lld for test matching linker invocation. (#190291)
This test doesn't work as intended when an alternative default linker is
specified via `-DCLANG_DEFAULT_LINKER=ld`. If this test isn't intended
to support alternate default linker, lmk I can just change the
downstream usage I'm seeing, though I figure other folks may have
similar configurations. Repro:

```
cmake -S llvm -B build -DLLVM_ENABLE_PROJECTS="clang" -DCLANG_DEFAULT_LINKER=ld -GNinja
ninja -C build
./build/bin/llvm-lit -v clang/test/DebugInfo/CXX/hotpatch.cpp

...

possible intended match
# |             6:  "/usr/bin/ld" "-out:hotpatch.exe" "-libpath:lib/amd64" "-libpath:atlmfc/lib/amd64" "-nologo" "-functionpadmin" "/tmp/lit-tmp-o7x0r1o_/hotpatch-4595de.obj" 
```

afaict it passed before because `-mincremental-linker-compatible` was
being used until e97a42d5f9fe51de50aabd4d9bf6874a4955f9fa, which would
match on the compilation line.
2026-04-02 19:03:27 -07:00
Tamir Duberstein
72b00e60b8
[CMake] Version Darwin dylib identities (#189004) 2026-04-02 18:35:50 -07:00
Stanislav Mekhanoshin
7084f18f27
[AMDGPU] Fix i16/i8 flat store in true16 with sramecc (#190238)
The pattern was guarded by the D16PreservesUnusedBits predicate
which is not needed for stores.
2026-04-02 17:32:50 -07:00
Peter Collingbourne
935f21e1d5
gn build: Port d8e9e0af1cb6
Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/190290
2026-04-02 17:13:02 -07:00
Peter Collingbourne
f20b40ef97
gn build: Port f63d33da0a51 more
Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/190289
2026-04-02 17:08:29 -07:00
Benjamin Maxwell
89f31f26c8
[AArch64][SME] Preserve ZA in agnostic ZA functions without +sme (#190141)
`__arm_agnostic("sme_za_state")` does not require +sme, but we must
still preserve ZA in case the function is used with code that makes use
of ZA:

> The use of `__arm_agnostic("sme_za_state")` allows writing functions
> that are compatible with ZA state without having to share ZA state
> with the caller, as required by `__arm_preserves`. The use of this
> attribute does not imply that SME is available.
2026-04-03 00:33:28 +01:00
Jason Molenda
124b0a8fbb
[lldb][kernel debug] Add a missing call to scan local fs for kexts (#190281)
A kernel developer noticed that I missed a call to index the local
filesystem in one of our codepaths, and had a use case that depended on
that working.

rdar://173814556
2026-04-02 16:33:00 -07:00
Michael Kruse
1f75f318ae
[Runtimes] Gracefully handle invalid LLVM_TARGET_TRIPLE (#190284)
In some situations such as reported at
https://github.com/llvm/llvm-project/pull/177953#issuecomment-4179014239,
LLVM_(DEFAULT_)TARGET_TRIPLE is not set. It is used to derive the output
directory in #177953. Only flang-rt currently uses
RUNTIMES_(INSTALL|OUTPUT)_RESOURCE_LIB_PATH, we should not fail building
other despite a missing LLVM_TARGET_TRIPLE.

Compiler-rt uses COMPILER_RT_DEFAULT_TARGET_TRIPLE instead which it
derives itself. Most other LLVM runtimes libraries just skip the target
portion of the library path (explicitly so since #93354). Do the same
for RUNTIMES_(INSTALL|OUTPUT)_RESOURCE_LIB_PATH which we hope eventually
can replace the other mechanisms.
2026-04-02 23:32:42 +00:00
Paul Kirth
2600533a66
[clang-doc] Switch to string internment (#190044)
This is the first step in migrating all the Info types to be POD. We
introduced a shared string saver that can be used safely across threads,
and updated the internal represntation of various data types to use
these over owned strings, like SmallString or std::string.

This also required changes to YAMLGenerator to keep the single quoted
string formatting and to update the YAML traits.

This change gives an almost 50% reduction in peak memory when building
documentation for clang, at about a 10% performance loss. Future patches
can mitigate the performance penalties, and further reduce memory use.

| Metric | Baseline | Prev | This | Culm% | Seq% |
| :--- | :--- | :--- | :--- | :--- | :--- |
| Time | 920.5s | 920.5s | 1011.0s | +9.8% | +9.8% |
| Memory | 86.0G | 86.0G | 44.9G | -47.8% | -47.8% |

| Benchmark | Baseline | Prev | This | Culm% | Seq% |
| :--- | :--- | :--- | :--- | :--- | :--- |
| BM_BitcodeReader_Scale/10 | 67.9us | 67.9us | 70.0us | +3.0% | +3.0% |
| BM_BitcodeReader_Scale/10000 | 70.5ms | 70.5ms | 21.3ms | -69.8% |
-69.8% |
| BM_BitcodeReader_Scale/4096 | 23.2ms | 23.2ms | 4.5ms | -80.7% |
-80.7% |
| BM_BitcodeReader_Scale/512 | 509.4us | 509.4us | 538.8us | +5.8% |
+5.8% |
| BM_BitcodeReader_Scale/64 | 114.8us | 114.8us | 118.0us | +2.8% |
+2.8% |
| BM_Index_Insertion/10 | 2.3us | 2.3us | 4.0us | +71.6% | +71.6% |
| BM_Index_Insertion/10000 | 3.1ms | 3.1ms | 5.0ms | +60.6% | +60.6% |
| BM_Index_Insertion/4096 | 1.3ms | 1.3ms | 2.0ms | +57.1% | +57.1% |
| BM_Index_Insertion/512 | 153.6us | 153.6us | 245.0us | +59.6% | +59.6%
|
| BM_Index_Insertion/64 | 18.1us | 18.1us | 28.9us | +60.0% | +60.0% |
| BM_JSONGenerator_Scale/10 | 36.8us | 36.8us | 36.4us | -1.3% | -1.3% |
| BM_Mapper_Scale/10000 | 104.3ms | 104.3ms | 105.4ms | +1.0% | +1.0% |
| BM_Mapper_Scale/512 | 7.6ms | 7.6ms | 7.7ms | +1.9% | +1.9% |
| BM_MergeInfos_Scale/10000 | 12.2ms | 12.2ms | 1.4ms | -88.2% | -88.2%
|
| BM_MergeInfos_Scale/2 | 1.9us | 1.9us | 1.7us | -10.3% | -10.3% |
| BM_MergeInfos_Scale/4096 | 2.8ms | 2.8ms | 495.6us | -82.2% | -82.2% |
| BM_MergeInfos_Scale/512 | 68.9us | 68.9us | 34.6us | -49.7% | -49.7% |
| BM_MergeInfos_Scale/64 | 10.3us | 10.3us | 6.0us | -41.6% | -41.6% |
| BM_MergeInfos_Scale/8 | 2.8us | 2.8us | 2.1us | -24.4% | -24.4% |
| BM_SerializeFunctionInfo | 25.5us | 25.5us | 26.8us | +4.9% | +4.9% |

note: I used an LLM to help generate the test code adjustments and the
YAML traits.
2026-04-02 23:25:21 +00:00
hjagasiaAMD
a76750e6de
Revert "[SimplifyCFG] Extend jump-threading to allow live local defs … (#190269)
…(#135079)"

This reverts commit a757f23404c594f4a48b4ddb6625f88b349d11d5. Commit
causes reduce.cu file in hipcub/warp go from 2 minutes of compilation to
taking several hours.
2026-04-02 23:05:26 +00:00
Jackson Stogel
9d18702cd8
[Bazel] Port b1ef47f45966f06f263dc96d83c869393952cbf8 (#190278) 2026-04-02 16:01:55 -07:00
Dave Lee
8fa4b3d601
[lldb] Simplify some tests to run_to_source_breakpoint (NFC) (#190082)
Many tests have ad hoc forms of the launch & break steps done by
`lldbutil.run_to_source_breakpoint`. This changes some of those tests to
use `run_to_source_breakpoint` instead.

Assisted-by: claude
2026-04-02 15:20:49 -07:00
Andy Kaylor
6c4149dba7
[CIR] Fix handling of catch-all with cleanups (#190233)
We had a bug where exceptions caught with catch-all were not properly
handling a thrown exception if the catch-all handler enclosed a cleanup
handler. The structured CIR was generated correctly, but when we
flattened the CFG and introduced cir.eh.initiate operations, the
cir.eh.initiate for the cleanup's EH path was incorrectly marked as
cleanup-only, even though it chained to the dispatch for the catch-all
handler. This resulted in the landing pad generated for the cleanup not
being marked as having a catch-all handler, so the exception was not
caught.

This change fixes the problem in the FlattenCFG pass.

Assisted-by: Cursor / claude-4.6-opus-high
2026-04-02 15:02:05 -07:00
forking-google-bazel-bot[bot]
842464e7a9
[Bazel] Fixes 71122d8 (#190264)
This fixes 71122d8694cad3ae4450368be3e89bb62aa78173.

Co-authored-by: Google Bazel Bot <google-bazel-bot@google.com>
2026-04-02 14:44:01 -07:00
Deric C.
72cc5a670e
[HLSL] Add TableGen-generated header files to the HLSL distribution (#190222)
This PR adds the TableGen-generated headers from
https://github.com/llvm/llvm-project/pull/187610 to the HLSL
distribution.

Currently the HLSL distribution is incomplete due to missing these
generated headers, preventing successful compilation:
```
Command Output (stderr):
--
In file included from <built-in>:1:

In file included from D:\a\_work\1\ClangHLSL\Binaries\lib\clang\23\include\hlsl.h:24:

D:\a\_work\1\ClangHLSL\Binaries\lib\clang\23\include\hlsl/hlsl_alias_intrinsics.h:42:10: fatal error: 'hlsl_alias_intrinsics_gen.inc' file not found

   42 | #include "hlsl_alias_intrinsics_gen.inc"

      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1 error generated.
```
This PR fixes the error by including `hlsl_alias_intrinsics_gen.inc` and
`hlsl_inline_intrinsics_gen.inc` in the HLSL distribution.
2026-04-02 14:38:58 -07:00
Michael Spencer
b1ef47f459
[libclang] Add clang_ModuleCache_prune (#190067)
This allows a build system to direct Clang to prune a module cache
directory using the same method Clang does internally.

This also changes `clang::maybePruneImpl` to clean up files directly in
the directory, not just subdirectories.
2026-04-02 14:26:27 -07:00
David Green
bf50e847fb
[AArch64] Add tests for st1 from subvector extracts. NFC (#190265) 2026-04-02 22:20:53 +01:00
Roland McGrath
71122d8694
[libc] Move LLVM_LIBC_IS_DEFINED macro to its own header (#190081)
This moves the LLVM_LIBC_IS_DEFINED macro to its own header is
__support/macros.  Its implementation leverages cpp::string_view
instead of rolling its own strcmp; this necessitated fixing
several missing constexpr in the string_view implementation.

The new __support/macros/macro-utils.h is also broken out to hold
the stringification macro and can be used in future for token
pasting shenanigans and other such generic macro machinery.
2026-04-02 14:13:51 -07:00
Jan Svoboda
c0cfe546a1
[clang] Include header providing off_t (#190259)
This should fix the modules build.
2026-04-02 21:02:41 +00:00
NeKon69
5669dfc68b
[LifetimeSafety] Propagate loans through pointer arithmetic (#189546)
This PR adds loan propagation for pointer arithmetic.

It also updates the tests to match the new behavior.

Fixes #180933
2026-04-02 21:59:39 +01:00
Matt Arsenault
d34e84700a
clang: Use MakeArgStringRef more often (#189463)
Avoid an intermediate copy by using MakeArgStringRef. Also
use better use of Twine with MakeArgString.
2026-04-02 20:56:56 +00:00
Amr Hesham
f2dff15995
[clang] Fixed a crash when explicitly casting between atomic complex types (#172210)
Fixed a crash when explicitly casting between atomic complex types

resolve: #172208
2026-04-02 22:55:43 +02:00
Victor Chernyakin
a413a40150
[clang-tidy][NFC] Remove another ad-hoc exclusion for system headers (#190094)
This is another ad-hoc approach made obsolete by #151035.
2026-04-02 20:52:47 +00:00
Andy Kaylor
7d2f2a3f4d
[CIR] Fix off-by-one dtor loop bug (#190242)
We had an off-by-one error in the CIR generation for array destructor
loops, causing us to miss destructing one element of the array. This
change fixes the problem.
2026-04-02 13:49:19 -07:00
Sirish Pande
dbde0ba150
[AMDGPU] Rename 1_5xVGPRs to 1536VGPRs to be more contextual. NFC (#190245)
Renaming feature from 1_5xVGPRs to 1536VGPRs to to be more contextual.
2026-04-02 15:35:13 -05:00
Stanislav Mekhanoshin
3fc4d44816
[AMDGPU] Update gfx1250_dasm_vop3cx.txt test for true16. NFC (#190240) 2026-04-02 13:29:59 -07:00
Matt Arsenault
2f9ac44061
clang: Reorder linker aux-triple handling (#189462)
Move the IsCuda check out from the IsCuda || isHIP block. Keep
this from splitting the aux-triple handling for future convenience.
2026-04-02 22:23:28 +02:00
Matt Arsenault
eed1f2749d
libclc: Use special division for atan2 for DAZ (#190248)
The AMDGPU DAZ fdiv works fine in this case, so there's
maybe something better we could do here.
2026-04-02 22:18:17 +02:00
Eli Friedman
45ac2db4e5
[clang][NFC] Clean up InitializedEntity booleans. (#185335)
As discussed in #182203, use enums instead.

I tried to name/use them appropriately, but I'm not sure sure I'm really
happy with the results; suggestions welcome.
2026-04-02 13:11:55 -07:00
Valeriy Savchenko
75a354ba55
[InstCombine] Use ComputeNumSignBits in isKnownExactCastIntToFP (#190235)
For signed int-to-FP casts, ComputeNumSignBits can prove exactness where
computeKnownBits cannot -- e.g. through ashr(shl x, a), b where sign propagation is
tracked precisely but individual known bits are all unknown.
2026-04-02 21:04:29 +01:00
Karthik Senthil
148cb22dd7
[NVPTX] Fix missing arch version for ptxas in LIT test. (#190231)
Recently added LIT test in #188539 missed -arch option for ptxas causing
post commit build failure. This PR addresses that failure.
2026-04-02 13:02:29 -07:00
Joseph Huber
b2d3a6574c
[libc] Rename rpc::Status to rpc::RPCStatus to reduce conflicts (#190239)
Summary:
`Status` is unfortunately heavily overloaded in practice. Things like
X11 define it as a macro. Best to just remove that possibility entirely.
2026-04-02 14:55:57 -05:00
xys-syx
1474e3e4f4
[MLIR][NVVM] Derive NVVM_SyncWarpOp from NVVM_IntrOp for import support (#188415)
Change `NVVM_SyncWarpOp` base class from `NVVM_Op` to
`NVVM_IntrOp<"bar.warp.sync">`, which auto-generates `llvmEnumName =
nvvm_bar_warp_sync` and registers it with
`-gen-intr-from-llvmir-conversions` and
`-gen-convertible-llvmir-intrinsics`. This enables LLVM IR to MLIR
import. The hand-written `llvmBuilder` is removed as the default
`LLVM_IntrOpBase` builder is equivalent.
2026-04-02 15:41:50 -04:00
Matt Arsenault
a68ae7b0cc
DiagnosticInfo: Use Twine for resource name (#190228)
Allow more flexibility in phrasing of the overallocated
resource.
2026-04-02 21:41:38 +02:00
Rahul Joshi
43a8b7de88
[NFC][LLVM] Rename several ArgsTys arguments to OverloadTys. (#190210)
Rename several arguments to intrinsic related functions from `ArgsTys`
to `OverloadTys` to better reflect their meaning. The only variables
left with name `ArgTys` now actually mean function argument types.

Also reamove an incorrect comment in Intrinsics.td. Dependent types do
allow forward references starting with
7957fc6547
2026-04-02 12:36:28 -07:00
Matt Arsenault
2ec19b86b5
ValueTracking: x - floor(x) cannot introduce overflow (#189003)
This returns a value with an absolute value less than 1 so it
should be possible to propagate no-infs.
2026-04-02 19:26:22 +00:00
Ehsan Amiri
0abef30c80
[DA] Fix warning introduced by #189740 (#190226)
The following warning is issued for llvm/lib/Analysis/DependenceAnalysis.cpp:2004

warning: suggest parentheses around ‘&&’ within ‘||’
2026-04-02 15:15:25 -04:00
Craig Topper
e2e5db8401
[TargetLowering] Speculative fix for a non-determinism issue between different compilers. (#190219)
The evaluation order of function arguments is unspecified by the C++
standard. We had two getNode calls as function arguments which causes
the nodes to be created in a different order depending on the compiler
used. This patch moves them to their own variables to ensure they are
called in the same order on all compilers.

Possible fix for #190148.
2026-04-02 12:12:28 -07:00
Prabhu Rajasekaran
e97a42d5f9
[Driver] UEFI -mno-incremental-linker-compatible (#188800)
The `-mno-incremental-linker-compatible` switch translates to Brepro
linker flag and must be passed on to the underlying linker to match the
behavior of the Windows triples that produce PE COFF.
2026-04-02 19:11:28 +00:00