Lines Matching refs:ConstantExpr

47   ConstantExpr *Op,      ///< the first cast constant expression  in foldConstantCastPair()
85 return ConstantExpr::getBitCast(ConstantVector::get(V), DestPTy); in FoldBitCast()
125 return ConstantExpr::isDesirableCastOp(opc) in foldMaybeUndesirableCast()
126 ? ConstantExpr::getCast(opc, V, DestTy) in foldMaybeUndesirableCast()
151 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) { in ConstantFoldCastInstruction()
181 Constant *C = ConstantExpr::getExtractElement(V, ConstantInt::get(Ty, i)); in ConstantFoldCastInstruction()
280 Constant *V1Element = ConstantExpr::getExtractElement(V1, in ConstantFoldSelectInstruction()
282 Constant *V2Element = ConstantExpr::getExtractElement(V2, in ConstantFoldSelectInstruction()
326 if (isa<ConstantExpr>(C)) in ConstantFoldSelectInstruction()
369 if (auto *CE = dyn_cast<ConstantExpr>(Val)) { in ConstantFoldExtractElementInstruction()
376 Constant *ScalarOp = ConstantExpr::getExtractElement(Op, Idx); in ConstantFoldExtractElementInstruction()
391 return ConstantExpr::getExtractElement(CE->getOperand(0), CIdx); in ConstantFoldExtractElementInstruction()
444 Constant *C = ConstantExpr::getExtractElement(Val, ConstantInt::get(Ty, i)); in ConstantFoldInsertElementInstruction()
469 ConstantExpr::getExtractElement(V1, ConstantInt::get(Ty, 0)); in ConstantFoldShuffleVectorInstruction()
499 ConstantExpr::getExtractElement(V2, in ConstantFoldShuffleVectorInstruction()
503 InElt = ConstantExpr::getExtractElement(V1, ConstantInt::get(Ty, Elt)); in ConstantFoldShuffleVectorInstruction()
595 Constant *Elt = ConstantExpr::getExtractElement(C, ExtractIdx); in ConstantFoldUnaryInstruction()
615 if (Constant *Identity = ConstantExpr::getBinOpIdentity( in ConstantFoldBinaryInstruction()
621 } else if (Constant *Identity = ConstantExpr::getBinOpIdentity( in ConstantFoldBinaryInstruction()
755 if (ConstantExpr *CE1 = dyn_cast<ConstantExpr>(C1)) { in ConstantFoldBinaryInstruction()
802 return ConstantExpr::isDesirableBinOp(Opcode) in ConstantFoldBinaryInstruction()
803 ? ConstantExpr::get(Opcode, C2, C1) in ConstantFoldBinaryInstruction()
902 ConstantExpr::isDesirableBinOp(Opcode) in ConstantFoldBinaryInstruction()
903 ? ConstantExpr::get(Opcode, C1Splat, C2Splat) in ConstantFoldBinaryInstruction()
917 Constant *LHS = ConstantExpr::getExtractElement(C1, ExtractIdx); in ConstantFoldBinaryInstruction()
918 Constant *RHS = ConstantExpr::getExtractElement(C2, ExtractIdx); in ConstantFoldBinaryInstruction()
924 Constant *Res = ConstantExpr::isDesirableBinOp(Opcode) in ConstantFoldBinaryInstruction()
925 ? ConstantExpr::get(Opcode, LHS, RHS) in ConstantFoldBinaryInstruction()
936 if (ConstantExpr *CE1 = dyn_cast<ConstantExpr>(C1)) { in ConstantFoldBinaryInstruction()
944 Constant *T = ConstantExpr::get(Opcode, CE1->getOperand(1), C2); in ConstantFoldBinaryInstruction()
945 if (!isa<ConstantExpr>(T) || cast<ConstantExpr>(T)->getOpcode() != Opcode) in ConstantFoldBinaryInstruction()
946 return ConstantExpr::get(Opcode, CE1->getOperand(0), T); in ConstantFoldBinaryInstruction()
948 } else if (isa<ConstantExpr>(C2)) { in ConstantFoldBinaryInstruction()
960 return ConstantExpr::getXor(C1, C2); in ConstantFoldBinaryInstruction()
1030 if (isa<ConstantExpr>(V)) in evaluateICmpRelation()
1074 } else if (auto *CE1 = dyn_cast<ConstantExpr>(V1)) { in evaluateICmpRelation()
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()
1218 ConstantExpr::getExtractElement(C1, ConstantInt::get(Ty, I)); in ConstantFoldCompareInstruction()
1220 ConstantExpr::getExtractElement(C2, ConstantInt::get(Ty, I)); in ConstantFoldCompareInstruction()
1327 if ((!isa<ConstantExpr>(C1) && isa<ConstantExpr>(C2)) || in ConstantFoldCompareInstruction()