[CIR] Lower __builtin_memcpy/mempcpy to cir.libc.memcpy (#225845)
These previously were lowered to a call to undefined memcpy function
which caused link failures when compiled for AMDGPU since there it is
never resolved to a library function.
cir.libc.memcpy is later lowered to llvm.memcpy intrinsic call which
matches classic codegen.
This also adds alignment attributes to cir.libc.memcpy op so resulting
LLVM IR also has them just like LLVM IR produced by the classic codegen
Assisted by: claude
[AggressiveInstCombine] Bail out on graph nodes in unreachable blocks (#226383)
TruncInstCombine::run() already skips truncs in unreachable blocks, but
the expression graph of reachable trunc can still be extended into an
unreachable block through a phi incoming value. Dead code may contain an
instruction that is its own operand, and buildTruncExpressionGraph only
breaks cycles at phi nodes, so such a cycle leaves the graph unorderable
and ReduceExpressionGraph asks for the reduced value of a node it has
not built yet.
Solution: Bail out as soon as a graph node is found in an unreachable
block, which extends the existing rule from the trunc itself to the
whole graph.
Fixes #58008.
[Support] Remove LongOptionsUseDoubleDash from cl::ParseCommandLineOptions (#226347)
The mode (https://reviews.llvm.org/D61294), in which `-` introduces only
single-character options and `--` long ones, was added for the
binutils-style tools, which have since moved to OptTable. Its last
users, yaml2obj, obj2yaml and split-file, parse with OptTable now.
LLM-aided
[UpdateTestChecks] Escape special characters more consistently (#226203)
The `{{` and `[[` character sequences have special meaning in FileCheck.
Escape these when generating check lines.
We were already doing this for `{{` in analyze tests, where this pattern
occurs e.g. for nested SCEV addrecs. Extend this to `[[`, which occurs
in IR tests due to nested array initializers for globals.
We now need to do this escaping much earlier: `[[...]]` is introduced by
the check line generalization. But even before that, `{{...}}` can be
introduced either via `--replace-value-regex` or via asm scrubbing. So
we perform this escaping right at the start now.
This also updates some AMDGPU LDS tests, which were the motivation for
this change. I've had to manually fix up those check lines one too many
times now...
cam/cd: avoid integer divide fault in cdstart()
If something goes very badly (e.g. forcibly removing a medium while
the OS tries to start it), this could end up in params.blksize being 0
(and params.disksize 1). Avoid an integer divide fault, panicking the
kernel, by bailing out before.
MFC after: 3 days
(cherry picked from commit 34ae0f7834d1bd6bb765d1c12e57e01e32b3e060)
[TBAA] Only keep the immutable flag if both merged tags have it (#225907)
getMostGenericTBAA() can return one of the two tags unchanged, as it
does when both have the same base type and offset. If only that tag has
the immutable flag, the merged access claims that the memory is constant
on both paths. For example, after SimplifyCFG hoists two such loads, GVN
can forward a load across a store to the same location.
Keep the immutable flag only if both tags have it. Otherwise drop just
the flag and keep the rest of the tag.
[AST] Avoid deprecated implicit `this` capture for C++20; NFC (#226142)
`OpenMPClause.h` contains a lambda with an implicit `this` capture,
which triggers the C++20 deprecation warning in many compilation units
that (transitively) include this header.
Split pyro_intr_establish() into a stub which locates the softc
from the pdb (used by pyro routines) and pyro_intr_establish_sc()
which does the work.
In pyro_softc, save a pointer to our pyro_intr_establish_sc().
This allows us to call the correct pyro_intr_establish_sc() from devices
that use pyro interrupts but are not (pci) children of pyro, i.e.
ebus @ mainbus and firei2c*.
net/frr: fix and complete automatic firewall rules (#5736)
* net/frr: fix and complete automatic firewall rules
Generate rules directly for every enabled routing protocol and remove the dependency on configured OSPF networks or interfaces.
* Tighten the OSPF rules a bit more
* Also guard creation of rules if frr is not enabled
tests: accept a bare shell prompt as evidence of login
The arm64 live ISO now boots, pivots and autologins correctly, and the test
failed it anyway. The serial ends at a working zsh prompt:
admin at virt-8-2 ~ %
FAIL: neither a login prompt nor an automatic login in 8 minutes
Neither accepted form reaches the serial there: getty autologins, so no
"login:" prompt is printed, and the "login on console as admin" marker does
not appear on the ISO either -- the next thing on the wire after getty's
banner is the shell. img-test passed only because that marker does appear on
the installed image.
Both stage-1 expect blocks and both shell-level verdicts now accept the
prompt as a third form.
The prompt carries SGR escapes inside it -- "\033[32madmin\033[39m@..." --
so "admin@" never appears literally, hence admin[^@]{0,12}@. I first wrote
[6 lines not shown]