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: unassignedb...@nondot.org
          Reporter: dav...@cs.rutgers.edu
                CC: llvm-bugs@lists.llvm.org,
                    santosh.nagaraka...@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to