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] Add vcond_gen_code optab and expand VEC_COND_EXPR



On Sep 22, 2004, at 9:39 AM, Richard Henderson wrote:


On Tue, Sep 21, 2004 at 05:21:24PM -0700, Devang Patel wrote:
In  vector_compare_rtx() this is used for compare_from_rtx().
There is no optab for vector compares. comparison rtx is generated
and it is handed over to vcond*  insn.

Sure, but I don't see this changing anything. Certainly the vcond instruction has predicates. You should be querying them.

( ANSWER = VEC_COND_EXPR (X > Y, A, B) )


For the VEC_COND_EXPR's two operands (A and B) I've added predicate check. But for the comparison rtx's operands (X and Y), I do not need to force them in register. I also do not check these operands (in vector_compare_rtx()) because they are directly supplied to compare_from_rtx() and resulting comparison rtx is supplied to vcond insn. This will allow target to handle comparison operands appropriately.

Once bootstrap and testing is complete, I will send updated patch.

I am not sure if you're satisfied with my answer regarding your const0_rtx question
+ emit_insn (GEN_FCN (icode) (target, rtx_op1, rtx_op2, comparison, const0_rtx));

- Devang


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