Lines Matching refs:get
85 return ConstantExpr::getBitCast(ConstantVector::get(V), DestPTy); in FoldBitCast()
93 return ConstantFP::get(DestTy->getContext(), in FoldBitCast()
116 return ConstantInt::get(FP->getContext(), in FoldBitCast()
133 return PoisonValue::get(DestTy); in ConstantFoldCastInstruction()
142 return UndefValue::get(DestTy); in ConstantFoldCastInstruction()
177 Type *Ty = IntegerType::get(V->getContext(), 32); in ConstantFoldCastInstruction()
181 Constant *C = ConstantExpr::getExtractElement(V, ConstantInt::get(Ty, i)); in ConstantFoldCastInstruction()
187 return ConstantVector::get(res); in ConstantFoldCastInstruction()
202 return ConstantFP::get(V->getContext(), Val); in ConstantFoldCastInstruction()
216 return PoisonValue::get(DestTy); in ConstantFoldCastInstruction()
218 return ConstantInt::get(FPC->getContext(), IntVal); in ConstantFoldCastInstruction()
229 return ConstantFP::get(V->getContext(), apf); in ConstantFoldCastInstruction()
235 return ConstantInt::get(V->getContext(), in ConstantFoldCastInstruction()
242 return ConstantInt::get(V->getContext(), in ConstantFoldCastInstruction()
252 return ConstantInt::get(V->getContext(), in ConstantFoldCastInstruction()
277 Type *Ty = IntegerType::get(CondV->getContext(), 32); in ConstantFoldSelectInstruction()
281 ConstantInt::get(Ty, i)); in ConstantFoldSelectInstruction()
283 ConstantInt::get(Ty, i)); in ConstantFoldSelectInstruction()
286 V = PoisonValue::get(V1Element->getType()); in ConstantFoldSelectInstruction()
300 return ConstantVector::get(Result); in ConstantFoldSelectInstruction()
304 return PoisonValue::get(V1->getType()); in ConstantFoldSelectInstruction()
352 return PoisonValue::get(ValVTy->getElementType()); in ConstantFoldExtractElementInstruction()
356 return UndefValue::get(ValVTy->getElementType()); in ConstantFoldExtractElementInstruction()
365 return PoisonValue::get(ValFVTy->getElementType()); in ConstantFoldExtractElementInstruction()
413 return PoisonValue::get(Val->getType()); in ConstantFoldInsertElementInstruction()
432 return PoisonValue::get(Val->getType()); in ConstantFoldInsertElementInstruction()
444 Constant *C = ConstantExpr::getExtractElement(Val, ConstantInt::get(Ty, i)); in ConstantFoldInsertElementInstruction()
448 return ConstantVector::get(Result); in ConstantFoldInsertElementInstruction()
456 ElementCount::get(MaskNumElts, isa<ScalableVectorType>(V1VTy)); in ConstantFoldShuffleVectorInstruction()
461 return PoisonValue::get(VectorType::get(EltTy, MaskEltCount)); in ConstantFoldShuffleVectorInstruction()
467 Type *Ty = IntegerType::get(V1->getContext(), 32); in ConstantFoldShuffleVectorInstruction()
469 ConstantExpr::getExtractElement(V1, ConstantInt::get(Ty, 0)); in ConstantFoldShuffleVectorInstruction()
472 auto *VTy = VectorType::get(EltTy, MaskEltCount); in ConstantFoldShuffleVectorInstruction()
473 return ConstantAggregateZero::get(VTy); in ConstantFoldShuffleVectorInstruction()
490 Result.push_back(UndefValue::get(EltTy)); in ConstantFoldShuffleVectorInstruction()
495 InElt = UndefValue::get(EltTy); in ConstantFoldShuffleVectorInstruction()
497 Type *Ty = IntegerType::get(V2->getContext(), 32); in ConstantFoldShuffleVectorInstruction()
500 ConstantInt::get(Ty, Elt - SrcNumElts)); in ConstantFoldShuffleVectorInstruction()
502 Type *Ty = IntegerType::get(V1->getContext(), 32); in ConstantFoldShuffleVectorInstruction()
503 InElt = ConstantExpr::getExtractElement(V1, ConstantInt::get(Ty, Elt)); in ConstantFoldShuffleVectorInstruction()
508 return ConstantVector::get(Result); in ConstantFoldShuffleVectorInstruction()
548 return ConstantStruct::get(ST, Result); in ConstantFoldInsertValueInstruction()
549 return ConstantArray::get(cast<ArrayType>(Agg->getType()), Result); in ConstantFoldInsertValueInstruction()
581 return ConstantFP::get(C->getContext(), neg(CV)); in ConstantFoldUnaryInstruction()
585 Type *Ty = IntegerType::get(VTy->getContext(), 32); in ConstantFoldUnaryInstruction()
594 Constant *ExtractIdx = ConstantInt::get(Ty, i); in ConstantFoldUnaryInstruction()
602 return ConstantVector::get(Result); in ConstantFoldUnaryInstruction()
629 return PoisonValue::get(C1->getType()); in ConstantFoldBinaryInstruction()
647 return UndefValue::get(C1->getType()); in ConstantFoldBinaryInstruction()
660 return UndefValue::get(C1->getType()); in ConstantFoldBinaryInstruction()
670 return PoisonValue::get(C2->getType()); in ConstantFoldBinaryInstruction()
678 return PoisonValue::get(C2->getType()); in ConstantFoldBinaryInstruction()
688 return PoisonValue::get(C2->getType()); in ConstantFoldBinaryInstruction()
694 return PoisonValue::get(C2->getType()); in ConstantFoldBinaryInstruction()
701 return PoisonValue::get(C2->getType()); in ConstantFoldBinaryInstruction()
742 return PoisonValue::get(CI2->getType()); // X / 0 == poison in ConstantFoldBinaryInstruction()
749 return PoisonValue::get(CI2->getType()); // X % 0 == poison in ConstantFoldBinaryInstruction()
803 ? ConstantExpr::get(Opcode, C2, C1) in ConstantFoldBinaryInstruction()
815 return ConstantInt::get(CI1->getContext(), C1V + C2V); in ConstantFoldBinaryInstruction()
817 return ConstantInt::get(CI1->getContext(), C1V - C2V); in ConstantFoldBinaryInstruction()
819 return ConstantInt::get(CI1->getContext(), C1V * C2V); in ConstantFoldBinaryInstruction()
822 return ConstantInt::get(CI1->getContext(), C1V.udiv(C2V)); in ConstantFoldBinaryInstruction()
826 return PoisonValue::get(CI1->getType()); // MIN_INT / -1 -> poison in ConstantFoldBinaryInstruction()
827 return ConstantInt::get(CI1->getContext(), C1V.sdiv(C2V)); in ConstantFoldBinaryInstruction()
830 return ConstantInt::get(CI1->getContext(), C1V.urem(C2V)); in ConstantFoldBinaryInstruction()
834 return PoisonValue::get(CI1->getType()); // MIN_INT % -1 -> poison in ConstantFoldBinaryInstruction()
835 return ConstantInt::get(CI1->getContext(), C1V.srem(C2V)); in ConstantFoldBinaryInstruction()
837 return ConstantInt::get(CI1->getContext(), C1V & C2V); in ConstantFoldBinaryInstruction()
839 return ConstantInt::get(CI1->getContext(), C1V | C2V); in ConstantFoldBinaryInstruction()
841 return ConstantInt::get(CI1->getContext(), C1V ^ C2V); in ConstantFoldBinaryInstruction()
844 return ConstantInt::get(CI1->getContext(), C1V.shl(C2V)); in ConstantFoldBinaryInstruction()
845 return PoisonValue::get(C1->getType()); // too big shift is poison in ConstantFoldBinaryInstruction()
848 return ConstantInt::get(CI1->getContext(), C1V.lshr(C2V)); in ConstantFoldBinaryInstruction()
849 return PoisonValue::get(C1->getType()); // too big shift is poison in ConstantFoldBinaryInstruction()
852 return ConstantInt::get(CI1->getContext(), C1V.ashr(C2V)); in ConstantFoldBinaryInstruction()
853 return PoisonValue::get(C1->getType()); // too big shift is poison in ConstantFoldBinaryInstruction()
880 return ConstantFP::get(C1->getContext(), C3V); in ConstantFoldBinaryInstruction()
883 return ConstantFP::get(C1->getContext(), C3V); in ConstantFoldBinaryInstruction()
886 return ConstantFP::get(C1->getContext(), C3V); in ConstantFoldBinaryInstruction()
889 return ConstantFP::get(C1->getContext(), C3V); in ConstantFoldBinaryInstruction()
892 return ConstantFP::get(C1->getContext(), C3V); in ConstantFoldBinaryInstruction()
899 return PoisonValue::get(VTy); in ConstantFoldBinaryInstruction()
903 ? ConstantExpr::get(Opcode, C1Splat, C2Splat) in ConstantFoldBinaryInstruction()
914 Type *Ty = IntegerType::get(FVTy->getContext(), 32); in ConstantFoldBinaryInstruction()
916 Constant *ExtractIdx = ConstantInt::get(Ty, i); in ConstantFoldBinaryInstruction()
922 return PoisonValue::get(VTy); in ConstantFoldBinaryInstruction()
925 ? ConstantExpr::get(Opcode, LHS, RHS) in ConstantFoldBinaryInstruction()
932 return ConstantVector::get(Result); in ConstantFoldBinaryInstruction()
944 Constant *T = ConstantExpr::get(Opcode, CE1->getOperand(1), C2); in ConstantFoldBinaryInstruction()
946 return ConstantExpr::get(Opcode, CE1->getOperand(0), T); in ConstantFoldBinaryInstruction()
1129 ResultTy = VectorType::get(Type::getInt1Ty(C1->getContext()), in ConstantFoldCompareInstruction()
1143 return PoisonValue::get(ResultTy); in ConstantFoldCompareInstruction()
1151 return UndefValue::get(ResultTy); in ConstantFoldCompareInstruction()
1156 return ConstantInt::get(ResultTy, CmpInst::isTrueWhenEqual(Predicate)); in ConstantFoldCompareInstruction()
1160 return ConstantInt::get(ResultTy, CmpInst::isUnordered(Predicate)); in ConstantFoldCompareInstruction()
1191 return ConstantInt::get(ResultTy, ICmpInst::compare(V1, V2, Predicate)); in ConstantFoldCompareInstruction()
1195 return ConstantInt::get(ResultTy, FCmpInst::compare(C1V, C2V, Predicate)); in ConstantFoldCompareInstruction()
1213 Type *Ty = IntegerType::get(C1->getContext(), 32); in ConstantFoldCompareInstruction()
1218 ConstantExpr::getExtractElement(C1, ConstantInt::get(Ty, I)); in ConstantFoldCompareInstruction()
1220 ConstantExpr::getExtractElement(C2, ConstantInt::get(Ty, I)); in ConstantFoldCompareInstruction()
1228 return ConstantVector::get(ResElts); in ConstantFoldCompareInstruction()
1325 return ConstantInt::get(ResultTy, Result); in ConstantFoldCompareInstruction()
1348 return PoisonValue::get(GEPTy); in ConstantFoldGetElementPtr()
1351 return UndefValue::get(GEPTy); in ConstantFoldGetElementPtr()