<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Missed Loop vectorization for global loop variants"
   href="https://bugs.llvm.org/show_bug.cgi?id=40946">40946</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Missed Loop vectorization for global loop variants
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>tools
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>opt
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>balarishi.bhogadi@amd.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>If the loop variant variables are functional parameters of point type, then
loop vectorizations happens.

But, When loop variant variables are global, loop vectorization is not taking
place.

===========

// Flag: -O3  -fno-unroll-loops -c 

char *a, *b, *c;

void loop_not_vectorized()
{
        for (int i = 0; i < 1800; i++) // Loop not vectorized
        {
                a[i] = b[i] * c[i];
        }

}

===========

// Flag: -O3  -fno-unroll-loops -c 

void loop_vectorized(char *a, char *b, char *c)
{
        for (int i = 0; i < 1800; i++) // Loop vectorized
        {
                a[i] = b[i] * c[i];
        }

}

===========</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>