summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-01-30 23:16:15 +0000
committerChris Lattner <sabre@nondot.org>2007-01-30 23:16:15 +0000
commite3eda25641c853972fb1be975a5094b2fa084741 (patch)
treeaf2caa2e6d04e43fa0bb8b82863af6ba9c030f99 /llvm
parent8dbea5454d824734017c8f6866fcac092db1e6fc (diff)
downloadbcm5719-llvm-e3eda25641c853972fb1be975a5094b2fa084741.tar.gz
bcm5719-llvm-e3eda25641c853972fb1be975a5094b2fa084741.zip
pass TD to constant folding apis
llvm-svn: 33674
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Transforms/Scalar/InstructionCombining.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
index dce56c1acb3..fc5b5f18964 100644
--- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -9167,7 +9167,7 @@ static void AddReachableCodeToWorklist(BasicBlock *BB,
}
// ConstantProp instruction if trivially constant.
- if (Constant *C = ConstantFoldInstruction(Inst)) {
+ if (Constant *C = ConstantFoldInstruction(Inst, TD)) {
if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C))
C = OptimizeConstantExpr(CE, TD);
DOUT << "IC: ConstFold to: " << *C << " from: " << *Inst;
@@ -9258,7 +9258,7 @@ bool InstCombiner::runOnFunction(Function &F) {
}
// Instruction isn't dead, see if we can constant propagate it.
- if (Constant *C = ConstantFoldInstruction(I)) {
+ if (Constant *C = ConstantFoldInstruction(I, TD)) {
if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C))
C = OptimizeConstantExpr(CE, TD);
DOUT << "IC: ConstFold to: " << *C << " from: " << *I;
OpenPOWER on IntegriCloud