Re: [PATCH] middle-end: Simplify popcount/parity of bswap/rotate.

2020-08-24 Thread Jeff Law via Gcc-patches
On Fri, 2020-08-21 at 17:52 +0100, Roger Sayle wrote: > This simple patch to match.pd optimizes away bit permutation > operations, specifically bswap and rotate, in calls to popcount and > parity. Although this patch has been developed and tested on LP64, > it relies on there being no truncations

Re: [PATCH] middle-end: Simplify popcount/parity of bswap/rotate.

2020-08-22 Thread Marc Glisse
On Fri, 21 Aug 2020, Roger Sayle wrote: This simple patch to match.pd optimizes away bit permutation operations, specifically bswap and rotate, in calls to popcount and parity. Good idea. Although this patch has been developed and tested on LP64, it relies on there being no truncations or

[PATCH] middle-end: Simplify popcount/parity of bswap/rotate.

2020-08-21 Thread Roger Sayle
This simple patch to match.pd optimizes away bit permutation operations, specifically bswap and rotate, in calls to popcount and parity. Although this patch has been developed and tested on LP64, it relies on there being no truncations or extensions to "marry up" the appropriate PARITY, PARITYL