[PATCH] D61916: Teach InstSimplify transform -X + X --> 0.0 about unary FNeg

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 15 05:51:33 PDT 2019


spatel added a comment.

In D61916#1502826 <https://reviews.llvm.org/D61916#1502826>, @kpn wrote:

> Is this an allowed transform?
>
> If we transform "y = -x + x;" into "y = 0;" then won't that eliminate a trap? Is that allowed?


We're not dealing with constrained ops in this transform, so assume no traps/exceptions.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61916/new/

https://reviews.llvm.org/D61916





More information about the llvm-commits mailing list