[RFC] optabs and tree-codes for vector operations

James E Wilson wilson@specifixinc.com
Wed Aug 18 22:53:00 GMT 2004


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.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com




More information about the Gcc mailing list