[PATCH] D145614: [AARCH64] Enable STORE of v4i8 to help more vectorization opportunities
Guozhi Wei via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 10 11:34:21 PST 2023
Carrot added a comment.
I tried isTruncStoreLegalOrCustom and it works, generates the same code as my patch. The final code is
ldr s0, [x1]
ldr s1, [x0]
ushll v0.8h, v0.8b, #0 // *
ushll v1.8h, v1.8b, #0 // *
orr v0.8b, v1.8b, v0.8b
xtn v0.8b, v0.8h // *
str s0, [x0]
ret
But I still prefer my patch. In the final code you can see some redundant instructions, these are generated by SelectionDAG, which promotes v4i8 to v4i16, processes the data, and truncs it to v4i8 before store. If we widen the vector v4i8 to v8i8, all the extra instructions can be deleted. I will work on it in a separate patch.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145614/new/
https://reviews.llvm.org/D145614
More information about the llvm-commits
mailing list