llvm-project
d84a911e - [AArch64][SVE] Avoid redundant extend of unsigned i8/i16 extracts. (#165863)

Commit
18 hours ago
[AArch64][SVE] Avoid redundant extend of unsigned i8/i16 extracts. (#165863) Extracts of unsigned i8 or i16 elements from the bottom 128 bits of a scalable register lead to the implied zero-extend being transformed to an AND mask. The mask is redundant since UMOV already zeroes the high bits of the destination register. For example: ```c int foo(svuint8_t x) {   return x[3]; } ``` Currently: ```gas foo:   umov    w8, v0.b[3]   and     w0, w8, #0xff   ret ``` Becomes: ```gas foo:   umov    w0, v0.b[3]   ret ```
Author
Parents
Loading