diff options
author | Ties Stuij <ties.stuij@arm.com> | 2025-08-07 09:48:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-08-07 09:48:09 +0100 |
commit | b9e133d5b6e41b652ba579bcb8850c00f72d0f01 (patch) | |
tree | 237be944f4319b584bfafee8fb757602cd0cb0dc /libcxx/include/__tree | |
parent | d618c36cb7a8c7951fb7532c07ea313b2d7ec1a7 (diff) | |
download | llvm-main.zip llvm-main.tar.gz llvm-main.tar.bz2 |
With this new A320 in-order core, we follow adding the
FeatureUseFixedOverScalableIfEqualCost feature to A510 and A520
(#132246), which reaps the same code generation benefits of preferring
fixed over scalable when the cost is equal.
So when we have:
```
void foo(float* a, float* b, float* dst, unsigned n) {
for (unsigned i = 0; i < n; ++i)
dst[i] = a[i] + b[i];
}
```
When compiling without the feature enabled, we get:
```
...
ld1b { z0.b }, p0/z, [x0, x10]
ld1b { z2.b }, p0/z, [x1, x10]
add x12, x0, x10
ldr z1, [x12, #1, mul vl]
add x12, x1, x10
ldr z3, [x12, #1, mul vl]
fadd z0.s, z2.s, z0.s
add x12, x2, x10
fadd z1.s, z3.s, z1.s
dech x11
st1b { z0.b }, p0, [x2, x10]
incb x10, all, mul #2
str z1, [x12, #1, mul vl]
...
```
When compiling with, we get:
```
...
ldp q0, q1, [x12, #-16]
ldp q2, q3, [x11, #-16]
subs x13, x13, #8
fadd v0.4s, v2.4s, v0.4s
fadd v1.4s, v3.4s, v1.4s
add x11, x11, #32
add x12, x12, #32
stp q0, q1, [x10, #-16]
add x10, x10, #32
...
```
Diffstat (limited to 'libcxx/include/__tree')
0 files changed, 0 insertions, 0 deletions