[PATCH] Fix ICE when expanding incorrect shift counts (PR rtl-optimization/69764, take 2)

2016-02-12 Thread Jakub Jelinek
On Fri, Feb 12, 2016 at 02:08:53AM +0100, Bernd Schmidt wrote: > Isn't the problem just that shifts are unusual as binops, in that the two > operands can have different modes? We have the appropriate mode for the > shift count in xmode1, so I think we should just always rebuild a CONST_INT > in

Re: [PATCH] Fix ICE when expanding incorrect shift counts (PR rtl-optimization/69764)

2016-02-11 Thread Bernd Schmidt
On 02/12/2016 12:26 AM, Jakub Jelinek wrote: When expanding shifts with invalid shift counts (negative or too large), the shift count on the GIMPLE level is typically an int mode INTEGER_CST, but when it is passed down through various layers up to expand_binop_directly, we only have one known

[PATCH] Fix ICE when expanding incorrect shift counts (PR rtl-optimization/69764)

2016-02-11 Thread Jakub Jelinek
Hi! When expanding shifts with invalid shift counts (negative or too large), the shift count on the GIMPLE level is typically an int mode INTEGER_CST, but when it is passed down through various layers up to expand_binop_directly, we only have one known mode (other than operand modes, but that is