[llvm-bugs] [Bug 26863] New: InstructionSimplify broadens undef when simplifying from

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Mar 6 21:45:04 PST 2016


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

            Bug ID: 26863
           Summary: InstructionSimplify broadens undef when simplifying
                    from
           Product: libraries
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Global Analyses
          Assignee: unassignedbugs at nondot.org
          Reporter: davemm at cs.rutgers.edu
                CC: llvm-bugs at lists.llvm.org,
                    santosh.nagarakatte at gmail.com
    Classification: Unclassified

These optimizations in SimplifyFRemInst, from
lib/Analysis/InstructionSimplify.cpp, potentially introduce new behavior.

  // undef % X -> undef    (the undef could be a snan).
  if (match(Op0, m_Undef()))
    return Op0;

  // X % undef -> undef
  if (match(Op1, m_Undef()))
    return Op1;

In the first optimization, undef % X must either result in NaN or a value less
than X.

In the second optimization, X % undef will usually result in NaN or a value
less than X when X is normal.

-- 
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/20160307/320ae264/attachment.html>


More information about the llvm-bugs mailing list