This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Reload CONST_VECTOR into memory on ppc.


"Geoffrey Keating <geoffk@geoffk.org> writes:

>> test.c:2888: error: unrecognizable insn:
>> (insn 8625 5575 5570 510 (set (reg:V4SI 1)
>>         (const_vector:V4SI [
>>                 (const_int 65537 [0x10001])
>>                 (const_int 65537 [0x10001])
>>                 (const_int 65537 [0x10001])
>>                 (const_int 65537 [0x10001])
>>             ])) -1 (nil)
>>     (nil))
>> test.c:2888: internal compiler error: in extract_insn, at recog.c:2061
>> Please submit a full bug report,
>> with preprocessed source if appropriate.
>> See <URL:http://gcc.gnu.org/bugs.html> for instructions.

> This insn should be recognizable; certainly, spilling to memory isn't
> going to produce much better code.  Note that we are here loading
> a CONST_VECTOR into *integer* registers.

> Probably you need to enhance movv4si_internal to handle this case.

I think, there are two thing we need to fix:

1) Reload needs a hint what to do, if it gets a const_vector as operand,
   which is not a 'easy' vector (loadable with a splash instruction). Even
   if anything is done to prevent the compiler to produce such an insn with
   a 'not easy' vector, due to some optimization as seen above such a const
   might be produced. The change of PREFERED_RELOAD_CLASS will give reload
   a needed hint, what to do, and is necessary for a robust compiler.

2) More VECTOR_CONST as now recognized are possible to load more efficient
   as done right now. Even the one above can be loaded with 'vspltisb' into
a
   vector register. Also for loading this constant in integer register, we
could
   code appropriate splitter.

Locking at both 1) is necessary, 2) is a optimization.

      regards, Hartmut






Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]