Clear the login rate limit in the password expiry unit tests
auth.login_ex over TCP is limited to 20 calls per minute per IP, and
logins made by earlier tests in the run count against that limit.
test__password_expired and test__password_expiry_warning could then
fail with EBUSY "Rate Limit Exceeded" depending on test order and
timing.
Clear the rate limit cache before these two tests only.
[SandboxIR] Fix GCC warning (NFC) (#244379)
GCC was complaining about LLVM_TEMPLATE_ABI in:
`extern template class LLVM_TEMPLATE_ABI
SwitchInst::CaseHandleImpl<llvm::SwitchInst::CaseIt, BasicBlock,
ConstantInt>`
```
warning: type attributes ignored after type is already defined [-Wattributes]
```
This patch gets rid of the warning.
[SanitizerCoverage] Give calls inserted into funclets their funclet bundle (#226762)
With scoped EH (MSVC C++), `WinEHPrepare` requires calls inside a catch
or cleanup funclet to carry a `"funclet"` operand bundle naming the
funclet's pad. Because `SanitizerCoverage` inserted its runtime calls
without one, `WinEHPrepare` treated them as implausible and replaced the
call and the rest of its basic block with `unreachable`, dropping catch
handler bodies that contain comparisons or indirect calls under
`-fsanitize=fuzzer`.
Color the function's EH funclets after instrumentation and attach the
enclosing pad's `"funclet"` bundle to inserted runtime calls, similar to
`AddressSanitizer`.
Fixes #212404
Assisted-by: Claude Code (Claude Opus 5.5)
[RISCV] Remove unused RISCVAsmBackend::getTargetOptions (NFC) (#244651)
The last caller was removed on September 23, 2026 in commit
674fd8d37e9b5806bc1a7ff31dc56bf3a0839c6b. This patch also removes the
now-unused TargetOptions member variable.
Assisted-by: Antigravity
[Mips] Remove unused MipsSubtarget::MIPS1WarningPrinted (NFC) (#244650)
The definition and last uses were removed on September 19, 2026 in
commit 73641283fc038d819b5a0d3e5fd1315d501ff9e1.
Assisted-by: Antigravity
[RISCV] Specially handle multiply by negative power-of-two cases (#244731)
Prior to this change, for power-of-two negative values in
`expandMulToAddOrSubOfShl()`, the `Shift1` was calculated as a `SHL` by
`32`, which for `i32` overflows, so is considered `undef`. In addition,
for the `i64` negative power-of-two case, `MulAmt + MulAmtLowBit`
overflowed in `uint64_t` causing a missed optimization.
Fixes #244328
Based on discussions with @lenary.
AI Usage: Reviewed by Codex.
Add a -b option to fsck(8) to specify an alternative superblock.
Pass the -b flag from the wrapper to the underlying filesystem checker.
This allows users to specify superblock directly without the need to
invoke the underlying checker manually.
Reported by: Aadya Chinubhai <aadyachinubhai at gmail.com>
PR: 27687 (from May 2001)
MFC after: 1 week
[SystemZ][z/OS] Fix unsued variable error (#244755)
Missed a variable only used in assert. Fix is to move the call inside
the assert, and remove the variable.
[RISCV] Rewrite scratch register search in LowerKCFI_CHECK to avoid incrementing past X31. (#240941)
We don't know where X31 is in the register list, we really shouldn't
look at values after it.
Use a list of scratch registers instead of incrementing the register id.
This allows us to check when we we've reached the end of the array.
While there change unsigned to MCRegister and MCPhysReg.
Assisted-by: Claude
[MC] Emit line table rows for subsections in layout order (#242138)
Line table entries are recorded per section in emission order, but
subsections are laid out after subsection 0 in increasing order of their
numbers. For example, assembling the following with -g:
```
.text
nop # 0x0
.subsection 1
nop # 0x2
.subsection 0
nop # 0x1
```
produces rows for 0x0, 0x2 and 0x1, in that order. The negative address
delta of the last row is encoded as a wrapped-around unsigned
DW_LNS_advance_pc operand. DWARF requires addresses to only increase
within a sequence: llvm-dwarfdump --verify reports "decreases in address
from previous row", and consumers using checked arithmetic, such as
gimli, reject the whole line program. The Linux kernel hits this on
[21 lines not shown]
[dsymutil] Warn when the relocations of an object file were all lost (#241515)
A valid relocation is against a symbol of the binary, whose DIE is kept
along with the relocation.
An object file with valid relocations that saves none of them to the
relocation map has lost them, and merging the library would drop its
debug info.
That is how the relocation maps came out empty without notice. dsymutil
now warns about it.
Depends on #241512, only the last commit is new.
[InstCombine] Fold either-operand icmp patterns in foldICmpCommutative
Second patch in the icmp opcode-switch series. Five folds in the tail of
`visitICmpInst` accept their pattern on either operand, using `m_c_ICmp` or
hand-written checks of both orders, and we try all of them on every icmp.
This patch rewrites each one to look at Op0 only, and dispatches it on Op0's
opcode from a function that we call once per operand order, as we already do
for `foldICmpCommutative`.
The sub-vs-add fold becomes a `Sub` case of `foldICmpCommutative`. The rest go
into a second switch, `foldICmpCommutativeLate`, called right after
`foldICmpEquality`:
- the uadd.with.overflow idiom and `foldICmpWithHighBitMask` under `Add`
- `foldICmpPow2Test` under `And`
- `foldICmpPow2Test` and `foldICmpWithHighBitMask` under `Xor`
- `foldICmpWithHighBitMask` under `Shl`
- `foldICmpOfUAddOv` under `ExtractValue`
- the shr/ext sign-bit fold under `LShr`/`AShr`
[17 lines not shown]
[InstCombine] Move more icmp folds keyed on Op0 into the switch
`visitICmpInst` now has a long linear tail of fold patterns that we test
one-by-one. Each of them reloads and recomputes its matcher criteria
independently, and we spend O(#folds) instructions searching for a match.
This is the first of three patches that reshape `visitICmpInst` to be more
switch-driven, as we did in #243249 for `foldICmpCommutative`. The idea is to
switch on an operand's opcode, and keep each fold in the case for the opcode it
needs. This patch covers 10 simple folds keyed only on the Op0 opcode.
Four of them are folds of `icmp Op0, C`, and move into the existing switch in
`foldICmpInstWithConstantNotInt`:
- `(X & ~Y) ==/!= 0` and `sext(A) & C1 ==/!= C2` under `And`
- the `(zext X) +/* (zext Y)` overflow idiom under `Add`/`Mul`
- `foldICmpOfVectorReduce` under `Call`
The three constant-RHS entry points now sit behind one `isa<Constant>(Op1)`
test.
[22 lines not shown]
[InstCombine] Add test expectations for `icmp ult (1 << a), (1 << b)`
`foldICmpWithHighBitMask` transforms `icmp ugt (1 << a), (1 << b)` into a test
of the high bits. However, we can do a similar transform for `icmp ult (1 << a),
(1 << b)`, which we currently don't have, because the fold commits to the first
operand that matches `1 << Y` and gives up if the predicate does not fit.
In anticipation of fixing that phase ordering issue, add the baseline test
expectations for this pattern.
LLM-aided
[InstCombine] Skip icmp folds whose operand opcodes are absent
Last patch in the icmp opcode-switch series. The earlier patches moved folds
into opcode switches. The folds here cannot move, because the code around them
is order sensitive, so this patch leaves each one at its current position and
tests the operand opcodes, computed once, before attempting it.
Before the min/max bailout, `foldICmpTruncWithTruncOrExt` now runs only when
an operand is a trunc, `foldICmpUsingBoolRange` only for a zext or sext, and
`foldIsMultipleOfAPowerOfTwo` only for an and. After `foldICmpCommutative`,
`matchSymmetricPair`, `foldCmpSelectOfConstants` and the select/select
same-condition fold all need both operands to share an opcode (PHI, Call or
Select), so they now sit in a switch on that shared opcode. Most of the diff
is the reindentation of that last group.
I previously proposed adding these opcode guards in #243249, but I broke them
out into this change to profile and consider separately. The tests are at the
call sites rather than inside the helpers, so the fold order stays visible in
one place.
[8 lines not shown]
Reland "[RISCV] Make clang's -mcpu=help and -mtune=help accurate for RISC-V." (#244736)
With the minimal fix for flang which shares the Options.td, but not the
other code.
Original message:
Clang has multiple -mtune only CPU names like -mtune=sifive-7-series.
These should not be printed by -mcpu=help. There also RV32 and RV64 only
CPUs.
Previously we used the -mcpu=help from LLVM's MC layer to print the
names, but it doesn't have this granularity of information.
This patch special cases RISC-V in the clang driver to get the lists
from RISCVTargetParser. A new -print-supported-tune-cpus option is added
to request the tune CPU list. -mtune=help aliases this option.
The behavior for other targets is unchanged. Though X86 has similar
[2 lines not shown]
InferFunctionAttrs: Preserve CFG and TargetLibraryInfo analyses
InferFunctionAttrs reported no preserved analyses whenever it inferred
anything, which clears every cached function analysis in the module.
It only adds attributes to declarations, so preserve the CFG analyses
and TargetLibraryInfo.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
clang: Only add codegen function attributes to definitions
Attributes like "frame-pointer", "no-trapping-math" and
"stack-protector-buffer-size" only affect the code generated for a
function body, but were also added to every declaration. Stop adding
them when constructing the attribute list, and add them only to
function definitions.
"target-cpu" and "target-features" are left on declarations for now,
since unfortunately some targets change ABI based on them. This cuts
down on some attribute group spam. This will also simplify improved
libfunc attribute inference in the future (e.g., InferFuncAttrs could
trivially assign the authoritative attribute sets without a spurious
IR change from losing the unnecessary declaration attributes).
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[CIR] Introduce `cir-offload-merge` tool with a combine mode (#240322)
Add `cir-offload-merge`, a standalone tool that nests a host CIR module
and its device CIR modules in an offload container (the
`cir.offload.container` module added in #206576). This is the first
piece of the Host-Device CIR Combine Pipeline: passes that need both
sides of an offload compilation in one module will run on this
container, and a split mode will write the modules back out per target.
invocation:
```bash
cir-offload-merge -combine host.cir gfx90a-xnack-on.cir gfx90a-xnack-off.cir -o combined.cir
```
IR:
```mlir
module attributes {cir.offload.container} {
module @host attributes {
cir.lowering_options = #cir.lowering_options<..., cuda_is_device = false, hip = true, ...>,
cir.offload.kind = #cir.offload<host>, ...} {...}
[36 lines not shown]