On Wed, 29 Nov 2023 at 19:57, Joern Rennecke <joern.renne...@embecosm.com> wrote: > > Attached is what I have for carry_backpropagate . > > The utility of special handling for SS_ASHIFT / US_ASHIFT seems > somewhat marginal. > > I suspect it'd be more useful to add handling of LSHIFTRT and ASHIFTRT > . Some ports do > a lot of static shifting.
> + case SS_ASHIFT: > + case US_ASHIFT: > + if (!mask || XEXP (x, 1) == const0_rtx) > + return 0; P.S.: I just realize that this is a pasto: in the case of a const0_rtx shift count, we returning 0 will usually be wrong. OTOH the code below will handle this just almost perfectly - the one imperfection being that SS_ASHIFT will see the sign bit set live if anything is live. Not that it actually matters if we track liveness in 8 / 8 / 16 / 32 bit chunks.