Lines Matching defs:Tp
217 Constant *getRandomConstant(Type *Tp) {
218 if (Tp->isIntegerTy()) {
220 return ConstantInt::getAllOnesValue(Tp);
221 return ConstantInt::getNullValue(Tp);
222 } else if (Tp->isFloatingPointTy()) {
224 return ConstantFP::getAllOnesValue(Tp);
225 return ConstantFP::getZero(Tp);
227 return UndefValue::get(Tp);
231 Value *getRandomValue(Type *Tp) {
235 if (V->getType() == Tp)
240 if (Tp->isIntegerTy()) {
242 return ConstantInt::getAllOnesValue(Tp);
243 return ConstantInt::getNullValue(Tp);
244 } else if (Tp->isFloatingPointTy()) {
246 return ConstantFP::getAllOnesValue(Tp);
247 return ConstantFP::getZero(Tp);
248 } else if (auto *VTp = dyn_cast<FixedVectorType>(Tp)) {
258 return UndefValue::get(Tp);
469 Type *Tp = pickType();
471 PT->push_back(new AllocaInst(Tp, DL.getAllocaAddrSpace(),