Re: [PATCH] Recognize a missed usage of a sbfiz instruction

2018-02-02 Thread Kyrill Tkachov
Hi Luis, On 02/02/18 14:38, Luis Machado wrote: A customer reported the following missed opportunities to combine a couple instructions into a sbfiz. int sbfiz32 (int x) { return x << 29 >> 10; } long sbfiz64 (long x) { return x << 58 >> 20; } This gets converted to the following pattern

[PATCH] Recognize a missed usage of a sbfiz instruction

2018-02-02 Thread Luis Machado
A customer reported the following missed opportunities to combine a couple instructions into a sbfiz. int sbfiz32 (int x) { return x << 29 >> 10; } long sbfiz64 (long x) { return x << 58 >> 20; } This gets converted to the following pattern: (set (reg:SI 98) (ashift:SI (sign_extend:SI (