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: Vector shuffling


Hi, sorry for the delay, I had a lot of other stuff to do.

In the attachment there is a new patch that fixes all the issues
pointed by Joseph and almost all the issues pointed by Richard. The
issues that are not fixed are explained further.

Artem.

>+      if (TREE_CODE (vect) == VECTOR_CST)
>+        {
>+            unsigned i;
>+            tree vals = TREE_VECTOR_CST_ELTS (vect);
>+            for (i = 0; vals; vals = TREE_CHAIN (vals), ++i)
>+              if (i == index)
>
>operand_equal_p

Sorry, I didn't get this comment. It looks fine to me without any changes.

>+  if (need_asgn)
>+    {
>+      TREE_ADDRESSABLE (tmpvec) = 1;
>
>this should be at the point we call create_tmp_var.

Here we are talking about writing this line two times several lines
upper. I would like to leave it just to avoid code duplication.

>Index: gcc/passes.c
>===========================================================>========
>--- gcc/passes.c        (revision 178354)
>+++ gcc/passes.c        (working copy)
>@@ -1354,7 +1354,6 @@ init_optimization_passes (void)
>         NEXT_PASS (pass_vectorize);
>           {
>             struct opt_pass **p = &pass_vectorize.pass.sub;
>-             NEXT_PASS (pass_lower_vector_ssa);
>             NEXT_PASS (pass_dce_loop);
>           }
>          NEXT_PASS (pass_predcom);
>@@ -1366,6 +1365,7 @@ init_optimization_passes (void)
>         NEXT_PASS (pass_lim);
>         NEXT_PASS (pass_tree_loop_done);
>       }
>+      NEXT_PASS (pass_lower_vector_ssa);
>
>This change should not be neccesary.

Without this change the vector lowering with -Ox does not execute the
pass at all. So the overall idea is to make sure that if we have -Ox
we make lowering only once and as late as possible.

But maybe I am just missing something.



Thanks,
Artem.

P.S. X86 PEOPLE, WHERE ARE YOU? :)

Attachment: vec-shuffle.v16.diff
Description: Text document


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