reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

lib/Analysis/ConstantFolding.cpp
   96   assert(CastInst::castIsValid(Instruction::BitCast, C, DestTy) &&
  100   if (C->isNullValue() && !DestTy->isX86_MMXTy())
  101     return Constant::getNullValue(DestTy);
  102   if (C->isAllOnesValue() && !DestTy->isX86_MMXTy() &&
  103       !DestTy->isPtrOrPtrVectorTy()) // Don't get ones for ptr types!
  104     return Constant::getAllOnesValue(DestTy);
  108     if (isa<IntegerType>(DestTy) || DestTy->isFloatingPointTy()) {
  108     if (isa<IntegerType>(DestTy) || DestTy->isFloatingPointTy()) {
  122       APInt Result(DL.getTypeSizeInBits(DestTy), 0);
  123       if (Constant *CE = foldConstVectorToAPInt(Result, DestTy, C,
  127       if (isa<IntegerType>(DestTy))
  128         return ConstantInt::get(DestTy, Result);
  130       APFloat FP(DestTy->getFltSemantics(), Result);
  131       return ConstantFP::get(DestTy->getContext(), FP);
  136   auto *DestVTy = dyn_cast<VectorType>(DestTy);
  138     return ConstantExpr::getBitCast(C, DestTy);
  144     return FoldBitCast(ConstantVector::get(Ops), DestTy, DL);
  149     return ConstantExpr::getBitCast(C, DestTy);
  155     return ConstantExpr::getBitCast(C, DestTy);
  179     return ConstantExpr::getBitCast(C, DestTy);
  220           return ConstantExpr::getBitCast(C, DestTy);
  247       return ConstantExpr::getBitCast(C, DestTy);
  257       return ConstantExpr::getBitCast(C, DestTy);