]> gcc.gnu.org Git - gcc.git/commit
vect: Refactor code for index == count in vect_transform_slp_perm_load_1
authorKewen Lin <linkw@linux.ibm.com>
Mon, 22 May 2023 02:19:02 +0000 (21:19 -0500)
committerKewen Lin <linkw@linux.ibm.com>
Mon, 22 May 2023 02:19:02 +0000 (21:19 -0500)
commit285e0bb95dd3edf3e3312f0e0ee940594f46f77d
tree1dce3e8059b8645be12d10798b9e4cd1d386566c
parent4579954f25020f0b39361ab6ec0c8876fda27041
vect: Refactor code for index == count in vect_transform_slp_perm_load_1

This patch is to refactor the handlings for the case (index
== count) in a loop of vect_transform_slp_perm_load_1, in
order to prepare a subsequent adjustment on *nperm.  This
patch doesn't have any functional changes.

Basically this is to rewrite two if below:

  if (index == count && !noop_p)
    {
       // A ...
       // ++*n_perms;
    }

  if (index == count)
    {
       if (!analyze_only)
 {
    if (!noop_p)
       // B1 ...

    // B2 ...

    for ...
      {
 if (!noop_p)
    // B3 building VEC_PERM_EXPR
 else
    // B4 building nothing (no uses for B2 and its seq)
      }
 }
       // B5
    }

into one hunk below:

  if (index == count)
    {
       if (!noop_p)
 {
   // A ...
   // ++*n_perms;

   if (!analyze_only)
     {
// B1 ...
// B2 ...
for ...
   // B3 building VEC_PERM_EXPR
     }
 }
       else if (!analyze_only)
 {
    // no B2 since no any further uses here.
    for ...
      // B4 building nothing
 }
// B5 ...
    }

gcc/ChangeLog:

* tree-vect-slp.cc (vect_transform_slp_perm_load_1): Refactor the
handling for the case index == count.
gcc/tree-vect-slp.cc
This page took 0.058206 seconds and 5 git commands to generate.