https://llvm.org/bugs/show_bug.cgi?id=26862
Bug ID: 26862 Summary: InstructionSimplify broadens undef when simplifying fdiv 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 SimplifyFDivInst, 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, for any value of X, there will be some floating point values that undef/X cannot produce. For example, if X is 0, the original code can only evaluate to Infinity, -Infinity, or NaN, but the transformed code may produce any value. The second optimization is similar. For example, if X is 0, x/undef is either 0, -0, or NaN. -- 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