Re: [PATCH] Fix PR 108874: aarch64 code regression with shift and ands

2023-03-10 Thread Richard Sandiford via Gcc-patches
Andrew Pinski via Gcc-patches writes: > After r6-2044-g98e30e515f184b, code like "((x & 0xff00ff00U) >> 8)" > would be optimized like (x >> 8) & 0xff00ffU which is normally better > except on aarch64, the shift right could be combined with another > operation in some cases. So we need to add a few

[PATCH] Fix PR 108874: aarch64 code regression with shift and ands

2023-03-09 Thread Andrew Pinski via Gcc-patches
After r6-2044-g98e30e515f184b, code like "((x & 0xff00ff00U) >> 8)" would be optimized like (x >> 8) & 0xff00ffU which is normally better except on aarch64, the shift right could be combined with another operation in some cases. So we need to add a few define_splits to the aarch64 backends that mat