Add PISA codegen pipeline and lowering passes
Add the IR- and MIR-level passes that make up the PISA code generation
pipeline and wire them into PISAPassConfig in PISATargetMachine:
- Intrinsic handling: PISAEmitIntrinsics, PISAExpandIntrinsics,
PISAReplaceIntrinsics
- Call/ABI lowering: PISALegalizeCalls, PISAKernelByValArgsLowering
- IR preparation: PISAPropagateNullPointers, PISALayout, PISAConstProp
- Legalization/verification: PISALegalizePredicates, PISAVerifyTypes,
PISAVerifier
- Post-selection: PISAScopeSelector, PISACacheHintSelector,
PISALegalizeSubregAccess, PISAOptimizeSubregAccess,
PISAOptimizeRedundantCopies, PISAMarkConvergentNoMerge,
PISAInsertLifetimeStart
PISAPassConfig now overrides the GlobalISel and pre/post-regalloc hooks
to run these passes, disables the machine passes that assume physical
registers, and runs the load/store vectorizer and atomic expansion in
[4 lines not shown]
[AMDGPU] Fold integer wmma with zero multiplicand to the accumulator (#247931)
For integer wmma and swmmac, $A \times 0 + C = C$, so if A or B is zero
the result is just C. The sign or neg modifiers, clamp, reuse hints and
sparsity index cannot change this, because the product is zero and C
cannot overflow.
```llvm
%r = call <8 x i32> @llvm.amdgcn.wmma.i32.16x16x64.iu8.v8i32.v8i32(i1 0, <8 x i32> %a, i1 0, <8 x i32> zeroinitializer, <8 x i32> %c, i1 0, i1 0, i1 1)
-->
%r = %c
```
Floating point variants are not folded, since $0 \times \infty$ and $0
\times \mathrm{NaN}$ give NaN and $-0.0 + 0.0 = +0.0$.
netipsec: Requeue a nested IPsec header on IPv6 input
In transport mode ipsec6_common_input_cb() delivers the packet itself,
on the stack of the crypto callback that called it. With a synchronous
crypto driver that is the stack of the thread that dispatched the
request. Since 3cd5f1b307ad the callback hands a further AH, ESP or
IPComp header to ipsec_common_input() from there, so the transform, its
callback and the next delivery all ran below the first one. Every
nested header added a set of frames and only the size of the packet
limited their number. IPComp carries no authentication and
ipcomp_input() only refuses an IPComp header that is directly followed
by another, so anyone who could reach a host with an IPv6 IPComp SA
could overflow the kernel stack with one packet that hides each IPComp
header behind a destination options header.
Requeue the packet to the IPv6 netisr instead, as the IPv4 callback
does for every transport mode packet, and let ip6_input() hand the
header over from a fresh stack. ip6_input() refuses addresses in the
embedded scope form that its first pass left behind, so put them back
[19 lines not shown]
[X86][APX] Print explicit $1 for NDD shift/rotate by 1 (#181565)
The NDD shift/rotate by 1 instructions were printed without the
immediate, e.g. "shlw %ax, %bx". GNU as rejects this with "operand type
mismatch", so -mapxf -no-integrated-as produced assembly binutils
couldn't assemble.
Print them as "shlw $1, %ax, %bx" ("shl bx, ax, 1" in Intel syntax),
which is what binutils prints and accepts. This also removes the
ambiguity between "shlb %cl, %al" as 8r1_ND and as 8rCL, so 8r1_ND and
8r1_NF_ND no longer need to be DisassembleOnly.
The two-operand spelling is still accepted by the assembler through
InstAliases, except for the 8-bit register forms where it would be
ambiguous with the shift by %cl.
Fixes #181553
[AMDGPU] Keep execz skips over pending WMMA co-execution hazards (#245431)
On gfx1250 the hazard recognizer resolves XDL WMMA co-execution hazards
by counting intervening VALUs. VALUs skipped because EXEC = 0 do not
issue and do not resolve the hazard. SIPreEmitPeephole runs before the
hazard recognizer and removes short s_cbranch_execz skips, so a VALU
region that may run with EXEC = 0 ends up counted toward the hazard and
no V_NOPs are inserted before a later use of the WMMA result.
Revert "[Clang][Sema] Add fortify warnings for getlogin_r, ttyname_r, ptsname_r, and confstr (#244704)" (#248276)
Reverts llvm/llvm-project#244704
(`8964a284801acee5924c2b546ecb598e2b087f92`).
Registering `getlogin_r` as a typed `GNULibBuiltin` broke building
`busybox-w32` on `i686-w64-mingw32`, where `getlogin_r` is polyfilled
with `__attribute__((regparm(3),stdcall))`, triggering a
`-Wignored-attributes` warning (stripping `stdcall`) and an
`err_regparm_mismatch` hard error in `Sema::MergeFunctionDecl` (see
https://github.com/llvm/llvm-project/pull/244704#issuecomment-7359463527
and https://github.com/rmyorston/busybox-w32/issues/631).
Will reland after fixing `Sema::MergeFunctionDecl` to warn and avoid
treating the declaration as a builtin on calling-convention / `regparm`
mismatches against implicit predefined library builtins.
cc @nickdesaulniers @mstorsjo @efriedma-quic @llvm/android-maintainers
libthr: fix libc spinlock initialization
Publish thr_extra with a release store only after _thr_umutex_init()
and read it with an acquire load, so that a thread racing the first use
of a libc spinlock cannot lock the umutex before it is initialized.
PR: 301407
Fixes: bddd24cd9c3e ("Replace internal usage of struct umtx with umutex which can ...")
Reviewed by: kib
MFC after: 1 week
security/boringssl: update to the recent snapshot
Introduce DISABLE_DEATHTESTS option that disables death tests
(core dumped) on FreeBSD. Please visit for details:
https://issues.chromium.org/issues/584386506