VE: Stop adding kill flags in setjmp custom inserter (#233201)
There is no reason anymore to set these before register allocation.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[NVPTX] Set default value of nvptx-allow-ftz-atomics to false
This restores the strict FTZ default originally introduced in #200732
and temporarily relaxed in #206154.
Frontends can now explicitly opt in to native FTZ-mismatched atomics on a
per-instruction basis using `!atomic.ignore.denormal.mode` metadata (#217585,
#217586, #217587, #217588, #232725, #232726), which is supported in Clang,
Flang, MLIR, and XLA. Users who need the previous behavior globally can still
pass `-nvptx-allow-ftz-atomics=true`.
Update test cases to verify the new default disallow behavior.
[libc][fuzzing] Re-enable math fuzzing with internal headers (#231744)
Re-enable math fuzzing after header inclusion decoupling.
- Replace `<math.h>` with `"hdr/math_function_macros.h"` across math
fuzzers and add CMake dependencies.
- Re-enable `add_subdirectory(math)` in `libc/fuzzing/CMakeLists.txt`.
- Forward `LINK_LIBRARIES` in `add_libc_fuzzer`.
- Skip comparing unspecified `frexp` side-effects for NaN/Inf in
`SingleInputSingleOutputDiff.h`.
Fixes #85680
Assisted-by: Automated tooling, human reviewed.
[flang][CUDA] Emit ignore_denormal_mode for CUDA Fortran atomicadd (#232726)
CUDA Fortran `atomicadd` has the same device semantics as CUDA C++
`atomicAdd()`, targeting PTX `atom.add` (which flushes f32 denormals to
zero on global memory).
Set `ignore_denormal_mode` on `mlir::LLVM::AtomicRMWOp` when lowering
CUDA Fortran `atomicadd` for floating-point types in `genAtomBinOp`,
matching Clang's CUDA/HIP `atomicAdd` lowering (#217587) so it continues
to emit native `atom.add.f32` when `-nvptx-allow-ftz-atomics` defaults
to `false` (#231429).
[SLP][modularisation][NFC] Move isFirstInsertElement/getDebugLocFromPHI to SLPUtils (#222612)
Move the BoUpSLP-independent helpers isFirstInsertElement and
getDebugLocFromPHI out of SLPVectorizer.cpp into the self-contained
SLPVectorizer/SLPUtils.{h,cpp} module.
Part of the SLPVectorizer.cpp modularization effort:
https://discourse.llvm.org/t/modularizing-slpvectorizer-cpp/90922
[tools] Parse library options into LLVMContext (#233194)
cl::ParseCommandLineOptions sets library options in T::Global, so IR
options will no longer affect them after LLVMCore migrates off cl::opt.
Switch to cl::parseCommandLineOptions.
[clang][Driver] Use the Windows ARM64 defaults for aarch64-unknown-uefi
Match the Windows ARM64 driver defaults for aarch64-unknown-uefi, which
follows the same ABI:
* char is signed, so do not pass -fno-signed-char,
* the frame chain must stay valid even when frame pointers are omitted,
so -fomit-frame-pointer yields -mframe-pointer=reserved rather than
none, as the backend reserves the frame pointer for UEFI as well,
* -msign-return-address selects the B key, the only one the backend
accepts for Windows and UEFI.
Assisted-by: Claude
[clang] Add aarch64-unknown-uefi target
Add the aarch64-unknown-uefi target to clang, building on the backend
support added in the preceding patches. Like x86_64-unknown-uefi it
follows the Microsoft ABI conventions, matching the Windows ARM64 target
which is the only way EFI applications for AArch64 can be built with
Clang/LLVM today:
* add UEFIAArch64TargetInfo: LLP64 types, Microsoft C++ ABI, char*
based va_list and the Win64 calling convention kind,
* use the Windows AArch64 ABI info in CodeGen for UEFI,
* accept aarch64 for *-uefi triples in the driver.
The UEFI toolchain already handles the linker invocation (lld-link with
/subsystem:efi_application), so no further driver changes are needed.
Assisted-by: Claude
[AArch64] Apply the Windows SEH and CRT codegen constraints to UEFI
aarch64-unknown-uefi uses SEH unwind information and has no C runtime
library, so the remaining Windows specific codegen decisions that follow
from this apply to it too:
* do not align loops or basic blocks, since SEH unwind info generation
needs the exact function layout before alignment padding is inserted,
* sign return addresses with the B key by default and reject A key
signing, matching the pac_sign_lr unwind code used by the unwinder;
the branch protection parser defaults to the B key for UEFI as well,
so that -mbranch-protection=pac-ret keeps working,
* do not lower wide shifts to libcalls at -Oz, as those helpers are not
available.
The corresponding Windows tests gain aarch64-unknown-uefi run lines and
the LLVM release notes announce the new target, which completes the
backend side of aarch64-unknown-uefi support.
Assisted-by: Claude
[SLP][modularisation][NFC] Move getReductionInstr to SLPReductionUtils, getAggregateSize to SLPUtils
Move the reduction-root helper getReductionInstr out of SLPVectorizer.cpp
into the self-contained SLPVectorizer/SLPReductionUtils.{h,cpp} module.
getAggregateSize is not reduction-specific: its only user is
findBuildAggregate and it only computes the element count of a homogeneous
aggregate from its type. Move it to the generic SLPVectorizer/SLPUtils
module instead.
Part of the SLPVectorizer.cpp modularization effort:
https://discourse.llvm.org/t/modularizing-slpvectorizer-cpp/90922
Assisted by AI
[SLP][modularisation][NFC] Move loop trip-count helpers to SLPUtils
Move the BoUpSLP-independent helpers findInnermostNonInvariantLoop and
getLoopTripCount out of SLPVectorizer.cpp into the self-contained
SLPVectorizer/SLPUtils.{h,cpp} module. getLoopTripCount reads the file-local
LoopAwareTripCount cl::opt, which stays static in SLPVectorizer.cpp and is
passed to the moved helper as an explicit parameter. NFC.
Part of the SLPVectorizer.cpp modularization effort:
https://discourse.llvm.org/t/modularizing-slpvectorizer-cpp/90922
[clang-tidy] Fix readability-redundant-parentheses false positives on decltype (#224715)
Preserve parentheses that affect type deduction in `decltype` operands
and
`decltype(auto)` initializers and return statements. This also covers
dependent operands in templates and their instantiations, and operands
that create temporaries. Continue diagnosing redundant parentheses whose
removal does not affect type deduction, such as those in
`decltype((1))`.
Fixes #223522.
x11-fm/cosmic-files: New port: File manager for the COSMIC desktop environment
COSMIC Files is the official file manager of the COSMIC desktop
environment. It supports common features such as thumbnailing,
archive creation and extraction, and external mounts such as
USB drives or remote file systems.
COSMIC Files also implements a desktop applet and XDG's file
chooser interface.
WWW: https://github.com/pop-os/cosmic-files
PR: 299137
Reported by: Josh Megnauth <jo.sh at tutanota.com>
x11-fm/cosmic-files: New port: File manager for the COSMIC desktop environment
COSMIC Files is the official file manager of the COSMIC desktop
environment. It supports common features such as thumbnailing,
archive creation and extraction, and external mounts such as
USB drives or remote file systems.
COSMIC Files also implements a desktop applet and XDG's file
chooser interface.
WWW: https://github.com/pop-os/cosmic-files
PR: 299137
Reported by: Josh Megnauth <jo.sh at tutanota.com>
Test constrained and explicit object operators in defaulted postfix operators
Cover prefix and postfix operators that are constrained or declared with
an explicit object parameter, and add the remaining deletion and
constexpr-mismatch notes that were not yet tested: the decrement forms,
protected members, and non-constexpr constructors, conversion functions
and consteval declarations.
Co-Authored-By: Claude Fable 5.1 <noreply at anthropic.com>
Defer all defaulted postfix operator checks in dependent contexts
Return early from CheckExplicitlyDefaultedPostfixOperator when the first
parameter type is dependent or the function is in a dependent context,
after the prefix operator lookup. A deduced return type in a template is
now diagnosed when the template is instantiated.
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
Extract the copy and destroy check for defaulted postfix operators
Move the checks that C can be direct-initialized from an lvalue of type C
and then destroyed, from the context of the function body, into
canCopyAndDestroyForDefaultedPostfixOperator.
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>