Hi! On Sun, Jan 01, 2023 at 03:55:26PM -0000, Roger Sayle wrote: > In 2011, the rtl.texi documentation was updated to reflect that the > modes of the RTX unary operations FFS, POPCOUNT and PARITY must > match those of their operands.
Is that not a limitation we should try to get rid of? It does not really make any sense after all. > Unfortunately, some of the transformations > in simplify-rtx.cc predate this tightening of RTL semantics, and have > not (until now) been updated/fixed. i.e. The POPCOUNT and PARITY > optimizations were "correct" when I originally added them back in 2007. What would be needed to fix this the "other" way? Just update the documentation? Or is there some code that requires this strange constraint, maybe even some checking thing? If we *do* want this strange limitation, we really should have some RTL check that enforces it, makes sure we find it if the rules are broken. Thanks and happy new year, Segher