aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
diff options
context:
space:
mode:
authorFrits van Bommel <fvbommel@gmail.com>2011-01-29 15:26:31 +0000
committerFrits van Bommel <fvbommel@gmail.com>2011-01-29 15:26:31 +0000
commit1fca2c32cc99197215d3fd32a4ad05214c74edd1 (patch)
tree9f358ce4aed7f898391854c5310aa5a6aaaf68ee /lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
parent9136782d273cd45b6f19a7d0cc0d146d0791bac9 (diff)
Move InstCombine's knowledge of fdiv to SimplifyInstruction().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124534 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/InstCombine/InstCombineMulDivRem.cpp')
-rw-r--r--lib/Transforms/InstCombine/InstCombineMulDivRem.cpp14
1 files changed, 0 insertions, 14 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp b/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
index b5b98411f5..32b2a0ac0e 100644
--- a/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
+++ b/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
@@ -473,20 +473,6 @@ Instruction *InstCombiner::visitSDiv(BinaryOperator &I) {
return 0;
}
-Instruction *InstCombiner::visitFDiv(BinaryOperator &I) {
- Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
-
- // undef / X -> undef (the undef could be a snan).
- if (isa<UndefValue>(Op0))
- return ReplaceInstUsesWith(I, Op0);
-
- // X / undef -> undef
- if (isa<UndefValue>(Op1))
- return ReplaceInstUsesWith(I, Op1);
-
- return 0;
-}
-
/// This function implements the transforms on rem instructions that work
/// regardless of the kind of rem instruction it is (urem, srem, or frem). It
/// is used by the visitors to those instructions.