This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Create VECTOR_CST instead of CONSTRUCTORs where possible in the vectorizer (PR tree-optimization/33993)
On Wed, Nov 07, 2007 at 11:36:56AM -0500, Jakub Jelinek wrote:
> From what I can see, gcc.dg/vect/no-scevccp-outer-10a.c is miscompiled
> during sched2, where the scheduler happily moves set of v1 (and v12)
> register accross a function call, in the former case it is not fatal on
> Altivec CPUs (the vspltisw 1,4 insn is just moved before bl check_vector,
> which means e.g. that on non-Altivec CPUs this will SIGILL), but in the
> latter (vspltisw 12,4 insn moved in front of bl foo where it is used after
> it) is fatal. Because:
> if (TARGET_ALTIVEC_ABI)
> for (i = FIRST_ALTIVEC_REGNO; i < FIRST_ALTIVEC_REGNO + 20; ++i)
> call_used_regs[i] = call_really_used_regs[i] = 1;
> and so both v1 and v12 are call used.
Actually, this is ppc64-linux -m32 -maltivec, no -mabi=altivec, so
these regs aren't call_used, but must be saved by foo when they are used.
But they don't seem to be saved/restored even when foo uses them...