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: a question about peephole2


On Fri, May 13, 2005 at 11:37:16PM +0800, zouq wrote:
> original program is:
> mul.d $f1, $f1, $f0
> add.d $f2, $f2, $f1
> div.d $f3, $f0, $f1;
> 
> after i compile used my changed gcc, it becomes:
> madd.d $f2, $f1, $0
> div.d  $f3, $f0, $f1
> 
> as you can see, the value of $f1 is wrong!!

Check

  (rtx_equal_p (operands[3], operands[0])
   || peep2_reg_dead_p (2, operands[0]))


r~


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