aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/InstCombine/InstCombine.h
diff options
context:
space:
mode:
authorShuxin Yang <shuxin.llvm@gmail.com>2013-01-07 21:39:23 +0000
committerShuxin Yang <shuxin.llvm@gmail.com>2013-01-07 21:39:23 +0000
commitd3ae2866d105f6da6375544eb41aea0dad75a9f2 (patch)
tree657172554ba94af328ded24558b69793423d40fc /lib/Transforms/InstCombine/InstCombine.h
parent2f1bfc4c7937fdf59e2d88e0e23d0657daba79b2 (diff)
downloadexternal_llvm-d3ae2866d105f6da6375544eb41aea0dad75a9f2.zip
external_llvm-d3ae2866d105f6da6375544eb41aea0dad75a9f2.tar.gz
external_llvm-d3ae2866d105f6da6375544eb41aea0dad75a9f2.tar.bz2
This change is to implement following rules:
o. X/C1 * C2 => X * (C2/C1) (if C2/C1 is neither special FP nor denormal) o. X/C1 * C2 -> X/(C1/C2) (if C2/C1 is either specical FP or denormal, but C1/C2 is a normal Fp) Let MDC denote multiplication or dividion with one & only one operand being a constant o. (MDC ± C1) * C2 => (MDC * C2) ± (C1 * C2) (so long as the constant-folding doesn't yield any denormal or special value) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171793 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/InstCombine/InstCombine.h')
-rw-r--r--lib/Transforms/InstCombine/InstCombine.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Transforms/InstCombine/InstCombine.h b/lib/Transforms/InstCombine/InstCombine.h
index 38c6364..959daa2 100644
--- a/lib/Transforms/InstCombine/InstCombine.h
+++ b/lib/Transforms/InstCombine/InstCombine.h
@@ -116,6 +116,8 @@ public:
Instruction *visitSub(BinaryOperator &I);
Instruction *visitFSub(BinaryOperator &I);
Instruction *visitMul(BinaryOperator &I);
+ Value *foldFMulConst(Instruction *FMulOrDiv, ConstantFP *C,
+ Instruction *InsertBefore);
Instruction *visitFMul(BinaryOperator &I);
Instruction *visitURem(BinaryOperator &I);
Instruction *visitSRem(BinaryOperator &I);