http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57896
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|middle-end |target
--- Comment #19 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The bug is in the backend, gen_reg_rtx shouldn't be called when init_emit has
not been called.
If one looks e.g. at tree-ssa-loop-ivopts.c or even
ix86_vectorize_vec_perm_const_ok, it avoids using gen_reg_rtx and instead uses
gen_raw_REG:
d.target = gen_raw_REG (d.vmode, LAST_VIRTUAL_REGISTER + 1);
d.op1 = d.op0 = gen_raw_REG (d.vmode, LAST_VIRTUAL_REGISTER + 2);
if (!d.one_operand_p)
d.op1 = gen_raw_REG (d.vmode, LAST_VIRTUAL_REGISTER + 3);
So, we should avoid calling gen_reg_rtx if d->testing_p, we can create
gen_raw_REG instead if really needed. Let me skim through the routines.