diff options
author | Chris Lattner <sabre@nondot.org> | 2007-01-30 23:16:15 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-01-30 23:16:15 +0000 |
commit | 0a19ffaf58495b8a1165dd5520a29a3702d62d27 (patch) | |
tree | 5ca40ccddd01f34de7865f431a492e25d4e208be /lib | |
parent | 72d88ae5447a3929c97e88f4c806213847b5d988 (diff) |
pass TD to constant folding apis
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33674 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Transforms/Scalar/InstructionCombining.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index dce56c1acb..fc5b5f1896 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/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; |