On 01/13/15 02:51, Richard Biener wrote:
On a SHIFT_COUNT_TRUNCATED target, I don't think it's ever OK to widen a
shift, variable or constant.

In the case of a variable shift, we could easily have eliminated the masking
code before or during combine.  For a constant shift amount we could have
adjusted the constant (see SHIFT_COUNT_TRUNCATED in cse.c)

I think it's just an oversight and it has simply never bit us before.

IMHO SHIFT_COUNT_TRUNCATED should be removed and instead
backends should provide shift patterns with a (and:QI ...) for the
shift amount which simply will omit that operation if suitable.
Perhaps. I'm certainly not wed to concept of SHIFT_COUNT_TRUNCATED. I don't see that getting addressed in the gcc-5 timeframe.



aarch64, alpha, epiphany, iq2000, lm32, m32r, mep, microblaze, mips, mn103, nds32, pa, sparc, stormy16, tilepro, v850 and xtensa are the current SHIFT_COUNT_TRUNCATED targets.


Jeff

Reply via email to