[LLVMbugs] [Bug 23639] New: InstCombine: unsigned overflow subtraction miscompilation

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri May 22 12:42:59 PDT 2015


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

            Bug ID: 23639
           Summary: InstCombine: unsigned overflow subtraction
                    miscompilation
           Product: libraries
           Version: 3.6
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: compnerd at compnerd.org
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 14374
  --> https://llvm.org/bugs/attachment.cgi?id=14374&action=edit
reduced.c

Introduced in SVN r234388.

Basically, the X - undef -> undef => X - 0 -> {X, false} is mismatching the
__builtin_subcl with a carry in of 0, resulting in it dropping the arithmetic,
causing a miscomputation.  The attached test case demonstrates the issue and
reverting the particular change does get it correct as does 3.6.

-- 
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/20150522/4b59ac66/attachment.html>


More information about the llvm-bugs mailing list