• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/llvmCore-3425.0.33/lib/VMCore/

Lines Matching defs:C2

869                                               Constant *C1, Constant *C2) {
875 if (isa<UndefValue>(C1) || isa<UndefValue>(C2)) {
878 if (isa<UndefValue>(C1) && isa<UndefValue>(C2))
887 if (isa<UndefValue>(C1) && isa<UndefValue>(C2)) // undef & undef -> undef
894 ((CI = dyn_cast<ConstantInt>(C2)) && CI->getValue()[0]) ||
895 (isa<UndefValue>(C1) && isa<UndefValue>(C2)))
905 if (ConstantInt *CI2 = dyn_cast<ConstantInt>(C2))
911 if (!isa<UndefValue>(C2)) // undef / X -> 0
913 return C2; // X / undef -> undef
915 if (isa<UndefValue>(C1) && isa<UndefValue>(C2)) // undef | undef -> undef
919 if (isa<UndefValue>(C2) && isa<UndefValue>(C1))
924 if (!isa<UndefValue>(C2)) // undef ashr X --> all ones
931 if (isa<UndefValue>(C2) && isa<UndefValue>(C1))
939 if (ConstantInt *CI2 = dyn_cast<ConstantInt>(C2)) {
948 if (CI2->equalsInt(0)) return C2; // X * 0 == 0
967 if (CI2->isZero()) return C2; // X & 0 == 0
1007 return C2; // X | -1 == -1
1027 // ashr (zext C to Ty), C2 -> lshr (zext C, CSA), C2
1030 return ConstantExpr::getLShr(C1, C2);
1034 // If C1 is a ConstantInt and C2 is not, swap the operands.
1036 return ConstantExpr::get(Opcode, C2, C1);
1041 if (ConstantInt *CI2 = dyn_cast<ConstantInt>(C2)) {
1113 if (ConstantFP *CFP2 = dyn_cast<ConstantFP>(C2)) {
1145 ConstantExpr::getExtractElement(C2, ConstantInt::get(Ty, i));
1161 Constant *T = ConstantExpr::get(Opcode, CE1->getOperand(1), C2);
1165 } else if (isa<ConstantExpr>(C2)) {
1166 // If C2 is a constant expr and C1 isn't, flop them around and fold the
1169 return ConstantFoldBinaryInstruction(Opcode, C2, C1);
1177 return ConstantExpr::getXor(C1, C2);
1179 return ConstantExpr::getAnd(C1, C2);
1183 // We can assume that C2 == 0. If it were one the result would be
1188 // We can assume that C2 == 1. If it were zero the result would be
1193 // We can assume that C2 == 1. If it were zero the result would be
1229 static int IdxCompare(Constant *C1, Constant *C2, Type *ElTy) {
1230 if (C1 == C2) return 0;
1234 if (!isa<ConstantInt>(C1) || !isa<ConstantInt>(C2))
1242 if (!C2->getType()->isIntegerTy(64))
1243 C2 = ConstantExpr::getSExt(C2, Type::getInt64Ty(C1->getContext()));
1245 if (C1 == C2) return 0; // They are equal
1255 cast<ConstantInt>(C2)->getSExtValue())
1577 Constant *C1, Constant *C2) {
1593 if (isa<UndefValue>(C1) || isa<UndefValue>(C2)) {
1598 (isa<UndefValue>(C1) && isa<UndefValue>(C2)))
1611 if (const GlobalValue *GV = dyn_cast<GlobalValue>(C2))
1620 } else if (C2->isNullValue()) {
1635 if (isa<ConstantInt>(C2))
1636 return ConstantExpr::getXor(C1, ConstantExpr::getNot(C2));
1637 return ConstantExpr::getXor(ConstantExpr::getNot(C1), C2);
1639 return ConstantExpr::getXor(C1, C2);
1645 if (isa<ConstantInt>(C1) && isa<ConstantInt>(C2)) {
1647 APInt V2 = cast<ConstantInt>(C2)->getValue();
1661 } else if (isa<ConstantFP>(C1) && isa<ConstantFP>(C2)) {
1663 APFloat C2V = cast<ConstantFP>(C2)->getValueAPF();
1714 ConstantExpr::getExtractElement(C2, ConstantInt::get(Ty, i));
1724 switch (evaluateFCmpRelation(C1, C2)) {
1738 case FCmpInst::FCMP_OEQ: // We know that C1 == C2
1743 case FCmpInst::FCMP_OLT: // We know that C1 < C2
1748 case FCmpInst::FCMP_OGT: // We know that C1 > C2
1753 case FCmpInst::FCMP_OLE: // We know that C1 <= C2
1760 case FCmpInst::FCMP_OGE: // We known that C1 >= C2
1767 case FCmpInst::FCMP_ONE: // We know that C1 != C2
1783 switch (evaluateICmpRelation(C1, C2, CmpInst::isSigned(pred))) {
1853 if (ConstantExpr *CE2 = dyn_cast<ConstantExpr>(C2)) {
1870 Constant *C2Inverse = ConstantExpr::getTrunc(C2, CE1Op0->getType());
1871 if (ConstantExpr::getZExt(C2Inverse, C2->getType()) == C2) {
1878 if ((!isa<ConstantExpr>(C1) && isa<ConstantExpr>(C2)) ||
1879 (C1->isNullValue() && !C2->isNullValue())) {
1880 // If C2 is a constant expr and C1 isn't, flip them around and fold the
1882 // Also, if C1 is null and C2 isn't, flip them around.
1884 return ConstantExpr::getICmp(pred, C2, C1);
1968 Constant *C2 = ConstantExpr::getSExtOrBitCast(Combined, Int64Ty);
1969 Combined = ConstantExpr::get(Instruction::Add, C1, C2);