This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: regmove pass with x87 sincos() instruction
- From: Jim Wilson <wilson at specifixinc dot com>
- To: Uros Bizjak <uros at kss-loka dot si>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 05 Apr 2004 23:48:59 -0700
- Subject: Re: regmove pass with x87 sincos() instruction
- References: <406D1217.6020902@kss-loka.si>
Uros Bizjak wrote:
I would like to ask somebody with more knowledge in this area, if there
is a way to make some kind of peephole2-like optimization _before_
regmove pass, which would detect unused register and in this case
convert sincos() instruction back to sin() instruction before regmove
starts to insert move instructions.
The problem seems to be that sin uses the 'u' constraint, and thus will
always get the second FP register, even if the cos result is not used,
which is not what we want.
I don't see an easy solution to this. Maybe it can be worked around
with some hackery in reg-stack.c?
It doesn't seem reasonable to add an extra optimization pass before
regpass to handle this special case.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com