[libc][cmake] Indent hanging CMake lines by 4 spaces (#240832)
Indenting wrapped control-flow headers and header-line keyword lists by
2 spaces makes continuation lines visually indistinguishable from child
control blocks and sibling 2-space keyword sub-stanzas beneath them.
Updated cmake_format.py to indent wrapped control-flow headers and
header-line keyword items by 4 spaces when sibling keywords exist in the
command schema, while keeping positional arguments and single-keyword
property calls at 2 spaces. Corrected elseif base indentation so wrapped
conditions indent 4 spaces rather than 6, and reformatted the libc CMake
files.
Assisted-by: Automated tooling, human reviewed.
firewall: rules: use row API to handle global collapse/expand state
Pinning this on the rendered elements will cause issues since virtual DOM is used
(cherry picked from commit e375b520c063c7742245e6d4ac43dbcfdd35dd8a)
[LoongArch] Select [x]vbitset/[x]vbitrev for or/xor of bitcasted shl(splat(1), y)
When the shift of splat(1) is performed in a narrower element type than
the or/xor, e.g.
```llvm
%s = shl <8 x i16> splat (i16 1), %y
%m = bitcast <8 x i16> %s to <2 x i64>
%r = xor <2 x i64> %x, %m
```
the existing [x]vbitset.{b/h/w} and [x]vbitrev.{b/h/w} patterns fail to
match and we emit vrepli + vsll + vor.v/vxor.v.
Fold OP(bitcast(shl(splat(1), y)), x) into
bitcast(OP(shl(splat(1), y), bitcast(x))) for OP in {or, xor} so that
the operation is done in the shift's element type and selected as a
single [x]vbitset or [x]vbitrev.
Assisted-By: LLM
[LoongArch][NFC] Pre-commit tests for [x]vbitset/[x]vbitrev through bitcast
Add tests where the shift of splat(1) is done in a narrower element type
and then bitcast to the type of the or/xor operation.
Assisted-By: LLM
[LoongArch] Select [x]vbitclr for and-not of bitcasted shl(splat(1), y)
When the shift of splat(1) is performed in a narrower element type than
the and-not, e.g.
```llvm
%s = shl <8 x i16> splat (i16 1), %y
%m = bitcast <8 x i16> %s to <2 x i64>
%n = xor <2 x i64> %m, splat (i64 -1)
%r = and <2 x i64> %x, %n
```
the VANDN node is created in v2i64 with a bitcast operand, so the
existing [x]vbitclr.{b/h/w} patterns fail to match and we emit
vrepli + vsll + vandn.v.
Fold VANDN(bitcast(shl(splat(1), y)), x) into
bitcast(VANDN(shl(splat(1), y), bitcast(x))) so that the operation is
done in the shift's element type and selected as a single [x]vbitclr.
[2 lines not shown]
[LoongArch][NFC] Pre-commit tests for [x]vbitclr through bitcast
Add tests where the shift of splat(1) is done in a narrower element type
and then bitcast to the type of the and-not operation.
Assisted-By: LLM
[LangRef] Make VP intrinsics with EVL > num elements non-UB
For the remaining VP intrinsics which don't access memory:
- vp.merge
- vp.reduce.*
- vp.cttz.elts
- vp.splice
- vp.reverse
These are marked as speculatable. However the LangRef states that if the EVL > the number of elements in the vector then the behaviour is undefined. The two are inconsistent, so this PR tightens the result in this scenario to be poison.
As a result the vp.reverse expansion needs to be updated to clamp the EVL so it doesn't read outside of the stack object.
vp.udiv/vp.sdiv/vp.urem/vp.srem are also included here even though they're not speculatable. They can still cause UB if division by zero or overflow occurs on any lane even when EVL > number of elts, so I've added lines to clarify this.
VP intrinsics that read/write memory need to remain UB to match how backends lower them, they just use the EVL verbatim without any clamping or checks.
AMDGPU: Clear v_cmpx source kill flags locally (#240682)
clearKillFlags is potentially expensive and should be avoided. When
the v_cmp is folded into a v_cmpx at the saveexec, only kills of
registers overlapping the compare sources between the v_cmp and the
saveexec become invalid. Clear those directly when applying the fold,
instead of collecting candidate kills during matching and then
clearing every kill of the sources in the function.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[ProfileData] Strip .cfi suffix in InstrProfSymtab (#240955)
Under CFI jump tables, `LowerTypeTests` renames function definitions to
`<name>.cfi`. `InstrProfSymtab::getCanonicalName` did not strip `.cfi`,
preventing canonical GUID lookups from matching `.cfi` function
definitions.
Co-authored-by: Benedict Schlüter <bschlueter at google.com>
Assisted-by: Gemini
openssl: Update .pc files for correct version.
Correct the pkgconf files to reflect the in-tree version.
Direct commit to stable/14 as main has long since moved past
openssl-3.0.
net-im/tuwunel: Add New Port
Tuwunel is a Matrix homeserver written in Rust and the official successor
to conduwuit. It serves the client-server and federation APIs from a
single process and keeps its state in an embedded RocksDB database, so no
separate database server is required.
www: https://tuwunel.chat/
Sponsored by: Netzkommune GmbH
[SLP] Merge redundant input operands of binary-operator nodes (#208670)
Replaces the merged-input machinery of the preceding commits, kept in
the branch history for reference. Load-only, and restricted to
power-of-two pools: otherwise the gathered-loads path may decline the
wide load and leave the operand stuck as a gather.
Co-authored-by: Cursor <cursoragent at cursor.com>
Co-authored-by: Alexey Bataev <a.bataev at outlook.com>
[BPF] Fix use-after-free in bpf-aspace-simplify (#240996)
BPFASpaceCastSimplifyPass rewrites
`addrspacecast M->N (getelementptr (addrspacecast N->M p))` to
`getelementptr p`. When the inner cast has no other uses, the rewrite
erases it. That cast can also be the outer cast of another chain that is
still in the worklist. The pass then reads the erased cast. Clang
crashes on this code:
```c
#define __arena __attribute__((address_space(1)))
struct hdr { int len; int flags; };
int use(int *p);
int f(void __arena *buf, long off)
{
struct hdr __arena *h = (struct hdr __arena *)((char *)buf + off);
return use((int *)&h->flags);
[22 lines not shown]