Open uncleasm opened 2 years ago
@llvm/issue-subscribers-backend-aarch64
We can disable lsr to workaround this issue. But I'm not sure how to fix it. https://godbolt.org/z/szcMK9sqh
It looks ldp/stp don't support scaled addressing mode. So we need to add some code to avoid ldp/stp with Scale report legal in AArch64. I will try to add a patch to fix it later. https://reviews.llvm.org/D124014
Update: Abandon the patch as it is not correct. For now I have no more idea to fix this issue.
The problem is probably only seen on arm64 with the missed opportunity to use post-fix instructions for pointer access.
Given
we see good code with post-fix addressing
ldp x,y,[x0],#32
However, when this fragment is attempted to be used for (say 3 separate rows)
the code generator has chosen to allocate 9 registers for all these pointers
There are some 11 avoidable instructions, which could be substituted to the
ldr vector_reg, [base_reg, offset_reg]
and the post-fixldp vec0, vec1, [base_reg], #32