Lines Matching refs:SrcVal
293 static Value *getStoreValueForLoadHelper(Value *SrcVal, unsigned Offset, in getStoreValueForLoadHelper() argument
296 LLVMContext &Ctx = SrcVal->getType()->getContext(); in getStoreValueForLoadHelper()
301 if (SrcVal->getType()->isPointerTy() && LoadTy->isPointerTy() && in getStoreValueForLoadHelper()
302 cast<PointerType>(SrcVal->getType())->getAddressSpace() == in getStoreValueForLoadHelper()
304 return SrcVal; in getStoreValueForLoadHelper()
308 (DL.getTypeSizeInBits(SrcVal->getType()).getFixedValue() + 7) / 8; in getStoreValueForLoadHelper()
312 if (SrcVal->getType()->isPtrOrPtrVectorTy()) in getStoreValueForLoadHelper()
313 SrcVal = in getStoreValueForLoadHelper()
314 Builder.CreatePtrToInt(SrcVal, DL.getIntPtrType(SrcVal->getType())); in getStoreValueForLoadHelper()
315 if (!SrcVal->getType()->isIntegerTy()) in getStoreValueForLoadHelper()
316 SrcVal = in getStoreValueForLoadHelper()
317 Builder.CreateBitCast(SrcVal, IntegerType::get(Ctx, StoreSize * 8)); in getStoreValueForLoadHelper()
326 SrcVal = Builder.CreateLShr(SrcVal, in getStoreValueForLoadHelper()
327 ConstantInt::get(SrcVal->getType(), ShiftAmt)); in getStoreValueForLoadHelper()
330 SrcVal = Builder.CreateTruncOrBitCast(SrcVal, in getStoreValueForLoadHelper()
332 return SrcVal; in getStoreValueForLoadHelper()
335 Value *getValueForLoad(Value *SrcVal, unsigned Offset, Type *LoadTy, in getValueForLoad() argument
339 unsigned SrcValSize = DL.getTypeStoreSize(SrcVal->getType()).getFixedValue(); in getValueForLoad()
344 SrcVal = getStoreValueForLoadHelper(SrcVal, Offset, LoadTy, Builder, DL); in getValueForLoad()
345 return coerceAvailableValueToLoadType(SrcVal, LoadTy, Builder, DL); in getValueForLoad()
348 Constant *getConstantValueForLoad(Constant *SrcVal, unsigned Offset, in getConstantValueForLoad() argument
351 unsigned SrcValSize = DL.getTypeStoreSize(SrcVal->getType()).getFixedValue(); in getConstantValueForLoad()
355 return ConstantFoldLoadFromConst(SrcVal, LoadTy, APInt(32, Offset), DL); in getConstantValueForLoad()