[AMDGPU] Add gfx13 support for v_cvt_pk_{fp8,bf8}_f16 (#211263)
GFX13 supports VOP1 and VOP3 forms of these instructions; GFX1250 keeps
its VOP3-only encoding.
Co-authored-by: Guo Chen <guochen2 at amd.com>
[lldb][Windows] ignore loader breakpoints in system modules (#208233)
Currently, when debugging a program with `lldb-dap` on Windows and using
the `integratedTerminal` option, lldb-dap immediatly stops with an
`0x80000003` Exception. This is because `ntdll` executes an `int3`
breakpoint during process initialization when a debugger is attached.
This patch makes `lldb` and `lldb-server` skip the first `int3` after
launch when it originates from a system module (the loader's debugger
notification). Only that first loader breakpoint is skipped. Any later
int3, including `__debugbreak()`, `__builtin_debugtrap()` in the
debuggee's own code, still stops the debugger.
Fixes https://github.com/llvm/llvm-project/issues/198763
[AMDGPU] Add synthetic apertures and use them for barriers
Define what a synthetic aperture is, and adjust the barrier AS
to use this new system. This makes the barrier AS even safer to
use as now we can use all 32 bits of it without ever risking
hitting a valid address of any kind (LDS or outside LDS).
[flang][Lower] Admit opaque terms to real sum reassociation (#211316)
First part of generalisations requested in #207377.
The split-sum eligibility check rejected any RHS containing explicit
parentheses or subtraction, even though the Add flattener already
preserves every non-Add subtree as one opaque term.
Remove those blanket guards and their unused predicates. Document the
opaque-term invariant and extend the test to cover parenthesized
additions and subtractions, whole-RHS parentheses, and subtraction
terms.
I did not observe any benchmark result changes as a result of this
patch.
Assisted-by: Codex
[IR] Reject inlining strictfp alwaysinline callee into non-strictfp caller (#210701)
Commit af0c933eda31 added a verifier check requiring every strictfp call
site to reside in a strictfp function.
It caused verify error `call site marked strictfp without caller
function marked strictfp` since AlwaysInliner force-inlines strictfp
callees into non-strictfp callers, bypassing checkStrictFP.
47b3b76825dc explictly not implemented inlining strictfp function into
non-strictfp function. But the restriction was lost in 8eb6757564cc.
8eb6757564cc was only NFC for the normal inliner pass. It regressed
AlwaysInliner path which bypasses checkStrictFP.
This PR restores the restriction.
---------
Co-authored-by: Jinsong Ji <jinsong.ji at intel.com>
Co-authored-by: Claude Sonnet 5 <noreply at anthropic.com>
Co-authored-by: Nikita Popov <github at npopov.com>
[MLIR][OpenMP] Preserve debug location in OpenMPIRBuilder calls. (#211254)
Many `OpenMPIRBuilder` entry points take an
`OpenMPIRBuilder::LocationDescription`. It has two relevant
constructors:
`LocationDescription(const IRBuilderBase &IRB)` // captures IP and debug
loc
`LocationDescription(const InsertPointTy &IP)` // captures IP only; DL
is empty
The OpenMP MLIR-to-LLVM-IR translation constructs the location from
`builder` in almost all places (~45 call sites), which selects the first
constructor and propagates both the insertion point and the current
debug location. A few call sites instead passed `builder.saveIP()`,
which selects the second constructor and silently drops the debug
location.
Change the 9 offending call sites to pass `builder` instead of
`builder.saveIP()`, so the debug location is preserved.
[RISCV] Add TuneNoDefaultUnroll to generic CPUs (#135318)
Almost all CPUs have added this and experiments have shown
considerable gains.
And, we set a lower runtime unrolling count 4 for in-order models
to avoid potential regressions.
Fixes #134272.
[Hexagon] Avoid spurious high vmem for contained sub-HVX stores (#204661)
When a sub-HVX store is widened into a masked HVX store, the unaligned
masked store lowering can split it into two vector stores: one at Base
and one at Base+HwLen. For stores whose original memory size fits within
the guaranteed alignment, the high half predicate is known to be all
false, so the Base+HwLen store is unnecessary.
Even an all-false predicated vmem can still probe the TLB. Emitting the
high store can therefore fault when Base+HwLen is on an unmapped page,
even though no bytes should be written there.
Preserve the original memory VT when widening sub-HVX stores, and use
that size during masked-store lowering to elide the empty high vmem.
Relevant links:
https://docs.qualcomm.com/doc/80-N2040-60/topic/conditional-execution.html#consuming-scalar-predicates
and
https://docs.qualcomm.com/doc/80-N2040-61/topic/memory.html#permissions
Co-authored-by: L-roro <rodriguez at roofline.ai>
[Matrix] De-duplicate reshaped matrixes used as incoming values for phi. (#211210)
Phis can have multiple incoming entries for the same block. In that
case, all incoming values for the block must be the same.
Update visitPHI to avoid expanding the incoming matrix multiple times
for the some incoming block.
Fixes a verifier error for the newly added test case.
PR: https://github.com/llvm/llvm-project/pull/211210
[libc++] Remove some adjacent_view::begin() benchmarks (#210265)
Benchmarking a bunch of very similar values has rather little benefit,
since they behave essentially the same.
[clang][SSAF] Allow no Data for summary analysis (#211342)
Extractors might not always add summaries for all the TUs. If they don't
add any summaries to the TU result, then loading this summary for a
summary analysis would cause a failure.
This patch handles the situation gracefully by accepting such cases.
Split from: #209354
---------
Co-authored-by: Ziqing Luo <ziqing_luo at apple.com>
[AArch64] Prefer (sub x, -c) over (add x, c) if -c is cheaper. (#211020)
The negation of an immediate can be cheaper to materialise than the
original immediate, in which case a subtraction is preferable.
[AMDGPU] Preserve liveness flags in ILP scheduler (#211190)
During DAG construction, liveness flags such as `undef` are removed from
the instructions. When the scheduler succeeds, the flags are recomputed
and restored.
However, so far, if the scheduler failed to meet the occupancy target,
it would not restore the liveness flags, leading to verification
failure/assertions later in the pipeline.
This change restores the liveness flags in cases where no schedule
meeting the occupancy target could be found.
---------
Signed-off-by: Lukas Sommer <lukas.sommer at amd.com>
[libc++] Optimize standard streams with sync_with_stdio(false) (#209161)
This updates the standard streams so that the buffers are replaced with
`basic_filebuf`s.
Fixes #21566
---------
Co-authored-by: Louis Dionne <ldionne.2 at gmail.com>