diff options
author | Nate Begeman <natebegeman@mac.com> | 2008-07-25 17:56:27 +0000 |
---|---|---|
committer | Nate Begeman <natebegeman@mac.com> | 2008-07-25 17:56:27 +0000 |
commit | ff795a80a35dc99a1971646de11f088e71d0a2c6 (patch) | |
tree | 924c4c62d401f0309aaf00ee3a7c677e8800fdc0 /lib/VMCore/Constants.cpp | |
parent | b5557abcf13a7b375cae683e9ec200d499645d02 (diff) | |
download | external_llvm-ff795a80a35dc99a1971646de11f088e71d0a2c6.zip external_llvm-ff795a80a35dc99a1971646de11f088e71d0a2c6.tar.gz external_llvm-ff795a80a35dc99a1971646de11f088e71d0a2c6.tar.bz2 |
Remove unnecessary implicit argument
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54031 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Constants.cpp')
-rw-r--r-- | lib/VMCore/Constants.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/VMCore/Constants.cpp b/lib/VMCore/Constants.cpp index 4803470..8f62a71 100644 --- a/lib/VMCore/Constants.cpp +++ b/lib/VMCore/Constants.cpp @@ -916,6 +916,8 @@ getWithOperands(const std::vector<Constant*> &Ops) const { return ConstantExpr::getGetElementPtr(Ops[0], &Ops[1], Ops.size()-1); case Instruction::ICmp: case Instruction::FCmp: + case Instruction::VICmp: + case Instruction::VFCmp: return ConstantExpr::getCompare(getPredicate(), Ops[0], Ops[1]); default: assert(getNumOperands() == 2 && "Must be binary operator?"); @@ -2003,8 +2005,8 @@ Constant *ConstantExpr::getTy(const Type *ReqTy, unsigned Opcode, } Constant *ConstantExpr::getCompareTy(unsigned short predicate, - Constant *C1, Constant *C2, - bool isVecCmp) { + Constant *C1, Constant *C2) { + bool isVectorType = C1->getType()->getTypeID() == Type::VectorTyID; switch (predicate) { default: assert(0 && "Invalid CmpInst predicate"); case CmpInst::FCMP_FALSE: case CmpInst::FCMP_OEQ: case CmpInst::FCMP_OGT: @@ -2013,14 +2015,14 @@ Constant *ConstantExpr::getCompareTy(unsigned short predicate, case CmpInst::FCMP_UEQ: case CmpInst::FCMP_UGT: case CmpInst::FCMP_UGE: case CmpInst::FCMP_ULT: case CmpInst::FCMP_ULE: case CmpInst::FCMP_UNE: case CmpInst::FCMP_TRUE: - return isVecCmp ? getVFCmp(predicate, C1, C2) - : getFCmp(predicate, C1, C2); + return isVectorType ? getVFCmp(predicate, C1, C2) + : getFCmp(predicate, C1, C2); case CmpInst::ICMP_EQ: case CmpInst::ICMP_NE: case CmpInst::ICMP_UGT: case CmpInst::ICMP_UGE: case CmpInst::ICMP_ULT: case CmpInst::ICMP_ULE: case CmpInst::ICMP_SGT: case CmpInst::ICMP_SGE: case CmpInst::ICMP_SLT: case CmpInst::ICMP_SLE: - return isVecCmp ? getVICmp(predicate, C1, C2) - : getICmp(predicate, C1, C2); + return isVectorType ? getVICmp(predicate, C1, C2) + : getICmp(predicate, C1, C2); } } |