summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/InstructionSimplify.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-11-09 23:06:58 +0000
committerChris Lattner <sabre@nondot.org>2009-11-09 23:06:58 +0000
commitcdfb80de1619a424efbd61b7ded35ee2b870d189 (patch)
treec7d7f7521bf5c580e400a94a13abfbf8a28453c6 /llvm/lib/Analysis/InstructionSimplify.cpp
parent3f94a132ddb536857b7bda67c26d0326a26738c3 (diff)
downloadbcm5719-llvm-cdfb80de1619a424efbd61b7ded35ee2b870d189.tar.gz
bcm5719-llvm-cdfb80de1619a424efbd61b7ded35ee2b870d189.zip
fix ConstantFoldCompareInstOperands to take the LHS/RHS as
individual operands instead of taking a temporary array llvm-svn: 86619
Diffstat (limited to 'llvm/lib/Analysis/InstructionSimplify.cpp')
-rw-r--r--llvm/lib/Analysis/InstructionSimplify.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Analysis/InstructionSimplify.cpp b/llvm/lib/Analysis/InstructionSimplify.cpp
index 692236a0f22..03bc9a01ce9 100644
--- a/llvm/lib/Analysis/InstructionSimplify.cpp
+++ b/llvm/lib/Analysis/InstructionSimplify.cpp
@@ -39,10 +39,8 @@ Value *llvm::SimplifyCompare(unsigned Predicate, Value *LHS, Value *RHS,
CmpInst::Predicate Pred = (CmpInst::Predicate)Predicate;
if (Constant *CLHS = dyn_cast<Constant>(LHS))
- if (Constant *CRHS = dyn_cast<Constant>(RHS)) {
- Constant *COps[] = {CLHS, CRHS};
- return ConstantFoldCompareInstOperands(Pred, COps, 2, TD);
- }
+ if (Constant *CRHS = dyn_cast<Constant>(RHS))
+ return ConstantFoldCompareInstOperands(Pred, CLHS, CRHS, TD);
// If this is an integer compare and the LHS and RHS are the same, fold it.
if (LHS == RHS)
OpenPOWER on IntegriCloud