aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/InstructionSimplify.cpp
diff options
context:
space:
mode:
authorManuel Jacob <me@manueljacob.de>2016-01-21 06:31:08 +0000
committerManuel Jacob <me@manueljacob.de>2016-01-21 06:31:08 +0000
commit925d029461972b44eec4a69a61014b7646a52f3b (patch)
tree06257a67b44d52628b587eed58e21ef1b8369611 /llvm/lib/Analysis/InstructionSimplify.cpp
parenta61ca37b6dd94cf956d75356d8d1fe6a81a234ae (diff)
downloadllvm-925d029461972b44eec4a69a61014b7646a52f3b.zip
llvm-925d029461972b44eec4a69a61014b7646a52f3b.tar.gz
llvm-925d029461972b44eec4a69a61014b7646a52f3b.tar.bz2
Introduce ConstantFoldCastOperand function and migrate some callers of ConstantFoldInstOperands to use it. NFC.
Summary: Although this is a slight cleanup on its own, the main motivation is to refactor the constant folding API to ease migration to opaque pointers. This will be follow-up work. Reviewers: eddyb Subscribers: zzheng, dblaikie, llvm-commits Differential Revision: http://reviews.llvm.org/D16380 llvm-svn: 258390
Diffstat (limited to 'llvm/lib/Analysis/InstructionSimplify.cpp')
-rw-r--r--llvm/lib/Analysis/InstructionSimplify.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/InstructionSimplify.cpp b/llvm/lib/Analysis/InstructionSimplify.cpp
index 1f4c329..fc21a14 100644
--- a/llvm/lib/Analysis/InstructionSimplify.cpp
+++ b/llvm/lib/Analysis/InstructionSimplify.cpp
@@ -3639,7 +3639,7 @@ static Value *SimplifyPHINode(PHINode *PN, const Query &Q) {
static Value *SimplifyTruncInst(Value *Op, Type *Ty, const Query &Q, unsigned) {
if (Constant *C = dyn_cast<Constant>(Op))
- return ConstantFoldInstOperands(Instruction::Trunc, Ty, C, Q.DL, Q.TLI);
+ return ConstantFoldCastOperand(Instruction::Trunc, C, Ty, Q.DL);
return nullptr;
}