Re: [xstormy16 PATCH] Efficient HImode rotate left by a single bit.

2023-04-29 Thread Jeff Law via Gcc-patches
On 4/29/23 10:25, Roger Sayle wrote: This patch contains some minor tweak to xstormy16's machine description most significantly providing a pattern for HImode rotate left by a single bit that requires only two instructions. unsigned short foo(unsigned short x) { return (x << 1) | (x >> 15)

[xstormy16 PATCH] Efficient HImode rotate left by a single bit.

2023-04-29 Thread Roger Sayle
This patch contains some minor tweak to xstormy16's machine description most significantly providing a pattern for HImode rotate left by a single bit that requires only two instructions. unsigned short foo(unsigned short x) { return (x << 1) | (x >> 15); } currently with -O2 generates: foo: