[Bug target/104315] [AArch64] Failure to optimize 8-bit bitreverse pattern

2022-02-01 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104315 --- Comment #3 from Richard Biener --- generalizing the bswap detection to track bits instead of bytes might be a way to handle this (there's the related issue of us failing to "copy propagate" bits with the associated possible simplifications

[Bug target/104315] [AArch64] Failure to optimize 8-bit bitreverse pattern

2022-01-31 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104315 Andrew Pinski changed: What|Removed |Added Last reconfirmed||2022-01-31 Ever confirmed|0

[Bug target/104315] [AArch64] Failure to optimize 8-bit bitreverse pattern

2022-01-31 Thread gabravier at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104315 --- Comment #1 from Gabriel Ravier --- PS: I've just stumbled upon the more generic case, which would be this code: unsigned int stb_bitreverse(unsigned int n) { n = ((n & 0x) >> 1) | ((n & 0x) << 1); n = ((n & 0x)