[flang-rt] Fix defining `pid_t` on GPU builds (#178470)
Summary:
We support building flang-rt on GPU targets. These do not have POSIX
types so we should not include this if it's not present.
[mlir][dataflow ] Drop LLVM_DEBUG of DATAFLOW_DEBUG (NFC) (#177398)
We kept the DATAFLOW_DEBUG macro because when
LLVM_ENABLE_ABI_BREAKING_CHECKS is 0, the debugName in AnalysisState is
not defined, which prevents us from printing debug logs(In this case, we
define DATAFLOW_DEBUG(X) as an empty macro, so it won't print any logs).
Therefore, this PR only removes LLVM_DEBUG. We are now using LDBG, so
LLVM_DEBUG is no longer needed.
https://github.com/llvm/llvm-project/pull/176911
[flang][NFC] Converted five tests from old lowering to new lowering (part 10) (#178357)
Tests converted from test/Lower: c_ptr-constant-init.f90,
complex-real.f90,
computed-goto.f90, constant-literal-mangling.f90, control-flow.f90
---------
Co-authored-by: Jean Perier <jperier at nvidia.com>
[AArch64][GlobalISel] Update testing for fixed point fcvt. NFC
This adds GlobalISel test coverage for fcvt_combine.ll and adds more variants
for testing.
[clang][constexpr] Move inf/nan/denormal handling into FP binop callbacks (#178421)
Update the callback signature for `EvaluateFpBinOpExpr` and
`interp__builtin_elementwise_fp_binop` to return
`std::optional<APFloat>`, allowing individual callbacks to decide
whether to handle special floating-point cases (inf/nan/denormal).
Previously, the helper functions had hardcoded validation that forced
all callbacks to reject these cases. This blocked intrinsics needing
custom validation (e.g., rounding mode checks). Now each callback
controls its own validation and returns `std::nullopt` when the fold is
invalid.
Fixes #178416
[AArch64][llvm] Allow some `tlbip` insns to be used with only +tlbid
Allow `tlbip` instructions containing *E1IS*, *E1OS*, *E2IS* or *E2OS*
to be used with `+tlbid` or `+d128`. This is because the 2025 Armv9.7-A
MemSys specification says:
```
All TLBIP *E1IS*, TLBIP*E1OS*, TLBIP*E2IS* and TLBIP*E2OS* instructions
that are currently dependent on FEAT_D128 are updated to be dependent
on FEAT_D128 or FEAT_TLBID
```
[lldb-dap] Fix debugger initialisation order in DAP::InitializeDebugger (#178022)
Validate the debugger before assigning it to the member debugger to
avoid setting an invalid debugger on error.
We usually have an existing session with that debugger ends up messing
with that session.
AMDGPU: Perform zero/any extend combine into permute (#177370)
Increases opportunities to generate permutes.
Motivated sub-optimal code generation of a CK kernel.
[AArch64][llvm] Allow some `tlbip` insns to be used with only +tlbid
Allow `tlbip` instructions containing *E1IS*, *E1OS*, *E2IS* or *E2OS*
to be used with `+tlbid` or `+d128`. This is because the 2025 Armv9.7-A
MemSys specification says:
```
All TLBIP *E1IS*, TLBIP*E1OS*, TLBIP*E2IS* and TLBIP*E2OS* instructions
that are currently dependent on FEAT_D128 are updated to be dependent
on FEAT_D128 or FEAT_TLBID
```
[SPIRV] Fix crash due to incorrect state of the SPIRVGlobalRegistry.
Also, simplified checks in test that were not stricly necessary and were failing with this fix.
[lldb][NativePDB] Fix crash in debugger when PDB has bad type index value (#166455)
Fix crash when an inline site record in the PDB file contains type index
which is out of bounds
[SLP] Reordered disjoint or reduction of shl(zext, (0, stride, 2* stride)) modelled as bitcast
Added support for reorder reduction of shl(zext)-like construct. Such
constructs are modelled currently as shuffle + bitcast.
Reviewers: RKSimon, hiraditya
Pull Request: https://github.com/llvm/llvm-project/pull/178292
[LoopUnroll] Use branch probability in multi-exit loop unrolling (#164799)
This patch improves multi-exit loop unrolling by taking into account
branch probability and not only other exit being deopting one.
This implementation uses branch metadata directly because of unstable
state of BPI in this part of code (runtime unrolling invalidates the
state of the map and using BPI in my tests has caused errors).
If branch probability metadata are not present then the current deopt
heuristic is still used.
---------
Co-authored-by: Marek Sedlacek <msedlacek at azul.com>
[mlir][spirv] Add Pooling, Fourier Transform, and MatMul operations (#177585)
to TOSA Extended Instruction Set (001000.1)
This patch expands support for the TOSA Extended Instruction Set
(001000.1) to the SPIR-V dialect in MLIR. The TOSA extended instruction
set provides a standardized set of machine learning operations designed
to be used within spirv.ARM.Graph operations (corresponding to
OpGraphARM in SPV_ARM_graph) and typed with !spirv.arm.tensor<...>
(corresponding to OpTypeTensorARM in SPV_ARM_tensor).
The change introduces:
* Extending dialect plumbing for import, serialization, and
deserialization of the TOSA extended instruction set.
* The spirv.Tosa.*Pool* pooling operations, spirv.Tosa.MatMul, and
spirv.Tosa.*FFT* (Fourier Transform) operations from TOSA extended
instruction, each lowering to the corresponding OpExtInst.
* Verification enforcing that new convolution operations appears only
[12 lines not shown]
[libc++] Use the fast path for move assignment in __tree if the allocator is_always_equal (#177115)
This avoids instantiating some code that we know is dead. This is also a
prerequisite for #134330, since we avoid trying to `const_cast` in the
common case now.
[VPlan] Remove non-reductions after simplifications. (#176795)
In some cases, we identify patterns as reductions, even though they can
be simplified to a non-reduction.
Mark VPReductionPHIRecipe as not reading from memory & not having
side-effects, to clean them up.
We also need to remove ComputeReductionResult VPInstructions with
live-in arguments. This means there is actually no reduction, and we
need to fold it to the live in. Otherwise we would incorrectly reduce
the live-in.
PR: https://github.com/llvm/llvm-project/pull/176795