Re: Fwd: xtensa PR65730

2015-05-13 Thread Richard Henderson
On 04/10/2015 06:38 AM, Max Filippov wrote: > OTOH calling helper function to do multiplication by a constant 8 looks > rather stupid. I guess we're not going to have non-8-bit bytes on xtensa > anytime soon, maybe this multiplication can be replaced with shift? Yes, that's what I'd do. r~

Re: xtensa PR65730

2015-04-13 Thread augustine.sterl...@gmail.com
On Sat, Apr 11, 2015 at 12:43 AM, Max Filippov wrote: > On Sat, Apr 11, 2015 at 2:16 AM, augustine.sterl...@gmail.com > wrote: >> On Fri, Apr 10, 2015 at 1:18 PM, Max Filippov wrote: >>> How can we have a mulsi3 pattern that don't get expanded until it's >>> optimized, and only gets expanded to

Re: xtensa PR65730

2015-04-11 Thread Max Filippov
On Sat, Apr 11, 2015 at 2:16 AM, augustine.sterl...@gmail.com wrote: > On Fri, Apr 10, 2015 at 1:18 PM, Max Filippov wrote: >> How can we have a mulsi3 pattern that don't get expanded until it's >> optimized, and only gets expanded to a call if it couldn't be optimized? > > I'm not completely sur

Re: xtensa PR65730

2015-04-10 Thread augustine.sterl...@gmail.com
On Fri, Apr 10, 2015 at 1:18 PM, Max Filippov wrote: > Ok, then I see why this doesn't happen: mulsi3 pattern matching is > conditional on TARGET_MUL32, so when TARGET_MUL32 ==0 and > expand_simple_binop emits a call to a helper it's not considered > mulsi3, it's just a call: > > (call_insn/u 17 1

Re: xtensa PR65730

2015-04-10 Thread Max Filippov
On Fri, Apr 10, 2015 at 10:51 PM, augustine.sterl...@gmail.com wrote: > On Fri, Apr 10, 2015 at 12:15 PM, Max Filippov wrote: >> Then configuration w/o multiplication should call helper at -O0 and >> use shift at higher optimization levels? > > That is what I would expect. Ok, then I see why thi

Re: xtensa PR65730

2015-04-10 Thread augustine.sterl...@gmail.com
On Fri, Apr 10, 2015 at 12:15 PM, Max Filippov wrote: > Then configuration w/o multiplication should call helper at -O0 and > use shift at higher optimization levels? That is what I would expect.