Lines Matching refs:C2

610                                               Constant *C2) {  in ConstantFoldBinaryInstruction()  argument
618 return C2; in ConstantFoldBinaryInstruction()
619 if (C2 == Identity) in ConstantFoldBinaryInstruction()
623 if (C2 == Identity) in ConstantFoldBinaryInstruction()
628 if (isa<PoisonValue>(C1) || isa<PoisonValue>(C2)) in ConstantFoldBinaryInstruction()
636 (isa<UndefValue>(C1) || isa<UndefValue>(C2)); in ConstantFoldBinaryInstruction()
640 if (isa<UndefValue>(C1) && isa<UndefValue>(C2)) in ConstantFoldBinaryInstruction()
649 if (isa<UndefValue>(C1) && isa<UndefValue>(C2)) // undef & undef -> undef in ConstantFoldBinaryInstruction()
654 if (isa<UndefValue>(C1) && isa<UndefValue>(C2)) in ConstantFoldBinaryInstruction()
658 if (match(C1, m_APInt(CV)) || match(C2, m_APInt(CV))) in ConstantFoldBinaryInstruction()
669 if (match(C2, m_CombineOr(m_Undef(), m_Zero()))) in ConstantFoldBinaryInstruction()
670 return PoisonValue::get(C2->getType()); in ConstantFoldBinaryInstruction()
677 if (match(C2, m_CombineOr(m_Undef(), m_Zero()))) in ConstantFoldBinaryInstruction()
678 return PoisonValue::get(C2->getType()); in ConstantFoldBinaryInstruction()
682 if (isa<UndefValue>(C1) && isa<UndefValue>(C2)) // undef | undef -> undef in ConstantFoldBinaryInstruction()
687 if (isa<UndefValue>(C2)) in ConstantFoldBinaryInstruction()
688 return PoisonValue::get(C2->getType()); in ConstantFoldBinaryInstruction()
693 if (isa<UndefValue>(C2)) in ConstantFoldBinaryInstruction()
694 return PoisonValue::get(C2->getType()); in ConstantFoldBinaryInstruction()
700 if (isa<UndefValue>(C2)) in ConstantFoldBinaryInstruction()
701 return PoisonValue::get(C2->getType()); in ConstantFoldBinaryInstruction()
706 if (match(C1, m_NegZeroFP()) && isa<UndefValue>(C2)) in ConstantFoldBinaryInstruction()
707 return C2; in ConstantFoldBinaryInstruction()
714 if (isa<UndefValue>(C1) && isa<UndefValue>(C2)) in ConstantFoldBinaryInstruction()
733 if (ConstantInt *CI2 = dyn_cast<ConstantInt>(C2)) { in ConstantFoldBinaryInstruction()
737 return C2; // X * 0 == 0 in ConstantFoldBinaryInstruction()
753 return C2; // X & 0 == 0 in ConstantFoldBinaryInstruction()
796 return C2; // X | -1 == -1 in ConstantFoldBinaryInstruction()
803 ? ConstantExpr::get(Opcode, C2, C1) in ConstantFoldBinaryInstruction()
804 : ConstantFoldBinaryInstruction(Opcode, C2, C1); in ConstantFoldBinaryInstruction()
808 if (ConstantInt *CI2 = dyn_cast<ConstantInt>(C2)) { in ConstantFoldBinaryInstruction()
871 if (ConstantFP *CFP2 = dyn_cast<ConstantFP>(C2)) { in ConstantFoldBinaryInstruction()
897 if (Constant *C2Splat = C2->getSplatValue()) { in ConstantFoldBinaryInstruction()
918 Constant *RHS = ConstantExpr::getExtractElement(C2, ExtractIdx); in ConstantFoldBinaryInstruction()
944 Constant *T = ConstantExpr::get(Opcode, CE1->getOperand(1), C2); in ConstantFoldBinaryInstruction()
948 } else if (isa<ConstantExpr>(C2)) { in ConstantFoldBinaryInstruction()
952 return ConstantFoldBinaryInstruction(Opcode, C2, C1); in ConstantFoldBinaryInstruction()
960 return ConstantExpr::getXor(C1, C2); in ConstantFoldBinaryInstruction()
1126 Constant *C1, Constant *C2) { in ConstantFoldCompareInstruction() argument
1142 if (isa<PoisonValue>(C1) || isa<PoisonValue>(C2)) in ConstantFoldCompareInstruction()
1145 if (isa<UndefValue>(C1) || isa<UndefValue>(C2)) { in ConstantFoldCompareInstruction()
1150 if (ICmpInst::isEquality(Predicate) || (isIntegerPredicate && C1 == C2)) in ConstantFoldCompareInstruction()
1163 if (C2->isNullValue()) { in ConstantFoldCompareInstruction()
1178 if (isa<ConstantInt>(C2)) in ConstantFoldCompareInstruction()
1179 return ConstantExpr::getXor(C1, ConstantExpr::getNot(C2)); in ConstantFoldCompareInstruction()
1180 return ConstantExpr::getXor(ConstantExpr::getNot(C1), C2); in ConstantFoldCompareInstruction()
1182 return ConstantExpr::getXor(C1, C2); in ConstantFoldCompareInstruction()
1188 if (isa<ConstantInt>(C1) && isa<ConstantInt>(C2)) { in ConstantFoldCompareInstruction()
1190 const APInt &V2 = cast<ConstantInt>(C2)->getValue(); in ConstantFoldCompareInstruction()
1192 } else if (isa<ConstantFP>(C1) && isa<ConstantFP>(C2)) { in ConstantFoldCompareInstruction()
1194 const APFloat &C2V = cast<ConstantFP>(C2)->getValueAPF(); in ConstantFoldCompareInstruction()
1200 if (Constant *C2Splat = C2->getSplatValue()) in ConstantFoldCompareInstruction()
1220 ConstantExpr::getExtractElement(C2, ConstantInt::get(Ty, I)); in ConstantFoldCompareInstruction()
1232 if (C1 == C2) { in ConstantFoldCompareInstruction()
1242 switch (evaluateICmpRelation(C1, C2)) { in ConstantFoldCompareInstruction()
1327 if ((!isa<ConstantExpr>(C1) && isa<ConstantExpr>(C2)) || in ConstantFoldCompareInstruction()
1328 (C1->isNullValue() && !C2->isNullValue())) { in ConstantFoldCompareInstruction()
1333 return ConstantFoldCompareInstruction(Predicate, C2, C1); in ConstantFoldCompareInstruction()