This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fwd: constant hoisting out of loops


On Sun, Mar 21, 2010 at 2:47 AM, Jim Wilson <wilson@codesourcery.com> 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_expand_move. ?I.e., if neither
> the source or dest is a register, then you force the source into a
> register.
>
> If you still have the mem&const check there, then mem&mem will
> accidentally be accepted and generated.
>
> Jim
>
>
>
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) ||
register_operand(operands[1],SImode)) ..." does not accept mem&&mem.

   "(!(
     (memory_operand(operands[0], SImode) &&
(foor_const_operand_f(operands[1])))
   ||(memory_operand(operands[0], HImode) &&
(foor_const_operand_f(operands[1])))
   ||(memory_operand(operands[0], QImode) &&
(foor_const_operand_f(operands[1])))
   ))"

Thanks.
-- 
-Qifei Fan
http://freshtime.org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]