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: altivec: vector constant misc



On Friday, February 15, 2002, at 04:23 PM, Richard Henderson wrote:

> On Sat, Feb 16, 2002 at 09:40:24AM +1100, Aldy Hernandez wrote:
>> btw, i'm revising my patch to remove the (set (reg) (const_int 0))
>> pattern for vectors in favor of just emit_insn'ing the XOR
>> directly.  duh.
>
> Not duh.
>
> 	(set (reg) (constant))
>
> has no dependencies on previous instructions and clearly
> kills the value in REG.  On the other hand,
>
> 	(set (reg) (xor (reg) (reg)))
>
> apparently uses the original value in reg.

Another point is that there are several ways to generate simple
vector constants, for example 0 can be either VXOR R,R,R
or VSPLITISW R,0.  This matters because they use different
functional units and can be scheduled "free" opposite other
instructions in some cases.  The Motorola code looks at the
nearby instructions and tries to use a different FU for the
constant.  It may be better to delay the choice until
scheduling time.


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