This is the mail archive of the
mailing list for the GCC project.
Re: IA64 compilation failure
- From: Jim Wilson <wilson at specifixinc dot com>
- To: sje at cup dot hp dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 19 Feb 2004 17:50:44 -0800
- Subject: Re: IA64 compilation failure
- References: <200402190102.RAA17031@hpsje.cup.hp.com>
Steve Ellcey wrote:
There is no clobber on this zero_extract and I wonder if that is the
problem, that I need a register that I can clobber in order to expand
The problem is that ifcvt is emitting insns without recognizing them.
You must verify an insn is valid before committing to using it.
Just by eyeballing the code, it isn't hard to see that the problem is in
noce_emit_move_insn. Debugging the testcase proves this.
recog has support for returning the number of clobbers needed, but this
is mainly useful before reload, where we can add clobber scratch. This
won't work after reload. We would have to keep track of the original
clobber, or identify an available register for the clobber somehow. See
for instance recog_for_combine in combine.c which handles this problem
before reload. I don't know if there is example code for the
post-reload case. So an important question here is whether
noce_emit_move_insn is ever called after reload. It looks like perhaps
it isn't, but I haven't confirmed that. If it isn't, then it shouldn't
be too hard to fix this by adding clobbers or scratch registers.
Or alternatively, we could give noce_emit_move_insn a return value, so
it can indicate failure, and then add fixup code everyplace where it is
Either way, this looks like a bit of work.
I noticed one odd thing in ia64.md that I couldn't understand and may or
may not be related. In ia64.md after the definition of shift_mix4left,
there are two define_split's. They are identical except that one has a
condition "reload_completed" and the other a condition "! reload_completed".
These kinds of problems can usually be figured out by looking at the CVS
history. If you do
cvs update -r 1.1 ia64.md
then you see that the first pattern is emitting a stop bit, which at the
time was necessary for a post-reload splitter. Later this was changed,
and the stop bit was removed, making it identical to the other splitter,
but this wasn't noticed, and we were left with two identical splitters.
They should be combined into one that has an empty condition.
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com