[AArch64][Neoverse] Updating integer divisions latency/throughput (#224592)
Measured average latencies/throughput on spec intrate train data set and the result is:
Form Divides Mean Median p90 p99 Max At minimum
W-form 955,659,771 6.12 6 7 11 12 39.5%
X-form 177,481,992 5.38 5 7 8 20 83.4%
Benchmark W mean X mean Share of all divides
541.leela_r 5.90 7.81 60.1%
531.deepsjeng_r 6.09 9.42 16.8%
505.mcf_r 5.93 5.31 11.7%
502.gcc_r 7.83 5.25 7.8%
523.xalancbmk_r 9.43 5.39 3.3%
500.perlbench_r 5.26 5.37 0.2%
520.omnetpp_r 9.67 5.68 0.1%
Choose p90 as compromise regarding worst-case previous setting.
fixup! Make predicate more condensed
Remove the sve_perm256 predicate and replace the only other predicate
using it with a more condensed one and make it capture the entire
condition.
[mlir][SPIR-V] Derive Aligned memory operand for PhysicalStorageBuffer in vector.load/store (#214200)
Mirror calculateMemoryRequirements from MemRefToSPIRV.cpp, since
PhysicalStorageBuffer pointers carry no implicit alignment guarantee
[AArch64] Support FP atomic stores with memory hints
This patch extends the atomic-store-hint pseudos to accept preserved
floating-point atomic stores. It adds an FPR16 pseudo family and direct
half, bfloat, float, and double patterns for the supported addressing
modes.
The pseudos expand relaxed stores to STR and RCPC3 release and
sequentially consistent stores to STLUR, retaining memory hints without
cross-register-bank copies.
[AArch64] Support direct RCPC3 FP atomic loads and stores
Preserve half, bfloat, float, and double atomic loads and stores
through AtomicExpand for acquire and release orderings, and preserve
sequentially consistent stores, when RCPC3 and NEON are available.
Add SelectionDAG patterns for the RCPC3 LDAPUR and STLUR operations,
including unscaled offsets, and update the existing FP lane patterns to
match the preserved floating-point atomic nodes. Targets without the
required features continue to use integer lowering.
[clang][bytecode] Reject invalid opaque pointer base conversions (#231366)
We can't reject them as they happen because that needs to work for other
tests. So reject them when computing the layout offset.
[lldb][test] Fix cleanup in test_save_linux_minidump_one_region (#231809)
On Windows you cannot unlink a file that is open
in something else. So we must delete lldb's target before trying to
unlink the minidump file.
Another follow up to #231448. Same thing I did to the other tests but I
missed this one.
[LoopFusion] Initial Cost Model (#224626)
Adds an initial memory-reuse profitability filter to LoopFusion as part of the effort towards #189117. The full design, evaluation, and proposed follow-up heuristics are discussed in the [RFC](https://discourse.llvm.org/t/loopfusion-initiating-a-cost-model-for-loopfusion/91859).
Fusion requires at least one cross-loop reuse at corresponding iterations, identified through either:
* a same-iteration RAW flow dependence from DependenceAnalysis
* an exact affine RAR match using the load type and SCEV start and step.
Multiple consumers of the same producer count as one reuse. The
threshold is configurable with -loop-fusion-min-reused-values; setting it to zero restores the previous unrestricted behaviour
This is intentionally a low-cost first filter rather than a complete cost model. Future work may consider vectorization compatibility, register pressure, and the strength of locality benefits.
Creation of this patch was partly assisted by AI tools.
[lldb][test] Narrow TestStepNoDebug.py XFAIL to dwarf and dwo (#231818)
Follow up to #230116.
These tests were xfailed due to
https://github.com/llvm/llvm-project/issues/56292, which still applies.
They pass with PDB.
Also remove the debug info types from the docstrings, they must be from
a time before we automatically ran tests with different debug info
formats.
[MLIR][Remark] Report why the LLVM remark streamer could not be created
LLVMRemarkStreamer::createToFile dropped the reason it failed: a file that
could not be opened and a serializer that could not be created both turned
into a bare failure, and enableOptimizationRemarksWithLLVMStreamer failed
without a diagnostic.
- createToFile returns llvm::Expected. It opens the file with
mlir::openOutputFile and returns its message; a serializer error is
returned as a FileError naming the file.
- enableOptimizationRemarksWithLLVMStreamer emits the error on the context.
Assisted-by: Claude Code (Claude Opus 5.5)
[AArch64][llvm] Add support for FEAT_SME_F16F8F16
Add support for FEAT_SME_F16F8F16 (SME half-precision and FP8 sum-of-products
accumulating to half-precision instructions).
[VPlan] Defer ptrtoaddr of IR values to SCEVExpander. (#231670)
For ptrtoaddr with live-in operands, expand them via SCEVExpander, so
they the IR-based expander can place them so re-use across other
IR-based expansions is maximized.
This improves re-use end-to-end.
[libc++] Avoid passing both sentinel and size around in vector (#214132)
Currently we are passing both the end iterator and the size of a range
around because we sometimes use one or the other. This makes the uses
consistently only rely on the size, which allows simplifying a bunch of
code.
[AArch64][llvm] Armv9.8-A: Add support for FEAT_SVE_PERM256
Add support for FEAT_SVE_PERM256 (SVE 128-bit element permute
instructions), which enables already existing instructions,
independently of FEAT_F64MM
[AArch64][GlobalISel] Do not run the Localizer at -O0 (attempt 2) (#231406)
This was disabled earlier this year (#177359) before being shortly reverted due
to two test failures which have since been fixed. The flaky LLDB issue was
fixed in #210050 and the libcxxabi test in #230518.
CTMark aarch64-O0-g geomean improves -0.97%. Code size regresses 2.70% but as
previously we think this is worth paying at O0 where compile-time and debug are
the biggest concern.
https://llvm-compile-time-tracker.com/compare.php?from=fc90bd3cfb0bab14a2bf7cbd33f5f1e904c7e133&to=071f3542ccb3b3c65032397550e862d7090f425f&stat=instructions:u
Assisted-by: codex
Co-authored-by: David Green (davemgreen)
[ValueTracking] Remove matchMinMaxOfMinMax() (#231539)
matchMinMaxOfMinMax() was effectively dead code: It did recursive
matches for SPF min/max, but in practice the SPF pattern would have been
canonicalized to intrinsics by that point already.
After the canonicalization to intrinsics, this pattern is already
handled by a different InstCombine fold, which handles selects of
min/max with common operands.
Move the codegen test for this functionality to InstCombine, to show
that all variants of the pattern are indeed replaced by intrinsics. The
codegen test was testing non-canonical IR that would never occur in
practice, after the middle-end pipeline has run.
Attributor: Rewrite function signatures in a deterministic order
ArgumentReplacementMap was a DenseMap keyed by Function pointer, so
the order of the signature rewrites depended on pointer values, which
showed up as different value names in the output.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
Attributor: Deduce noundef returns if poison-generating attributes hold
Instead of giving up on noundef for returns with poison-generating
attributes, check that the attributes hold for all returned values, like
FunctionAttrs already does.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>