diff options
author | Sanjay Patel <spatel@rotateright.com> | 2018-02-23 22:20:13 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2018-02-23 22:20:13 +0000 |
commit | db53d1847bcc7900ca351144806c93375f4bd3e1 (patch) | |
tree | 7d4dc1e302fe19629fe7710897033305859a802c /llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp | |
parent | ebc6bc8188c06cb89f01d338004bb4ef55a692f9 (diff) | |
download | bcm5719-llvm-db53d1847bcc7900ca351144806c93375f4bd3e1.tar.gz bcm5719-llvm-db53d1847bcc7900ca351144806c93375f4bd3e1.zip |
[InstSimplify] sqrt(X) * sqrt(X) --> X
This was misplaced in InstCombine. We can loosen the FMF as a follow-up step.
llvm-svn: 325965
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp')
-rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp b/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp index d5456cc532f..48fba0319fd 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp @@ -620,10 +620,6 @@ Instruction *InstCombiner::visitFMul(BinaryOperator &I) { if (Op0 == Op1) { if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(Op0)) { - // sqrt(X) * sqrt(X) -> X - if (AllowReassociate && II->getIntrinsicID() == Intrinsic::sqrt) - return replaceInstUsesWith(I, II->getOperand(0)); - // fabs(X) * fabs(X) -> X * X if (II->getIntrinsicID() == Intrinsic::fabs) { Instruction *FMulVal = BinaryOperator::CreateFMul(II->getOperand(0), |