[llvm] r227491 - [GVN] don't propagate equality comparisons of FP zero (PR22376)

Eli Friedman eli.friedman at gmail.com
Mon Feb 23 21:22:02 PST 2015


On Mon, Feb 16, 2015 at 2:07 PM, Sanjay Patel <spatel at rotateright.com>
wrote:

> Hi Eli,
>
> The change you are suggesting would prevent equality propagation of a
> non-constant FP value. Is that the intention? If yes, why wouldn't we want
> to do that optimization? We do that for the integer case.
>

The constraint you're trying to express is "the optimization is not safe
unless one of the operands is provably non-zero". There are multiple ways
to express that; my suggestion is one of them.  The current code does not
express that.  If you take the fcmp_oeq_zero testcase and replace 0.0 with
some argument %z, and %z happens to be 0.0, you run into exactly the same
problem.

-Eli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150223/bd6ff93b/attachment.html>


More information about the llvm-commits mailing list