Measuring SMULL-to-SMLAL Accumulator Forwarding on Cortex-A76

back to blogs

back to home


August 2026

Summary

On a Raspberry Pi 5 with a Cortex-A76 r4p1 core, I measured the following operand-specific dependency latencies:

Ordinary SMULL/SMLAL result latency             4 cycles
SMULL → SMLAL accumulator dependency latency    3 cycles
SMLAL → SMLAL accumulator recurrence latency    1 cycle

The 3-cycle SMULL → SMLAL accumulator dependency does not appear to be explicitly documented in the Cortex-A76 Software Optimization Guide.

Background

I had previously assumed that forwarding a SMULL result into the accumulator operand of a following SMLAL had the same 1-cycle latency as an accumulator dependency between two SMLAL instructions.

That assumption turned out to be incorrect.

The Cortex-A76 does provide a shortened forwarding path into the SMLAL accumulator operand, but its latency depends on the producing instruction:

This is therefore an operand-specific producer-to-consumer latency, rather than a single latency that can be assigned to every use of an SMLAL result.

Interpreting the Result

For a SMULL → SMLAL accumulator dependency, the measured latency corresponds to the following effective issue schedule:

cycle 0: SMULL issues
cycle 1: the dependent SMLAL cannot issue yet
cycle 2: the dependent SMLAL cannot issue yet
cycle 3: the dependent SMLAL can issue

For an accumulator recurrence between two SMLAL instructions:

cycle 0: the first SMLAL issues
cycle 1: the second SMLAL can issue

These schedules assume that:

The issue timings are an interpretation of the measured dependency latencies. They were inferred from black-box timing experiments rather than observed directly inside the processor pipeline.

Measuring the 3-Cycle Dependency

An independent instruction stream measures throughput, not dependency latency. To isolate the SMULL → SMLAL accumulator edge, I constructed a closed alternating dependency cycle:

smull v0.4s, v0.4h, v16.4h
smlal v0.4s, v17.4h, v18.4h

This loop contains two dependency edges:

SMLAL result → next SMULL multiplicand     4 cycles
SMULL result → next SMLAL accumulator      L cycles

The alternating chain measured approximately 3.5 cycles per instruction, or 7 cycles per two-instruction recurrence:

4 + L = 7
L = 3 cycles

The 7-cycle value is the recurrence latency of the complete closed dependency cycle. It is not the latency of a single SMULL → SMLAL edge.

Independent Validation

I repeated the experiment using two separate timing methods.

The first method used the Linux hardware cycle counter through PERF_COUNT_HW_CPU_CYCLES. The benchmarks were pinned to one core and run under the performance governor.

The second method used CLOCK_MONOTONIC and estimated the current CPU frequency with a dependent scalar add chain before converting elapsed time into cycles.

Both methods produced the same results for the 16-to-32-bit and 32-to-64-bit widening forms:

SMULL → SMLAL accumulator dependency    3 cycles
SMLAL → SMLAL accumulator recurrence    1 cycle

I also tested independent instruction mixes against immediate SHL, which the Cortex-A76 optimization guide identifies as using the complementary vector pipeline. The contention results are consistent with SMULL and SMLAL sharing the V0/ASIMD0 execution resource.

Why This Matters

A scheduling model that assigns a uniform 4-cycle latency to every SMULL and SMLAL dependency will miss valid scheduling opportunities.

Conversely, treating every dependency into an SMLAL accumulator as a 1-cycle dependency is too optimistic. That value applies to the SMLAL → SMLAL accumulator recurrence, but not to SMULL → SMLAL.

A more accurate scheduling model for the measured Cortex-A76 core is:

Default SMULL/SMLAL result latency               4
SMULL → SMLAL accumulator latency                3
SMLAL → SMLAL accumulator recurrence latency     1
SMULL/SMLAL reciprocal throughput                1

This distinction is relevant to instruction schedulers such as SLOTHY, particularly in tightly scheduled AdvSIMD arithmetic where one cycle can change the resulting instruction order.

Scope

These results were measured on one Raspberry Pi 5 with a Cortex-A76 r4p1 core. Both widening forms tested produced the same result:

.4h → .4s
.2s → .2d

Other Cortex-A76 revisions and implementations should still be tested independently.

As of my search, I have not found an explicit description of the 3-cycle SMULL → SMLAL accumulator dependency in the Cortex-A76 Software Optimization Guide or in commonly available public instruction-timing results. This is not a claim of absolute novelty, but it appears to fill a gap in the currently available documentation.

Reproduction

The complete benchmark sources, raw measurements, disassemblies, and reproduction scripts are available in the experiment repository. The retained measurements and their derivation are documented in the detailed results.

On the target AArch64 Linux machine, run:

git clone https://github.com/cheng-wei-huang0612/cortex-a76-smull-forwarding.git
cd cortex-a76-smull-forwarding
./run_exp