[PATCH] D37989: InstCombine: Insert missing canonicalizes

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 27 11:22:42 PST 2017


arsenm added a comment.

In https://reviews.llvm.org/D37989#936369, @escha wrote:

> In https://reviews.llvm.org/D37989#936337, @scanon wrote:
>
> > IEEE 754 rules are that everything canonicalizes except bitwise operations (copy, abs, negate, copysign) and decimal re-encoding operations (which you don't care about).
>
>
> Does this mean that we need to make all other float optimizations in LLVM do the same?
>
> for example, we cannot optimize fmul(x, 1) to x, we must optimize it to fcanonicalize(x), right? thus preventing pretty much all float optimizations, since presumably that will act as a barrier.


Also related is https://reviews.llvm.org/D37999. Is it OK to universally constant fold some subset of canonicalizes?


https://reviews.llvm.org/D37989





More information about the llvm-commits mailing list