[InstSimplify] loosen FMF for sqrt(X) * sqrt(X) --> X
authorSanjay Patel <spatel@rotateright.com>
Sun, 18 Mar 2018 14:12:25 +0000 (14:12 +0000)
committerSanjay Patel <spatel@rotateright.com>
Sun, 18 Mar 2018 14:12:25 +0000 (14:12 +0000)
commit95ec4a4dfe4655044a5f689f792e5394d73ea248
tree4cb18b2ab447b7121ff75a6bbc36b14c16d81d94
parent541992203dfc2f2e62309dfc0860677b685a80de
[InstSimplify] loosen FMF for sqrt(X) * sqrt(X) --> X

As shown in the code comment, we don't need all of 'fast',
but we do need reassoc + nsz + nnan.

Differential Revision: https://reviews.llvm.org/D43765

llvm-svn: 327796
llvm/lib/Analysis/InstructionSimplify.cpp
llvm/test/Transforms/InstSimplify/fast-math.ll