Re: Immediates propagated wrongly in stores

2009-07-06 Thread Jean Christophe Beyler
Sorry about the delay in the answer (4th of July weekend...). Anyway, I agree it might not be necessary. I put it there because of the force_reg call. Since that call might in turn call gen_reg_rtx, it will then start off with an assertion of can_create_pseudo_p. That is why, I thought best to pu

Re: Immediates propagated wrongly in stores

2009-07-01 Thread Richard Henderson
On 07/01/2009 02:02 PM, Jean Christophe Beyler wrote: ((reload_in_progress | reload_completed) == 0&& MEM_P (op0)&& !REG_P (op1))) { op1 = force_reg (GET_MODE (op0), op1); emit_move_insn (op0, op1); return 1; I wouldn't think you'd actu

Re: Immediates propagated wrongly in stores

2009-07-01 Thread Jean Christophe Beyler
I tried something similar: (define_expand "movdi" [(set (match_operand:DI 0 "nonimmediate_operand" "") (match_operand:DI 1 "general_operand" ""))] "" " if(my_expand_move (operands[0], operands[1])) DONE; ") (define_insn "movdi_internal1" [(set (match_operand:DI 0 "non

Re: Immediates propagated wrongly in stores

2009-07-01 Thread Richard Henderson
On 07/01/2009 11:28 AM, Jean Christophe Beyler wrote: Ok, I think I understand, I've been therefore playing with this. I initially had: (define_insn "movdi_internal1" [(set (match_operand:DI 0 "nonimmediate_operand" "=r,r,r,R,T,r,R,o") (match_operand:DI 1 "general_operand" "r,iF

Re: Immediates propagated wrongly in stores

2009-07-01 Thread Jean Christophe Beyler
Ok, I think I understand, I've been therefore playing with this. I initially had: (define_insn "movdi_internal1" [(set (match_operand:DI 0 "nonimmediate_operand" "=r,r,r,R,T,r,R,o") (match_operand:DI 1 "general_operand" "r,iF,R,J,J,o,r,r"))] For my movdi. I therefore first wanted

Re: Immediates propagated wrongly in stores

2009-07-01 Thread Richard Henderson
On 07/01/2009 08:36 AM, Jean Christophe Beyler wrote: I tracked it down to the gcse pass. However, I thought I had turned this off in the definition of a movdi in my machine description. But apparently this is not sufficient, any ideas? You probably just changed the constraint letters, but didn

Immediates propagated wrongly in stores

2009-07-01 Thread Jean Christophe Beyler
Dear all, I have this weird issue that I can't really understand: In my architecture I do not have a store immediate into memory, I have to go through a register. However, the compiler is currently propagating constants into the stores. So for example: (insn 44 43 45 4 st3.c:21 (set (reg:DI 119