summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-11-09 23:28:39 +0000
committerChris Lattner <sabre@nondot.org>2009-11-09 23:28:39 +0000
commitc1f19071f8631fe617a5e1a6ac07670db5c31008 (patch)
tree19e4f6e6614783e5d80e30539dfe756420ced88a /llvm/lib/Transforms/Scalar
parent60198df2626f89310827085c45625b2af58f904d (diff)
downloadbcm5719-llvm-c1f19071f8631fe617a5e1a6ac07670db5c31008.tar.gz
bcm5719-llvm-c1f19071f8631fe617a5e1a6ac07670db5c31008.zip
rename SimplifyCompare -> SimplifyCmpInst and split it into
Simplify[IF]Cmp pieces. Add some predicates to CmpInst to determine whether a predicate is fp or int. llvm-svn: 86624
Diffstat (limited to 'llvm/lib/Transforms/Scalar')
-rw-r--r--llvm/lib/Transforms/Scalar/InstructionCombining.cpp1
-rw-r--r--llvm/lib/Transforms/Scalar/JumpThreading.cpp2
2 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
index 52b9b0438f3..59293be4c67 100644
--- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -42,6 +42,7 @@
#include "llvm/GlobalVariable.h"
#include "llvm/Operator.h"
#include "llvm/Analysis/ConstantFolding.h"
+#include "llvm/Analysis/InstructionSimplify.h"
#include "llvm/Analysis/MemoryBuiltins.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/Target/TargetData.h"
diff --git a/llvm/lib/Transforms/Scalar/JumpThreading.cpp b/llvm/lib/Transforms/Scalar/JumpThreading.cpp
index 790aaf5db38..7eaae9b36f1 100644
--- a/llvm/lib/Transforms/Scalar/JumpThreading.cpp
+++ b/llvm/lib/Transforms/Scalar/JumpThreading.cpp
@@ -354,7 +354,7 @@ ComputeValueKnownInPredecessors(Value *V, BasicBlock *BB,PredValueInfo &Result){
Value *LHS = PN->getIncomingValue(i);
Value *RHS = Cmp->getOperand(1)->DoPHITranslation(BB, PredBB);
- Value *Res = SimplifyCompare(Cmp->getPredicate(), LHS, RHS);
+ Value *Res = SimplifyCmpInst(Cmp->getPredicate(), LHS, RHS);
if (Res == 0) continue;
if (isa<UndefValue>(Res))
OpenPOWER on IntegriCloud