[X86]: `sub(0, and(X, 1))` -> `ashr(shl(X, SizeInBits - 1), SizeInBits - 1)` (#243478)
In `InstCombine`, expressions of the form `ashr(shl(X, SizeInBits - 1),
SizeInBits - 1)` are canonicalized into the form `sub(0, and(X, 1))`.
The issue with this representation is that the generated code is
suboptimal and requires an additional register. To address this, an
inverse operation has been added for `x86`.
Fixes https://github.com/llvm/llvm-project/issues/208410
[DAG] Use the alignment of actual stored type (#244632)
Fixes #244552.
`INSERT_VECTOR_ELT` may implicitly truncate the inserted operand. When
expanding it through the stack, we should compute the alignment from the
actual memory type rather than the untruncated operand type.
pppoe(4): account for packets sent through the direct transmit path
pppoe_enqueue() bypasses ifq_enqueue() with the default priq, leaving
outbound data packets uncounted. Count packets and their pre-PPPoE
length after successful transmission; sppp_output() already accounts for
the framing bytes.
From Steffen Beyer.
OK dlg@
[LICM] Refresh cache for load update
A load update for function pointer makes ICFLoopSafetyInfo invalidate
the old one. Refresh both MW and ICF so that it won't failed
validate().
Assisted-by: Claude # Test
LowerTypeTests: Only invalidate analyses of modified functions in DropTypeTests
Previously everything was invalidated on any changes, so even
invariant function analyses were discarded.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
httpd: check access settings of the directory index location
When you ask for a directory, the index file can end up being served
by another location, and we never looked at its header rules, body
limits, block or authenticate. With authenticate on a fastcgi location
this even took the whole daemon down.
Move these checks into server_http_access() and call it from
server_file(), so every location that serves a request gets checked.
Hang on to the Authorization header until the request is done, so
each location can check it, and wipe it before handing the request
to fastcgi.
With input and help from armani@, OK armani@, kirill@
Reported by Artus KG
[AMDGPU] Do not use s_delay_alu instskip to skip inline asm (#244627)
We cannot reliably count the number of instructions in an inline asm, so
do not include one in an instskip region. Emit a separate s_delay_alu
after it instead.
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
Mk/Uses/electron.mk: Refactor scripts for rebuilding node modules for electron
With pnpm, changing into submodules directory and executing rebuild
command does not work. Instead, execute rebuild command with specified
node modules from top directory.
Coroutines: Only invalidate analyses of lowered functions in CoroEarly
CoroEarly invalidated every function analysis whenever the module declared
coroutine intrinsics. Only invalidate the functions it modified, and the
callers of functions which had noalias removed.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[IPSCC] Mark byval capture as Overdefined
ptr byval reuse the original pointer identity. Any capture on ptr
byval can easily cause miscompilation as taking reference on pointer
is always considered as the same. Therefore, we put this in
OverDefined by default.
Take the added test as an example. `icmp eq ptr %p, @g` in
`cmp_byval(@g)` is always considered as the same identity in IPSCCP,
which is a miscompiliation.
EarlyCSE and InstCombine should be able to handle byval and ptr
elimination easily. So we don't add more thing to LatticeValue here.
Assisted-by: Claude # Test
OpenMPOpt: Invalidate function analyses individually
Avoid discarding analyses that never need to be invalidated, such as
TargetLibraryInfo.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[llvm] Remove write-only private member variables (NFC) (#244811)
This patch removes private member variables across llvm/ that are
assigned to but never read, along with their assignments.
Assisted-by: Antigravity
OpenMPOpt: Invalidate function analyses individually
Avoid discarding analyses that never need to be invalidated, such as
TargetLibraryInfo.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
ConstantMerge: Preserve CFG analyses (#244817)
ConstantMerge only changes global variables, so it does not need to
invalidate every function analysis.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[RISCV] Remove RVE specific array from getArgGPRs by slicing the front of the full array. (#244770)
The RVE array is a prefix of the full array so we can take the front. This
requires hardcoding the sizes, but these arrays aren't expected to
change so I don't think that's a maintenance issue.
[Target] Move function definitions out of anonymous namespaces (#244814)
The coding standards say the following:
> Make anonymous namespaces as small as possible, and only use them for
> class declarations.
This also makes these files compliant with the
llvm-prefer-static-over-anonymous-namespaces clang-tidy check.
net/libpfctl: drop stale 15.1 distfile override
The local override mapped OSREL 15.1 to libpfctl-15.0_4.tar.gz, which
is not in distinfo, so the checksum step failed. Upstream now ships
libpfctl-15.1_4.tar.gz, so remove the override to match FreeBSD ports.