[PATCH,frv,installed] fix ifcvt error

Alexandre Oliva aoliva@redhat.com
Fri Nov 26 20:17:00 GMT 2004


The FR-V-specific ifcvt code attempts to leave alone insns introduced
while linearizing nested blocks that set a register to a constant,
because they don't have a conditional-execution form.  About a year
ago, I fixed one such error in which we'd let such an instruction in a
THEN block clobber a register the ELSE block needed.

What I didn't realize back then was that it was also possible for the
THEN block to clobber a register that an ELSE block should let through
to the JOIN block, if the previously-conditional block was before an
unconditional set of the register (such that it would look available
within the nested conditional blocks), and that the ELSE block
shouldn't clobber registers that the THEN block could set or let
through.  I've got a bug report from a customer that triggered one of
these cases, so I went ahead and fixed both.  Here's the patch that
I'm checking in, tested on x86_64-linux-x-frv-elf (with another GCC
patch and an assembler patch needed for it to build)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc-frv-clobber-ifcvt-cond-scratch.patch
Type: text/x-patch
Size: 2006 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20041126/d65b43e7/attachment.bin>
-------------- next part --------------

-- 
Alexandre Oliva             http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}


More information about the Gcc-patches mailing list