Fix an instance where we would drop fast math flags when performing an fdiv to reciprocal multiply transformation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199425 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Owen Anderson
2014-01-16 21:07:52 +00:00
parent da5e148474
commit 5d9450f92f
2 changed files with 11 additions and 1 deletions
@@ -1050,8 +1050,10 @@ Instruction *InstCombiner::visitFDiv(BinaryOperator &I) {
}
// X / C => X * 1/C
if (Instruction *T = CvtFDivConstToReciprocal(Op0, Op1C, AllowReciprocal))
if (Instruction *T = CvtFDivConstToReciprocal(Op0, Op1C, AllowReciprocal)) {
T->copyFastMathFlags(&I);
return T;
}
return 0;
}