[RFC] optabs and tree-codes for vector operations

Devang Patel dpatel@apple.com
Wed Aug 18 23:39:00 GMT 2004


On Aug 18, 2004, at 3:26 PM, James E Wilson wrote:

> On Wed, 2004-08-18 at 14:34, Devang Patel wrote:
>> Expanding VEC_COND_EXPR tree nodes means
>> 	- generate vector compare instruction	
>> 	- generate vector select instruction that selects elements for first
>> vector operand or second vector operand and put them in resulting
>> vector.
>
> See for instance the cbranch named pattern, and the
> emit_cmp_and_jump_insn_1 function in optabs.c.  This emits a compare 
> and
> branch without exposing the compare result to the middle end.
>
> Also, keep in mind, that the compare expanders don't actually return a
> result.  They just set up operands for the following branch, 
> conditional
> move, etc expander.  We may not want to do things the same way for
> vector compares, but it is an alternative.  A combined named pattern is
> a better choice though.

OK this clears my confusion.
Thank you,
-
Devang



More information about the Gcc mailing list