https://bugs.llvm.org/show_bug.cgi?id=34514

            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: unassignedb...@nondot.org
          Reporter: h...@chromium.org
                CC: chandl...@gmail.com, craig.top...@gmail.com,
                    llvm-bugs@lists.llvm.org

This is based on a Chromium bug:
https://bugs.chromium.org/p/chromium/issues/detail?id=762156

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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to