IA64 compilation failure

Jim Wilson wilson@specifixinc.com
Fri Feb 20 02:51:00 GMT 2004


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 zero_extract.

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 
called.

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



More information about the Gcc mailing list