This is the mail archive of the gcc@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: [RFC] optabs and tree-codes for vector operations



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


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