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: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to