aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ExecutionEngine
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
commit79e038a16d644868bd8d6e230b451c4cb8f8ff93 (patch)
treef400c6ebeb747939216df71863fa8c66e9249645 /lib/ExecutionEngine
parenta099b6c7bb574f22bc002e0b3c65c25abccca1d5 (diff)
downloadexternal_llvm-79e038a16d644868bd8d6e230b451c4cb8f8ff93.zip
external_llvm-79e038a16d644868bd8d6e230b451c4cb8f8ff93.tar.gz
external_llvm-79e038a16d644868bd8d6e230b451c4cb8f8ff93.tar.bz2
eliminate redundant conditions from the signless types conversion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40927 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine')
-rw-r--r--lib/ExecutionEngine/JIT/JIT.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/ExecutionEngine/JIT/JIT.cpp b/lib/ExecutionEngine/JIT/JIT.cpp
index d6b080e..57ae15e 100644
--- a/lib/ExecutionEngine/JIT/JIT.cpp
+++ b/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()));