aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis/InstructionSimplify.cpp
diff options
context:
space:
mode:
authorMichael Ilseman <milseman@apple.com>2012-12-12 00:29:16 +0000
committerMichael Ilseman <milseman@apple.com>2012-12-12 00:29:16 +0000
commitd0a0d221da55f5e2d97909991d77e7ab91e75426 (patch)
treee9f9c2770928e45f84232df971366b90e46c8016 /lib/Analysis/InstructionSimplify.cpp
parent5f70c2e934c8cf7814fc047f4824ac89b35dd72d (diff)
downloadexternal_llvm-d0a0d221da55f5e2d97909991d77e7ab91e75426.zip
external_llvm-d0a0d221da55f5e2d97909991d77e7ab91e75426.tar.gz
external_llvm-d0a0d221da55f5e2d97909991d77e7ab91e75426.tar.bz2
Have SimplifyBinOp call the new FAdd/FSub/FMul helpers, with fast-math flags off
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169943 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/InstructionSimplify.cpp')
-rw-r--r--lib/Analysis/InstructionSimplify.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Analysis/InstructionSimplify.cpp b/lib/Analysis/InstructionSimplify.cpp
index 42e506b..35b1e66 100644
--- a/lib/Analysis/InstructionSimplify.cpp
+++ b/lib/Analysis/InstructionSimplify.cpp
@@ -2790,10 +2790,18 @@ static Value *SimplifyBinOp(unsigned Opcode, Value *LHS, Value *RHS,
case Instruction::Add:
return SimplifyAddInst(LHS, RHS, /*isNSW*/false, /*isNUW*/false,
Q, MaxRecurse);
+ case Instruction::FAdd:
+ return SimplifyFAddInst(LHS, RHS, FastMathFlags(), Q, MaxRecurse);
+
case Instruction::Sub:
return SimplifySubInst(LHS, RHS, /*isNSW*/false, /*isNUW*/false,
Q, MaxRecurse);
+ case Instruction::FSub:
+ return SimplifyFSubInst(LHS, RHS, FastMathFlags(), Q, MaxRecurse);
+
case Instruction::Mul: return SimplifyMulInst (LHS, RHS, Q, MaxRecurse);
+ case Instruction::FMul:
+ return SimplifyFMulInst (LHS, RHS, FastMathFlags(), Q, MaxRecurse);
case Instruction::SDiv: return SimplifySDivInst(LHS, RHS, Q, MaxRecurse);
case Instruction::UDiv: return SimplifyUDivInst(LHS, RHS, Q, MaxRecurse);
case Instruction::FDiv: return SimplifyFDivInst(LHS, RHS, Q, MaxRecurse);