<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </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 --- - LoopVectorizer: Mistakenly vectorize multi reduction value users"
   href="http://llvm.org/bugs/show_bug.cgi?id=18526">18526</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>LoopVectorizer: Mistakenly vectorize multi reduction value users
          </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>All
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>normal
          </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>aschwaighofer@apple.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=11889" name="attach_11889" title="Test case">attachment 11889</a> <a href="attachment.cgi?id=11889&action=edit" title="Test case">[details]</a></span>
Test case

t3025 and t1519 from <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - [icFuzz] Incorrect results at -O2 optimization and infinite loop in the Clang optimizer"
   href="show_bug.cgi?id=16431#c22">http://llvm.org/bugs/show_bug.cgi?id=16431#c22</a> are
misoptimized.

As described in
<a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - [icFuzz] Incorrect results at -O2 optimization and infinite loop in the Clang optimizer"
   href="show_bug.cgi?id=16431#c23">http://llvm.org/bugs/show_bug.cgi?id=16431#c23</a>

"The diff tests are vectorizer bugs (look like the same bug): t3025 and t1519.
They disappear with -fno-vectorize.

Furthermore,

it seems to be the loops:

    for (k1 = 54; k1 > 2; k1--) {
        gp += gp - ((++n) + k1);

        // Test Loop Vectorization
        for (ju = 1; ju < 1; ++ju) {
            d5[ju] = ff[k1][k1];
        }

    }

and 

    for (k = 2; k < 61; ++k) {
        n += n - ((f + k7) + (nf++));
        xs5[k] = 13 + 5;
        xs5[k] += nt7--;
    }

We should not be vectorizing them. ā€œgpā€ and ā€œnā€ are not reductions. But we seem
to :(."</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>