diff options
author | Ricardo Jesus <rjj@nvidia.com> | 2025-03-06 09:27:07 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-06 09:27:07 +0000 |
commit | f01e760c08365426de95f02dc2c2dc670eb47352 (patch) | |
tree | 58fed279dcb2ccbba7506b731e1db5b00beb9e2b /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
parent | 0cceac6bbdf800b04c3325e1134a8b25b6d1a0bb (diff) | |
download | llvm-f01e760c08365426de95f02dc2c2dc670eb47352.zip llvm-f01e760c08365426de95f02dc2c2dc670eb47352.tar.gz llvm-f01e760c08365426de95f02dc2c2dc670eb47352.tar.bz2 |
[AArch64][SVE] Improve fixed-length addressing modes. (#129732)
When compiling VLS SVE, the compiler often replaces VL-based offsets
with immediate-based ones. This leads to a mismatch in the allowed
addressing modes due to SVE loads/stores generally expecting immediate
offsets relative to VL. For example, given:
```c
svfloat64_t foo(const double *x) {
svbool_t pg = svptrue_b64();
return svld1_f64(pg, x+svcntd());
}
```
When compiled with `-msve-vector-bits=128`, we currently generate:
```gas
foo:
ptrue p0.d
mov x8, #2
ld1d { z0.d }, p0/z, [x0, x8, lsl #3]
ret
```
Instead, we could be generating:
```gas
foo:
ldr z0, [x0, #1, mul vl]
ret
```
Likewise for other types, stores, and other VLS lengths.
This patch achieves the above by extending `SelectAddrModeIndexedSVE`
to let constants through when `vscale` is known.
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions