[llvm-bugs] [Bug 34514] New: r311737 caused miscompile of chromium under msan

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Sep 6 16:51:42 PDT 2017


            Bug ID: 34514
           Summary: r311737 caused miscompile of chromium under msan
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: hans at chromium.org
                CC: chandlerc at gmail.com, craig.topper at gmail.com,
                    llvm-bugs at lists.llvm.org

This is based on a Chromium bug:

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.

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170906/0a522116/attachment-0001.html>

More information about the llvm-bugs mailing list