[AArch64][SVE2] Combine trunc+add+lsr to rshrnb
The example sequence add z0.h, z0.h, #32 lsr z0.h, #6 st1b z0.h, x1 can be replaced with rshrnb z0.b, #6 st1b z0.h, x1 As the top half of the destination elements are truncated. In similar fashion, add z0.s, z0.s, #32 lsr z1.s, z1.s, #6 add z1.s, z1.s, #32 lsr z0.s, z0.s, #6 uzp1 z0.h, z0.h, z1.h Can be replaced with rshrnb z1.h, z1.s, #6 rshrnb z0.h, z0.s, #6 uzp1 z0.h, z0.h, z1.h Differential Revision: https://reviews.llvm.org/D155299
parent
cc488b80
Please register or sign in to comment