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

Sanjay Patel spatel at rotateright.com
Wed Feb 25 14:55:39 PST 2015


Ah, understood. Thank you for the explanation.

Patch checked in here:
http://reviews.llvm.org/rL230564

On Mon, Feb 23, 2015 at 10:22 PM, Eli Friedman <eli.friedman at gmail.com>
wrote:

> 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/20150225/30df624d/attachment.html>


More information about the llvm-commits mailing list