[PATCH] Fix complex ICE on ia64

Jakub Jelinek jakub@redhat.com
Tue Jun 5 09:25:00 GMT 2001


Hi!

The testcase in the 3rd attachement below ICEs gcc on IA-64.
The problem is that ia64_function_arg creates e.g. for DCmode
parallel with two DFmode regs (f8/f9) and two DImode regs (in0/in1)
which emit_group_load is not able to handle if a CONCAT with two DFmode
arguments is passed as orig_src (it is trying to 
emit_move_insn ((reg:DI), (reg:DF)) which has to fail).
For TCmode, it is even worse, since there are 2 TFmodes and 4 DImodes in the
parallel, so emit_group_load ICEs even earlier because e.g. offset 8 is
neither 0 nor 16.
Below are two different patches, both fix it but I'm not sure which one is
better, perhaps the expr.c one as it will fix all ports, not just IA-64.
With the first patch, gcc creates better code for the testcase below, on the
other side creates worse code for the case where a MEM is passed as orig_src
to emit_group_load (e.g. in
void foo (), bar (), baz ();
__complex__ double x;
__complex__ float y;
__complex__ long double z;
int test (void)
{
  foo (x);
  bar (y);
  baz (z);
  return 0;
}
). The second patch generates worse code for the testcase below, but for the
testcase above it produces the same code as did before (ie. better than with
the first patch).

	Jakub


More information about the Gcc-patches mailing list