Re: [PATCH] middle-end/104644 - recursion with bswap match.pd pattern

2022-02-23 Thread Jakub Jelinek via Gcc-patches
On Wed, Feb 23, 2022 at 01:53:38PM +0100, Richard Biener wrote: > The following patch avoids infinite recursion during generic folding. > The (cmp (bswap @0) INTEGER_CST@1) simplification relies on > (bswap @1) actually being simplified, if it is not simplified, we just > move the bswap from one op

[PATCH] middle-end/104644 - recursion with bswap match.pd pattern

2022-02-23 Thread Richard Biener via Gcc-patches
The following patch avoids infinite recursion during generic folding. The (cmp (bswap @0) INTEGER_CST@1) simplification relies on (bswap @1) actually being simplified, if it is not simplified, we just move the bswap from one operand to the other and if @0 is also INTEGER_CST, we apply the same rule