[mlir] [linalg] Fold reduce(broadcast(x)) max/min (#213190)
This patch tries to implement the optimization for
```
max(broadcast(x)) -> x # (or replace min)
```
We can extend the optimization to other reduce op like add, mul, and,
or, xor ... in the future. This patch tries to be small by implementing
the simplest case.
AI assisted.
---------
Co-authored-by: yedeng.yd <yedeng.yd at alibaba-inc.com>
[SLP][NFC] Pre-commit test for AArch64 store-to-load forwarding bail-out (#218116)
Add an AArch64 SLP test that locks in the current (pre-feature)
vectorization of a widened backward load that aliases a widened store,
plus a narrow-load control case that never straddles two widened stores.
The follow-up patch adding the store-to-load forwarding cost-model
bail-out will update these checks, making its effect visible as a diff
on a non-X86 target.
---------
Co-authored-by: Cursor <cursoragent at cursor.com>
[SandboxVec][LoadStoreVec] Extract LoadStoreVec::vectorizeStores from runOnRegion
Move runOnRegion()'s body -- the store-chain legality checks, operand
classification, vector value construction, and profitability decision
-- into a new vectorizeStores(Bndl, Rgn, Sched, A) method. runOnRegion()
now only builds the initial bundle from the region's Aux and calls
vectorizeStores() once.
Snapshot the region's cost in saveIR() and decide accept vs revert in
acceptOrRevert(), so vectorizeStores() does not thread ScoreBoard or
CostBefore through the profitability check. NFC.
Co-authored-by: Cursor <cursoragent at cursor.com>
converters/py-markitdown: Add a run dependency
- Add sysutils/py-magika as run dependency
- Pet portfmt
- Remove IGNORE tag
PR: 297500 285927
Approved by: wen (maintainer)
AMDGPU: Lowercase the unsupported fence sync scope diagnostic (#220081)
Error messages should start with a lowercase letter per the diagnostic
policy.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
clang/AMDGPU: Diagnose invalid fence sync scope (#220077)
Reject an unrecognized synchronization scope string passed to
__builtin_amdgcn_fence during semantic analysis instead of relying on
the backend to report it during codegen.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
[MC,test] Use # comments in llvm-mc --disassemble inputs (#220163)
llvm-mc --disassemble recognizes only # as a comment marker; `//` lead
to invalid-token errors, which will change the exit status after an
upcoming llvm-mc change.
X86: Pass instruction to inline asm register printing helpers (#219473)
printAsmMRegister and printAsmVRegister only used the operand to recover
its parent instruction's inline asm dialect. Pass the containing instruction
directly so they no longer depend on MachineOperand::getParent().
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
[LoongArch][Disassembler] Add symbolic operands for decoded immediates (#217971)
Symbolize operands for decoded immediates when possible. This gives
`LoongArchDisassembler` non-raw immediate capabilities similar to that
of `{X86,RISCV}Disassembler`. See also #217550 for similar work on
RISC-V.
This is part of the preparatory work for a future port of BOLT to
LoongArch.
[LAA][NFC] Factor out MemoryDepChecker::isStoreLoadForwardingConflict (#212085)
Extract the store-to-load forwarding conflict predicate used inside
MemoryDepChecker::couldPreventStoreLoadForward into a static helper so
it
can be shared with other consumers (e.g. the SLP vectorizer's STLF cost
model).
The helper takes an optional LoadElementSize so callers that know the
load
width can ask whether the load actually straddles two widened stores:
(a) a misaligned load that starts R = Distance % VectorStoreSize bytes
below a widened-store boundary overruns into the next store only if it
is wider than those R bytes (LoadElementSize > R), and
(b) an aligned load (R == 0) overruns only if it is itself wider than
the
widened store window (LoadElementSize > VectorStoreSize).
LoadElementSize defaults to 0 (unknown width, both terms disabled).
couldPreventStoreLoadForward passes VF as the load width, so (a) reduces
[9 lines not shown]
[GlobalISel] Use integer as the fallback type for getLLTForType. (#218148)
In the test cases this comes up from struct types with a known size,
from an invoke instruction. Using integer as the fallback type for it
seems to work fine.
[clang][bytecode] Allocate functions via Program allocator (#219994)
They have the same lifetime as `Program`, so use the allocator we're
already carrying around.
[X86] Fix ADOX miscompile by restricting COND_O optimization when EFLAGS are used (#220117)
This patch fixes a miscompile where the X86 DAGCombiner aggressively
folds an `ADD` node into an `ADOX` instruction even when the Zero Flag
(ZF) produced by the `ADD` is used by a subsequent branch (e.g., `je`).
[VE] Create TS1AM with getMemIntrinsicNode (#220151)
isa<AtomicSDNode> returns false on the built node: the lookup key and
SDNode::Profile disagree and the node never CSEs (see #219911).
CodeGen/VE/Scalar/atomic_swap.ll will break when we add an assert to
FoldingSet::insert that the `nodeProfile()` output matches `Token`.
Fix with getMemIntrinsicNode (`def ts1am` carries SDNPMemOperand).
httpd: reject shared TLS listeners with different client CA or CRL
Virtual hosts on the same address and port share one TLS context, and
only the first hosts client CA and CRL are used. A client certificate
accepted there reaches every host on the listener, including one meant
to be restricted to a different CA. Such a configuration is now rejected
instead of silently ignored.
Bug report and diff by Acts1631
OK kirill@ claudio@
[Clang][CodeGen][X86] Fix crash on __int128 bit-field access units (#216777)
Fixes #202205
The x86-64 SysV classifier skipped every unnamed bit-field as padding,
so an eightbyte holding nothing but a non-zero-width unnamed bit-field
stayed `NO_CLASS`. GCC treats that storage as INTEGER. The crash falls
out of this: a run of `__int128` bit-fields is lowered to a single
`i128` access unit spanning both eightbytes, but with only one of them
classified INTEGER the `i128` gets queried at offset 8 and hits
`assert(IROffset == 0)` in `GetINTEGERTypeAtOffset` — or `assert(Hi ==
Integer)` in the callers, depending on which eightbyte holds the named
field. It also silently diverges from GCC on ordinary shapes like
`struct { long : 64; long a; }`, which clang passed in one register
where GCC uses two.
The fix skips only zero-length bit-fields and classifies the rest like
named ones, matching GCC. Both eightbytes of an `__int128` bit-field run
then come out `INTEGER`, so the existing asserts hold unchanged. The
[9 lines not shown]
[flang][OpenMP] Fix use_device_addr handling for COMMON blocks in target data (#217105)
Related to #217112
Flang already handles `use_device_addr` for regular variables on `target
data`,
but named COMMON blocks had two gaps: combining a COMMON block in `map`
and
`use_device_addr` was incorrectly rejected, and whole-COMMON
`use_device_addr`
could leave references in the region bound to the host COMMON instead of
the
returned device address.
This fixes the COMMON-block semantic handling and lowering so the valid
`map`/`use_device_addr` combination is accepted and COMMON members use
the
correct target-data bindings.
[3 lines not shown]
emulators/flycast: Update to 2.7 and unbreak
Port changes:
- Switch to net/asio130 to unbreak the build. This also guarantees a
more stable update path for the flycast port, because newer versions
of net/asio are constantly deprecating and removing APIs.
- Unbreak on FreeBSD < 15 for newer DreamPicoPort submodule.
- Unbundle several dependencies. This is accompanied with an
EXTRACT_AFTER_ARGS block to exclude unbundled and unused deps, which
ensures that these aren't accidently referenced by the build process.
- Add LIBCDIO option, enabled by default. This enables CDROM support via
libcdio. It was already available in previous flycast versions but was
forgotten in the port.
- Prevent searching for git via CMAKE_DISABLE_FIND_PACKAGE_Git.
- Separate several blocks with newlines to improve readability.
- Remove obsolete patches.
Changelog:
https://github.com/flyinghead/flycast/releases/tag/v2.7
[3 lines not shown]