[DA] Refactor the signature of the Exact SIV test (NFCI) (#186386)
Change the signature of `exactSIVtest` to directly pass addrecs instead
of passing their operands separately. I *think* this change is not
mandatory, but it will simplify the code, especially because we will be
checking the presence of nsw flags on the addrecs.
[orc-rt] Hold `const void*` rather than `void*` in ControllerInterface. (#186954)
We only care about addresses in ControllerInterface, not the underlying
memory.
[CI][libclc] Enable libclc in premerge CI with single target (#186104)
Enable libclc build and test in the Linux premerge CI when libclc or .ci
files are modified.
To minimize build time, only build the amdgcn-amd-amdhsa-llvm target.
[RISCV][NFC] Remove duplicate setTargetDAGCombine registrations (#186928)
ISD::SRA and ISD::MUL are already registered unconditionally in the
constructor, so remove the redundant registrations from the
hasVInstructions() block. Fold the standalone SRA call into the existing
brace-initializer list.
---------
Co-authored-by: Claude Opus 4.6 <noreply at anthropic.com>
[LV] Optimize x && (x && y) -> x && y (#185806)
This patch removes the extra logical-and in `x && (x && y)` and `x && (y && x)` to `x && y`.
This helps to simplify mask calculation in the FindLast reduction and
exposes more opportunities to replace to EVL.
PR link: https://github.com/llvm/llvm-project/pull/185806
[orc-rt] Add ControllerInterface symbol table. (#186947)
ControllerInterface holds the set of named symbols that the ORC runtime
exposes to the controller for bootstrapping the ExecutionSession.
Insertion is checked: duplicate symbols are rejected with an error.
Session is updated to own a ControllerInterface instance, pre-populated
with an orc_rt_SessionInstance entry pointing to the Session object.
AArch64: Look through copies in CCMP converter.
The usual IR pattern for llvm.ptrauth.auth involves creating an
inttoptr for the auth operation to convert the result into a pointer.
CodeGenPrepare will copy these inttoptr operations into the user basic
blocks as this generally results in more efficient code. However, this is
not the case for the CCMP converter as it will encounter a COPY created
by the inttoptr and inhibit the optimization. Fix it by looking through
copies in the CCMP converter pass.
Assisted-by: gemini (wrote test)
Reviewers: davemgreen, fmayer, atrosinenko
Reviewed By: fmayer
Pull Request: https://github.com/llvm/llvm-project/pull/186842
[ValueTracking] frem in computeKnownFPClass can not return +/-Inf (#186748)
`frem` only produces finite numbers or NaN, never +/-Inf. Before the
patch `computeKnownFPClass` failed to clear the `fcInf` mask for
`Instruction::FRem`, causing potential missed optimizations.
Fix #186746.
[mlir][Interfaces][NFC] Improve time complexity of RegionBranchOpInterface canonicalization patterns (#186114)
Optimize RemoveDuplicateSuccessorInputUses in
`ControlFlowInterfaces.cpp`:
- Replace O(n² * k) pairwise comparison of successor inputs with O(n * k
* max(log k, log n)) signature-based grouping using `std::map`, where
_n_ is the number of successor inputs and _k_ is the number of
predecessors per input.
Assisted-by: Claude Code
---------
Co-authored-by: Yang Bai <yangb at nvidia.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply at anthropic.com>
[llvm-ir2vec] Refactoring the ir2vec python bindings testing (#180664)
This is order to make it more thorough and cover the API and possible
exceptions better
[clang][OpenMP] Parse/Sema for OpenMP 6.0 declare_target 'local' clause (#186281)
Parse and perform semantic checks for declare_target 'local' clause.
When compiling for device offloading, generate a warning that 'local' is
not yet fully supported. On the host, 'local' is/will be a no-op, so no
warning is generated.
NOTE: The minimal CodeGen changes allow 'local' to flow through as
equivalent to the 'enter' clause after warning is generated.
Testing:
- Updated messages and ast tests for declare target/declare_target
- ninja check-all.
[AMDGPU] Add s_sethalt to hasUnwantedEffectsWhenEXECEmpty (#186745)
We don't want to execute s_sethalt when all lanes want to skip it.
Co-authored-by: Junda Liu <Junda.Liu at amd.com>
[clang] Backport: use canonical arguments for checking function template constraints
Backport from #186889
This is a partial revert of #161671, restoring the original behaviour
where the canonical template arguments are used for function template
constraint checking in diagnostics.
This reverts the fix from #183010, which attempted to fix #182344
but it causes regressions. These regressions now have test cases
included.
The attempt at #183010 is flawed because in the general case we can't
check satisfaction for constraints which have unsubstituted template
arguments, even if they don't affect the canonical type (ie they are
purely
syntactical), because these types can still turn out to be invalid after
substitution.
[20 lines not shown]
[libclc][CMake] Use clang/llvm-ar on Windows (#186726)
When LLVM_TARGETS_TO_BUILD contains host target, runtime build sets
CMAKE_C_COMPILER to clang-cl on Windows.
Changes to fix build on Windows:
- libclc struggles to pass specific flags to clang-cl MSVC-like interface.
- compile flag handling will be consistent across all host systems.
- libclc build is cross-compilation for offloading targets.
[clang] Backport: use canonical arguments for checking function template constraints
Backport from #186889
This is a partial revert of #161671, restoring the original behaviour
where the canonical template arguments are used for function template
constraint checking in diagnostics.
This reverts the fix from #183010, which attempted to fix #182344
but it causes regressions. These regressions now have test cases
included.
The attempt at #183010 is flawed because in the general case we can't
check satisfaction for constraints which have unsubstituted template
arguments, even if they don't affect the canonical type (ie they are
purely
syntactical), because these types can still turn out to be invalid after
substitution.
[20 lines not shown]
[clang] use canonical arguments for checking function template constraints (#186889)
This is a partial revert of #161671, restoring the original behaviour
where the canonical template arguments are used for function template
constraint checking in diagnostics.
This reverts the fix from #183010, which attempted to fix #182344
but it causes regressions. These regressions now have test cases
included.
The attempt at #183010 is flawed because in the general case we can't
check satisfaction for constraints which have unsubstituted template
arguments, even if they don't affect the canonical type (ie they are
purely
syntactical), because these types can still turn out to be invalid after
substitution.
This is a problem when directly evaluating a concept specialization, but
it's not a problem with other template specializations because the
[18 lines not shown]