bug report.
Jim Wilson
wilson@specifixinc.com
Mon May 3 00:20:00 GMT 2004
On Sat, 2004-05-01 at 05:18, Gargoyle Crazy Master wrote:
> JUMP_INSN cannot simply be handled by return NULL_RTX.
If an insn contains one and only one set, then single_set returns a
pointer to the set.
A return insn contains no set, and thus single_set returns NULL for it.
This is not a bug in single_set. This is how it is supposed to work.
The fact that onlyjump_p can only return true for an insn if it contains
a set is maybe a bug in onlyjump_p, but we would need convincing
evidence of a problem before we change it.
> (define_insn "return"
> [(use LR_REGNUM)
> (return)]
> ""
This is wrong by the way. The return must be before the use.
Why does this not work? It would be helpful to have specifics. Are you
getting a compiler core dump? Are you getting bad code? It would be
useful to have a testcase, RTL dumps, and a pointer to where the core
dump or miscompilation happens.
It is a known problem that a jumps that use a parallel do not work as
well as jumps that contain only a set. This is fixable, it is just a
matter of some effort to find all of the places that need fixing.
Meanwhile, it is best to avoid using a parallel when it isn't necessary.
It should not be necessary to include LR_REGNUM in the return pattern.
The flow pass can get this info from EPILOGUE_USES. See the docs, and
various targets that define it for examples.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com
More information about the Gcc
mailing list