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 23, 2004, at 12:37 AM, Richard Henderson wrote:


On Tue, Sep 21, 2004 at 04:52:39PM -0700, Devang Patel wrote:
Auto Vectorizer wants to see if operation is supported without
generating insn at that time.

Then you are confused about how you're supposed to check for that. Adding a dummy boolean operand is definitely not ok.

Before auto-vectorizing loop, vectorizer checks all loop statements. It checks whether relevant statements can be replaced by vector statements or not. Once loop is flagged as vectorizable, all relevant statements are vectorized. For the conditional modify expr., I need to check if it can be vectorized or not. I think, checking existance vcond insn for given mode is not sufficient. So in expand_vec_cond_expr_p(), I create dummy rtx for vec_cond_expr operands and ask target to return insns for given mode and code using dummy rtx. I used boolean operand to instruct target not emit any insn if it is only for checking purposes. In the updated patch, I just sent few minutes ago, I've removed boolean flag. Now I check if vcond insn fail or not. If it fails than statement can not be vectorized. If it succeeds than statement can be vectorized and generated insn are ignored.


As I said earlier this is weakest part of this patch. Thoughts?
Thanks,
-
Devang


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