Re: Fwd: constant hoisting out of loops

2010-03-21 Thread fanqifei
On Sun, Mar 21, 2010 at 3:43 AM, Jim Wilson wrote: > On Sun, 2010-03-21 at 03:40 +0800, fanqifei wrote: >> foor_expand_move is changed and it works now. >> However, I still don't understand why there was no such error if below >> condition was used and foor_expand_move was not changed. >> Both bel

Re: Fwd: constant hoisting out of loops

2010-03-20 Thread Jim Wilson
On Sun, 2010-03-21 at 03:40 +0800, fanqifei wrote: > foor_expand_move is changed and it works now. > However, I still don't understand why there was no such error if below > condition was used and foor_expand_move was not changed. > Both below condition and "(register_operand(operands[0], SImode) |

Re: Fwd: constant hoisting out of loops

2010-03-20 Thread fanqifei
On Sun, Mar 21, 2010 at 2:47 AM, Jim Wilson wrote: > On Sat, 2010-03-20 at 14:29 +0800, fanqifei wrote: >> I changed the condition in "*mov_insn_mode" to below: >>       (register_operand(operands[0], SImode) || >> register_operand(operands[1],SImode)) > > I think you need the same change in foor_

Re: Fwd: constant hoisting out of loops

2010-03-20 Thread Jim Wilson
On Sat, 2010-03-20 at 14:29 +0800, fanqifei wrote: > I changed the condition in "*mov_insn_mode" to below: > (register_operand(operands[0], SImode) || > register_operand(operands[1],SImode)) I think you need the same change in foor_expand_move. I.e., if neither the source or dest is a regis

Re: Fwd: constant hoisting out of loops

2010-03-19 Thread fanqifei
On Sat, Mar 20, 2010 at 6:24 AM, Jim Wilson wrote: > On Fri, 2010-03-19 at 22:06 +0800, fanqifei wrote: >> 1.      I add movsi expander in which function foor_expand_move is used to >> force the operands[1] to reg and emit the move insn. >> Another change is that in the define of insn “*mov_mode_i

Re: Fwd: constant hoisting out of loops

2010-03-19 Thread Jim Wilson
On Fri, 2010-03-19 at 22:06 +0800, fanqifei wrote: > 1. I add movsi expander in which function foor_expand_move is used to > force the operands[1] to reg and emit the move insn. > Another change is that in the define of insn “*mov_mode_insn" in which > a condition is added to prevent a store c

Fwd: constant hoisting out of loops

2010-03-19 Thread fanqifei
On Fri, Mar 19, 2010 at 1:06 AM, fanqifei wrote: > On Thu, Mar 18, 2010 at 2:30 AM, Jim Wilson wrote: >> On Wed, 2010-03-17 at 11:27 +0800, fanqifei wrote: >>> You are correct. The reload pass emitted the clr.w insn. >>> However, I can see loop opt passes after reload: >>> problem1.c.174r.loop2_i