[Mips] Mark immediate branch macros as having delay slots (#217565)
Immediate conditional branch macros expand to real branches with delay
slots, but their pseudo-instruction definitions did not carry
`hasDelaySlot`. Mark them consistently with the register forms so IAS
inserts a delay-slot `nop` under `.set reorder`.
Adds `llvm/test/MC/Mips/macro-bcc-imm-delay-slot.s` covering reordered
and non-reordered expansion.
Fixes #217368
[DAG] Remove trivial VP SDNodes. NFC (#217866)
This removes the codegen parts of the trivial VP intrinsics. It's quite
far reaching, but the general categories of code removed are:
- Removing definitions from VPIntrinsics.def
- Legalization and expansion code
- MatchContext used to match over both VP and non-VP nodes
- Some dead DAGCombines and folds in SelectionDAGBuilder
There are still more things to be cleaned up after this, e.g. removing
more of the VPIntrinsic class hierarchy, removing
ExpandVectorPredication/moving expansion into other places, removing
MatchContext from SDPatternMatch
[DAG] Remove trivial VP SDNodes. NFC
This removes the codegen parts of the trivial VP intrinsics. It's quite far reaching, but the general categories of code removed are:
- Removing definitions from VPIntrinsics.def
- Legalization and expansion code
- MatchContext used to match over both VP and non-VP nodes
- Some dead DAGCombines and folds in SelectionDAGBuilder
There are still more things to be cleaned up after this, e.g. removing more of the VPIntrinsic class hierarchy, removing ExpandVectorPredication/moving expansion into other places, removing MatchContext from SDPatternMatch
AArch64: Fix MIPeepholeOpt null dereference on undef source operands
Fix unchecked getUniqueVRegDef calls. This is also an SSA pass, and has
no reason to use getUniqueVRegDef over getVRegDef, so also make that
change.
Co-Authored-By: Claude <noreply at anthropic.com> (Claude Opus 4.8)
[clang] Add test for CWG 2006 and update status (#215259)
Clang already supports CWG 2006. Adding test cases and updating
`cxx_dr_status.html` to 2.7.
https://cplusplus.github.io/CWG/issues/2006.html
Assisted by Claude.
workflows/release-binaries: Install Wix on Windows ARM64 (#217707)
Wix is used for generating the installer and is not installed by default
on Windows ARM64.
(cherry picked from commit f75f48e3ce41227c5a0ae5d2c6d6ea90100b9bc4)
workflows: Merge release-doxygen into release-documenation (#214366)
These two workflows use the same script and have the same structure,
so it's easier just to have one job that builds both.
(cherry picked from commit 2d47daa636204868874ce88e55992b096904411e)
[clang-tidy] Fix crashes when analyzing unknown exceptions in bugprone-exception-escape (#218067)
`ExceptionAnalyzer` represents exceptions of unknown type with a null
`Type`, but some consumers dereferenced it unconditionally, resulting in
a crash when `TreatFunctionsWithoutSpecificationAsThrowing` is enabled.
This commit fixes the problem by skipping type-dependent processing for
unknown exceptions.
Fixes #217649
(cherry picked from commit c0feba8bedbfda4f1a2f3727f2ef270fcc6ca138)
[RISCV] Use correct type for (u)int64_t in RVV intrinsics on OpenBSD (#217211)
The intrinsics are documented to use (u)int64_t for 64-bit scalars.
OpenBSD on RV64 uses long long for int64_t while Linux uses long. The
current code finds the first 64 bit type which is long for both OpenBSD
and Linux.
This patch looks up the type that corresponds to (u)int64_t.
Fixes #216531.
Assisted-by: Claude
(cherry picked from commit fd6d7a608909dc4ecea57e0155042d16f7b4e61a)
[clang][win] Fix __global_delete breaking __attribute__((used)) (#217753)
The `__empty_global_delete` fallback introduced in #209585 was marked
used via `llvm::appendToUsed()`, which creates a global named
"llvm.used" during codegen. `CodeGenModule::emitLLVMUsed()` later
unconditionally creates its own global of that same name at end-of-TU,
so the name collision renamed the latter to "llvm.used.1" -- a name LLVM
ignores. The result was that every `__attribute__((used))` global in the
TU silently lost its used semantics whenever a `__global_delete` wrapper
was emitted, letting those symbols be dropped.
Mark the fallback used via `CodeGenModule::addUsedGlobal()` instead, so
it joins the single llvm.used that `emitLLVMUsed()` emits.
`emitLLVMUsed()` runs well after `emitGlobalDeleteForwardingBodies()` in
`Release()`, so the fallback is still recorded in time.
Fixes a regression reported on #209585.
(cherry picked from commit 061865f32607cd064ab944407cc863186702d6f1)
[Mips] Legalize vector UNDEF instead of expanding to zero BUILD_VECTOR (#211503)
Currently, MIPS MSA expands ISD::UNDEF into a BUILD_VECTOR of all zeros
during legalization. This creates an infinite loop in DAGCombiner when
the following occurs:
1.Mips lower BUILD_VECTOR expands non-splat vectors into
INSERT_VECTOR_ELT with creating undef node
2.Then legalization expands UNDEF back to BUILD_VECTOR zero
3.Mips lower BUILD_VECTOR converts zero vector to BITCAST
4.DAGCombiner optimizes BITCAST(zero) to UNDEF
5.Back to step 2, infinite loop
Fix #210229.
(cherry picked from commit b1c24ea77d2aab84f9e8ccb9389bc4366c41e8dd)