<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 - r311737 caused miscompile of chromium under msan"
   href="https://bugs.llvm.org/show_bug.cgi?id=34514">34514</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>r311737 caused miscompile of chromium under msan
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </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>Backend: X86
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>hans@chromium.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>chandlerc@gmail.com, craig.topper@gmail.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>This is based on a Chromium bug:
<a href="https://bugs.chromium.org/p/chromium/issues/detail?id=762156">https://bugs.chromium.org/p/chromium/issues/detail?id=762156</a>

After r311737 we started seeing a single test binary failing, and only in msan
builds, with an incorrect result.

I don't have a good repro for this besides building and running the test.



The test failure correlated with a change in X86TargetLowering::EmitTest's
behaviour for a single SDAG node. Before r311737, EmitTest for an ISD::AND
would generally return an X86ISD::AND. After that revision, it will more often
return an X86ISD::CMP against 0, which is the pattern for a "test" instruction.

If I change the new code to not do that for ISD::AND nodes which are used by
both an X86ISD::CMP and an ISD::SELECT, the test passes.

But even when targeting just that node, the difference in asm output is large
and hard to make sense of.

See the Chromium bug for IR and the patch I used.</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>