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())
  102   if (C->isAllOnesValue() && !DestTy->isX86_MMXTy() &&
  106   if (auto *VTy = dyn_cast<VectorType>(C->getType())) {
  117           VectorType::get(IntegerType::get(C->getContext(), FPWidth), NumSrcElts);
  119         C = ConstantExpr::getBitCast(C, SrcIVTy);
  119         C = ConstantExpr::getBitCast(C, SrcIVTy);
  123       if (Constant *CE = foldConstVectorToAPInt(Result, DestTy, C,
  138     return ConstantExpr::getBitCast(C, DestTy);
  142   if (isa<ConstantFP>(C) || isa<ConstantInt>(C)) {
  142   if (isa<ConstantFP>(C) || isa<ConstantInt>(C)) {
  143     Constant *Ops = C; // don't take the address of C!
  148   if (!isa<ConstantDataVector>(C) && !isa<ConstantVector>(C))
  148   if (!isa<ConstantDataVector>(C) && !isa<ConstantVector>(C))
  149     return ConstantExpr::getBitCast(C, DestTy);
  153   unsigned NumSrcElt = C->getType()->getVectorNumElements();
  155     return ConstantExpr::getBitCast(C, DestTy);
  157   Type *SrcEltTy = C->getType()->getVectorElementType();
  174       VectorType::get(IntegerType::get(C->getContext(), FPWidth), NumDstElt);
  176     C = FoldBitCast(C, DestIVTy, DL);
  176     C = FoldBitCast(C, DestIVTy, DL);
  179     return ConstantExpr::getBitCast(C, DestTy);
  187       VectorType::get(IntegerType::get(C->getContext(), FPWidth), NumSrcElt);
  189     C = ConstantExpr::getBitCast(C, SrcIVTy);
  189     C = ConstantExpr::getBitCast(C, SrcIVTy);
  191     if (!isa<ConstantVector>(C) &&  // FIXME: Remove ConstantVector.
  192         !isa<ConstantDataVector>(C))
  193       return C;
  214         Constant *Src = C->getAggregateElement(SrcElt++);
  216           Src = Constant::getNullValue(C->getType()->getVectorElementType());
  220           return ConstantExpr::getBitCast(C, DestTy);
  244     auto *Element = C->getAggregateElement(i);
  247       return ConstantExpr::getBitCast(C, DestTy);
  257       return ConstantExpr::getBitCast(C, DestTy);
  270         IntegerType *DstIntTy = Type::getIntNTy(C->getContext(), DstBitSize);