Rohit Arul Raj wrote:

1. emit_insn to set the flag (moving data to special registers).
2. emit_insn for add_float insn.
3. DONE
> [...]
Any specific reason why these are getting deleted and how to overcome this?

I think its maybe because there is no connection between 1. and 2. (or at least gcc thinks it). And because he wanted just 2. in the first place he thinks that he can optimize 1. away.

There are different ways to overcome this:

a. make the add_float-pattern not only match the add but also the setting of the flags, this way they kept together b. make 1. volatile so he didnt optimize it away (but then it will also remain there if he can optimize 2. away) c. add to the add_float (use special_reg) or whatever to tell him that he requires the special registers.

Florian

Reply via email to