[Mips] Fix the MIPS I %lo offset fold for loads and stores (#245716)
On MIPS I a double is loaded or stored with two lwc1 or swc1, and
selectAddrFrameIndexOffset() folds the %lo of the address into both.
That fold had three bugs:
- For a constant pool entry it dropped the %lo but kept the offset, so
the second half of an f64 constant was loaded from %hi(sym) + 4.
- For a global it always used %lo, so a $gp relative address got
%lo(sym+4)($gp) instead of %gp_rel(sym+4)($gp).
- Inline asm memory operands could get a symbolic offset, which hit an
assertion in MipsAsmPrinter::PrintAsmMemoryOperand().
Fold the offset into the constant pool entry or global with its own
relocation, only when the offset is within the alignment of the
symbol, so %hi(sym) is also %hi(sym+offset), as GCC does. Do not fold
jump tables, and only accept an immediate offset for inline asm memory
operands.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
mail/stalwart*: change maintainer to jsi at jules.de
Existing maintainer is not reachable, domain anislet.dev
does not have neither MX or A records and port has active security
issues.
[C++20] [Modules] Correct Module Ownership and use canonical decl (#246565)
Close https://github.com/llvm/llvm-project/issues/245967
The root cause of the issue is that we didn't give deduction guide the
correct module ownership and we didn't use canonical decl correctly.
[OFFLOAD][L0] Skip Memcpy3D test in L0 (#246569)
One of the new Memcpy3D tests (SuccessSingleSliceZOffset) is failing in
some of the bulidbots configurations. Mark as skip while we investigate
the issue.
libvmmapi: Compare mapping lengths in vm_mmap_memseg()
vm_mmap_memseg() returns success without mapping anything when a
mapping with the same segment, offset, protection and flags already
starts at the requested address, but it does not compare the length.
A longer request then reports success for pages it did not map, and a
shorter one for a mapping that vm_munmap_memseg() cannot remove with
the same range. No caller in the tree makes such a request.
Fail with EEXIST when the length differs, as for the other attributes,
and document that behavior. Read the existing mapping into its own
structure rather than over the arguments.
Reviewed by: markj
Approved by: markj
Fixes: 9b1aa8d622e8 (Restructure memory allocation in bhyve to support "devmem".)
Sponsored by: Alchemilla Ventures Private Limited
Differential Revision: https://reviews.freebsd.org/D61530
[AMDGPU][GlobalISel] Fix ds_append/ds_consume addressing
This matches the SelectionDAG fix. For LDS, ds_append and ds_consume
address memory only through the 16 bit instruction offset and ignore
M0, but the selector copied the pointer base into M0. Select a constant,
dword aligned LDS address into the offset field and diagnose any other
LDS address as unsupported.
For GDS, the offset field must be zero and the address comes from
M0.base, so build M0 as `(addr << 16) | gds_size`. Using GDS on a
subtarget without GDS is now diagnosed.
```
; call i32 @llvm.amdgcn.ds.append.p3(ptr addrspace(3) inttoptr (i32 16 to ptr addrspace(3)), i1 false)
; before
s_mov_b32 m0, 16
ds_append v0
; after
ds_append v0 offset:16
```
[AMDGPU] Fix ds_append/ds_consume addressing in SelectionDAG
For LDS, ds_append and ds_consume address memory only through the 16 bit
instruction offset. M0 is not used, but isel put the pointer (or its
base) into M0, so the counter was read at the wrong address. Select a
constant, dword aligned LDS address into the offset field and diagnose
any other LDS address as unsupported.
For GDS, the ISA requires the offset field to be zero and takes the
address from M0.base, so pack the whole address into M0 as
`(addr << 16) | gds_size`. Using GDS on a subtarget without GDS is now
diagnosed instead of silently encoding a GDS bit.
```
; call i32 @llvm.amdgcn.ds.append.p3(ptr addrspace(3) inttoptr (i32 16 to ptr addrspace(3)), i1 false)
; before
s_mov_b32 m0, 16
ds_append v0
; after
[4 lines not shown]
bhyve: Preserve string I/O registers on faults before progress
When a string I/O instruction faults on its first transfer, the emulator
injects the exception but still writes the masked index and count back
to the guest. With a 32-bit address size in 64-bit mode this clears
the upper halves of RSI or RDI and of RCX, although no transfer
completed and the processor reports such a fault with the registers
unchanged.
Return before updating the registers whenever no transfer completed,
whether an error, a guest fault or an injected exception stopped the
first one. Exception injection has already restarted the instruction.
A repeated instruction with a zero count is handled as before.
Reviewed by: markj
Approved by: markj
Sponsored by: Alchemilla Ventures Private Limited
Differential Revision: https://reviews.freebsd.org/D61499
bhyve: Preserve upper RAX bits for byte and word input
Scalar IN merges the input into a 32-bit EAX temporary and writes that
value to RAX. This clears bits 63:32 for byte and word inputs, which
must preserve the bits outside AL or AX.
Use vie_update_register() to update the accumulator at the operand
width. This preserves the remaining bits for byte and word inputs and
retains zero-extension for dword inputs.
Reviewed by: markj
Approved by: markj
Sponsored by: Alchemilla Ventures Private Limited
Differential Revision: https://reviews.freebsd.org/D61498
[LoongArch] Force a frame pointer for large call frames (#242625)
A large reserved call frame can push the emergency spill slot out of
reach of SP. Accessing the emergency spill slot can require a scratch
register. If none is free, scavenging fails with "Incomplete scavenging
after 2nd pass".
Adapt the RISC-V fixes from #181302 and #182124.
Compute the maximum call frame size at the end of ISel, before reserved
registers are frozen, and when loading MIR. Force a frame pointer when
the maximum call frame size exceeds the int12 range on LA32 or the int15
range on LA64, so the emergency spill slot can be addressed from FP.
LLM assisted.
[Mips] Use IMPLICIT_DEF and INSERT_SUBREG to insert an FP value into an MSA vector. NFC (#242320)
The lowering of INSERT_FW, INSERT_FD and the floating-point variants of
INSERT_*_VIDX used SUBREG_TO_REG to view the FP register as an MSA
register. SUBREG_TO_REG means that the instruction defining the FP
register also defined the rest of the MSA register, which is not the
case. Only element 0 is used, so the rest is undefined, which is what
IMPLICIT_DEF and INSERT_SUBREG express. This matches the lowering of
FILL_FW and FILL_FD.
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
---
<sub>Stack created with <a
href="https://github.com/github/gh-stack">GitHub Stacks CLI</a> • <a
href="https://gh.io/stacks-feedback">Give Feedback 💬</a></sub>
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[Mips] Use INSERT_SUBREG of IMPLICIT_DEF for the halves of a 64-bit MSA splat. NFC (#242321)
When synthesizing a 64-bit splat value on MIPS64, the high and low
32-bit
halves are computed as i32 values and then combined with dinsu or
dsll32, which do not use the high 32 bits of the halves. Widen the
halves to i64 with INSERT_SUBREG into an IMPLICIT_DEF instead of
SUBREG_TO_REG, since nothing depends on the value of their high bits.
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
[AMDGPU][GlobalISel] Fix ds_append/ds_consume addressing
This matches the SelectionDAG fix. For LDS, ds_append and ds_consume
address memory only through the 16 bit instruction offset and ignore
M0, but the selector copied the pointer base into M0. Select a constant,
dword aligned LDS address into the offset field and diagnose any other
LDS address as unsupported.
For GDS, the offset field must be zero and the address comes from
M0.base, so build M0 as `(addr << 16) | gds_size`. Using GDS on a
subtarget without GDS is now diagnosed.
```
; call i32 @llvm.amdgcn.ds.append.p3(ptr addrspace(3) inttoptr (i32 16 to ptr addrspace(3)), i1 false)
; before
s_mov_b32 m0, 16
ds_append v0
; after
ds_append v0 offset:16
```
[AMDGPU] Fix ds_append/ds_consume addressing in SelectionDAG
For LDS, ds_append and ds_consume address memory only through the 16 bit
instruction offset. M0 is not used, but isel put the pointer (or its
base) into M0, so the counter was read at the wrong address. Select a
constant, dword aligned LDS address into the offset field and diagnose
any other LDS address as unsupported.
For GDS, the ISA requires the offset field to be zero and takes the
address from M0.base, so pack the whole address into M0 as
`(addr << 16) | gds_size`. Using GDS on a subtarget without GDS is now
diagnosed instead of silently encoding a GDS bit.
```
; call i32 @llvm.amdgcn.ds.append.p3(ptr addrspace(3) inttoptr (i32 16 to ptr addrspace(3)), i1 false)
; before
s_mov_b32 m0, 16
ds_append v0
; after
[4 lines not shown]
[AMDGPU] Stop sinking addresses into ds_append/ds_consume
ds_append and ds_consume have no address register operand. For LDS the
address comes only from the 16 bit offset field, and M0 is not used. The
register plus immediate DS addressing mode reported through
getAddrModeArguments does not apply, so CodeGenPrepare should not sink
address computations into these intrinsics.
```llvm
entry:
%in.gep = getelementptr i32, ptr addrspace(3) %in, i32 7
br i1 %cond, label %endif, label %if
if:
%val = call i32 @llvm.amdgcn.ds.append.p3(ptr addrspace(3) %in.gep, i1 false)
; before: CodeGenPrepare sinks the address into %if
%sunkaddr = getelementptr i8, ptr addrspace(3) %in, i32 28
%val = call i32 @llvm.amdgcn.ds.append.p3(ptr addrspace(3) %sunkaddr, i1 false)
; after: the call keeps using %in.gep
[5 lines not shown]
[IR] Remove unused PreservedAnalyses::AllAnalysesKey (NFC) (#246512)
The last readers were removed on November 16, 2026 in commit
e46986d56fa367465d141d005eae8a9a4ce1c29a. This patch also removes the
write-only insertion into PreservedIDs in PreservedAnalyses::all.
Assisted-by: Antigravity