[llvm] [AArch64][LV] Cost low-VF interleaved access (PR #205844)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 8 09:57:09 PDT 2026
walkerkd wrote:
aobolensk, you might be interested in the following regression in code generation which occurs when your patch is applied:
reproducer.c:
```
typedef unsigned int uint32_t;
typedef signed char q7_t;
typedef short q15_t;
void arm_q15_to_q7(const q15_t *pSrc, q7_t *pDst, uint32_t blockSize) {
uint32_t blkCnt;
const q15_t *pIn = pSrc;
blkCnt = blockSize >> 2U;
while (blkCnt > 0U) {
*pDst++ = (q7_t)(*pIn++ >> 8);
*pDst++ = (q7_t)(*pIn++ >> 8);
*pDst++ = (q7_t)(*pIn++ >> 8);
*pDst++ = (q7_t)(*pIn++ >> 8);
blkCnt--;
}
blkCnt = blockSize % 0x4U;
while (blkCnt > 0U) {
*pDst++ = (q7_t)(*pIn++ >> 8);
blkCnt--;
}
}
```
when compiled with:
```
clang --target=aarch64-none-elf -mcpu=neoverse-v2 -O3 -S reproducer.c
```
it changes the tail of the loop from a NEON remainder loop to an SVE remainder loop which is significantly slower in this case.
https://github.com/llvm/llvm-project/pull/205844
More information about the llvm-commits
mailing list