<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 - Miscompilation of single loop with two assignments"
   href="https://bugs.llvm.org/show_bug.cgi?id=47793">47793</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Miscompilation of single loop with two assignments
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Macintosh
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>MacOS X
          </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>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>tuom.larsen@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=24044" name="attach_24044" title="Example">attachment 24044</a> <a href="attachment.cgi?id=24044&action=edit" title="Example">[details]</a></span>
Example

The example shows a discrepancy when processing two arrays at once in single
loop and processing each array in a separate loop. It should not matter whether
one array is processed first or both arrays are processed simultaneously but
the later case gives wrong answer. More precise instructions on how to
reproduce the behaviour could be found in the linked example.

It only happens with clang coming with macOS Catalina (sorry, I don't know
which version it is as Apple apparently uses different version numbers as
llvm.org)

Perhaps the single loop gets optimised too aggressively but I'm really guessing
here.

Please find the example below.</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>