[RISCV][TTI] Set the default MaxVectorCoalesceElts to 1 (#246590)
Alternative to #246576
Set the default MaxVectorCoalesceElts to 1 so strided vector memory
operations are costed per element rather than receiving a cache-line
coalescing discount. This matches scheduling models such as SiFive7,
which model ordinary strided accesses as one element per cycle.
This is motivated by reversed_unit_stride: a reverse shuffle followed by
a unit-stride store can replace a negative-stride store. The coalescing
discount can favor the negative-stride store over this alternative.
Add a standalone SLP regression test checking that reversed unit-stride
stores use a reverse shuffle followed by an ordinary vector store.
[AMDGPU] Re-enable AAInstanceInfo in AMDGPUAttributor
This was enabled and then disabled because of its compile time impact. This
recent changes, the compile time issue should have been resolved.
[Attributor] Use call site values when the callee returns an argument
AAPotentialValuesCallSiteReturned takes the interprocedural values of a call
from the interprocedural return values of the callee. If the callee returns one
of its arguments, these values contain the arguments of all call sites, so each
call result also gets the values passed at all other call sites. This is not
necessary. If the callee has many call sites and the call results are passed to
other calls, the value sets also become very large.
If the callee returns only its arguments and constants, we just need to
translate these values to the call site for the interprocedural scope.
This PR was assisted by AI but I reviewed all the changes.
[Attributor] Do not copy large value sets in `AAPotentialValues`
`AAPotentialValuesImpl::recurseForValue` copies all values of another position
into the state. For example, if a callee returns one of its arguments, the call
result takes the values of the call site operand. In a chain of calls where each
call gets the result of the previous call, each call result then has one more
value than the previous one. A call result also sees the new values of the
previous call only in the next fixpoint iteration, so a chain of N calls needs N
iterations, and a long chain hits the iteration limit.
In this PR, we just limit the number of values to copy to 7, and use the value
of the position itself otherwise. 7 is a magic number here, but it is sufficient
for most cases (telling from the fact that no existing test is affected by this
change).
This PR was assisted by AI but I reviewed all the changes.
[RISCV][Docs] Fix the return type in vector add call examples (#247025)
Both the masked and unmasked `llvm.riscv.vadd` examples omit the return
type after `call`. When either example is placed in a function,
`llvm-as` reports `expected type` at the intrinsic name. Add `<vscale x
4 x i32>` to both calls.
With LLVM 24, both examples assemble and pass the IR verifier. On RV64,
`llc` emits `vadd.vv` for both and uses `v0.t` for the masked form. The
existing RV32 and RV64 `rvv/vadd.ll` tests passed, and the LLVM HTML
documentation built with warnings treated as errors.
Assisted-by: OpenAI Codex
[GVN] Process Foldable Terminator beforehead
GVN generates phi node to replace a load call. However, addDeadBlock
modify such phi so that any deadblock sucessor in a phi becomes
poison.
This causes disagreement on SSAUpdater as [%a, %b1] [poison, %b2] is
considered as different with [%a, %b1] [0, %b2] even if poison is
replace with 0.
As a result, we make processFoldableTerminator (which is the only
caller of addDeadBlock now) runs before processInstruction. This is
before what we have on phi node generation so that non of the mismatch
happens.
Asissted-by: Claude # Test
su(1): Fix kerberized path with MKPAM=no MKKERBEROS=yes.
Fixes:
$ su riastradh
riastradh at EXAMPLE.COM's Password:
su: chown 0x7e3294e318a0: No such file or directory
After using the target user's password to get credentials (that is, a
ticket-granting ticket) into an in-memory cache and verifying the
credentials are valid, don't copy them into _another_ in-memory cache
and then chown it -- that makes no sense and doesn't work. Instead,
copy them into a _file_ cache.
This was broken in 2012 with a build fix that apparently nobody has
ever tested since:
https://mail-index.netbsd.org/source-changes/2012/04/12/msg033638.html
PR bin/61091: MKPAM=no kerberized su(1) is busted
rtwn: fix the build without RTWN_DEBUG
RTWN_DPRINTF() compiles to nothing without RTWN_DEBUG, which leaves four
of the IQK result copies in r92f_iq_calib() set but never read. Kernels
with "device rtwn" in their config, LINT among them, then fail with
-Werror,-Wunused-but-set-variable. The module build does not hit this
because its generated opt_rtwn.h always defines RTWN_DEBUG.
Print the result array directly and drop the four locals.
Fixes: 1f0e186e1832 ("rtwn: added support for Realtek RTL8192FU...")
Sponsored by: Rubicon Communications, LLC ("Netgate")
Restructure virt68k clocks to be more or less the same way that clock
handling is structures in hb68k, with a few tweaks:
- Keep the "delay clock" that virt68k requires to implement delay().
- Add the notion of "clock priority"; higher-priority clocks get chosen
for duty before lower-priority clocks.