summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-08-08 16:19:57 +0000
committerChris Lattner <sabre@nondot.org>2007-08-08 16:19:57 +0000
commitd1fd0db2ae2a9144de219935f87f1484b169c826 (patch)
tree8c44643cc08cc4c9be840bbae23dad1ce22cd777 /llvm/lib
parent7574ef3ac4a66f9e79a631c8fce43d9d61027794 (diff)
downloadbcm5719-llvm-d1fd0db2ae2a9144de219935f87f1484b169c826.tar.gz
bcm5719-llvm-d1fd0db2ae2a9144de219935f87f1484b169c826.zip
eliminate redundant conditions from the signless types conversion.
llvm-svn: 40927
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/ExecutionEngine/JIT/JIT.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/llvm/lib/ExecutionEngine/JIT/JIT.cpp b/llvm/lib/ExecutionEngine/JIT/JIT.cpp
index d6b080e1a57..57ae15e7fe9 100644
--- a/llvm/lib/ExecutionEngine/JIT/JIT.cpp
+++ b/llvm/lib/ExecutionEngine/JIT/JIT.cpp
@@ -107,11 +107,10 @@ GenericValue JIT::runFunction(Function *F,
// Handle some common cases first. These cases correspond to common `main'
// prototypes.
- if (RetTy == Type::Int32Ty || RetTy == Type::Int32Ty || RetTy == Type::VoidTy) {
+ if (RetTy == Type::Int32Ty || RetTy == Type::VoidTy) {
switch (ArgValues.size()) {
case 3:
- if ((FTy->getParamType(0) == Type::Int32Ty ||
- FTy->getParamType(0) == Type::Int32Ty) &&
+ if (FTy->getParamType(0) == Type::Int32Ty &&
isa<PointerType>(FTy->getParamType(1)) &&
isa<PointerType>(FTy->getParamType(2))) {
int (*PF)(int, char **, const char **) =
@@ -126,8 +125,7 @@ GenericValue JIT::runFunction(Function *F,
}
break;
case 2:
- if ((FTy->getParamType(0) == Type::Int32Ty ||
- FTy->getParamType(0) == Type::Int32Ty) &&
+ if (FTy->getParamType(0) == Type::Int32Ty &&
isa<PointerType>(FTy->getParamType(1))) {
int (*PF)(int, char **) = (int(*)(int, char **))(intptr_t)FPtr;
@@ -140,8 +138,7 @@ GenericValue JIT::runFunction(Function *F,
break;
case 1:
if (FTy->getNumParams() == 1 &&
- (FTy->getParamType(0) == Type::Int32Ty ||
- FTy->getParamType(0) == Type::Int32Ty)) {
+ FTy->getParamType(0) == Type::Int32Ty) {
GenericValue rv;
int (*PF)(int) = (int(*)(int))(intptr_t)FPtr;
rv.IntVal = APInt(32, PF(ArgValues[0].IntVal.getZExtValue()));
OpenPOWER on IntegriCloud