Lines Matching refs:Trunc
193 case Instruction::Trunc: in EvaluateInDifferentType()
420 case Instruction::Trunc: in canEvaluateTruncated()
457 static Instruction *foldVecTruncToExtElt(TruncInst &Trunc, InstCombiner &IC) { in foldVecTruncToExtElt() argument
458 Value *TruncOp = Trunc.getOperand(0); in foldVecTruncToExtElt()
459 Type *DestType = Trunc.getType(); in foldVecTruncToExtElt()
496 Instruction *InstCombiner::narrowRotate(TruncInst &Trunc) { in narrowRotate() argument
497 assert((isa<VectorType>(Trunc.getSrcTy()) || in narrowRotate()
498 shouldChangeType(Trunc.getSrcTy(), Trunc.getType())) && in narrowRotate()
503 Type *DestTy = Trunc.getType(); in narrowRotate()
511 if (!match(Trunc.getOperand(0), m_OneUse(m_Or(m_Value(Or0), m_Value(Or1))))) in narrowRotate()
559 unsigned WideWidth = Trunc.getSrcTy()->getScalarSizeInBits(); in narrowRotate()
561 if (!MaskedValueIsZero(ShVal, HiBitMask, 0, &Trunc)) in narrowRotate()
573 Function *F = Intrinsic::getDeclaration(Trunc.getModule(), IID, DestTy); in narrowRotate()
580 Instruction *InstCombiner::narrowBinOp(TruncInst &Trunc) { in narrowBinOp() argument
581 Type *SrcTy = Trunc.getSrcTy(); in narrowBinOp()
582 Type *DestTy = Trunc.getType(); in narrowBinOp()
587 if (!match(Trunc.getOperand(0), m_OneUse(m_BinOp(BinOp)))) in narrowBinOp()
629 if (Instruction *NarrowOr = narrowRotate(Trunc)) in narrowBinOp()
638 static Instruction *shrinkSplatShuffle(TruncInst &Trunc, in shrinkSplatShuffle() argument
640 auto *Shuf = dyn_cast<ShuffleVectorInst>(Trunc.getOperand(0)); in shrinkSplatShuffle()
645 Constant *NarrowUndef = UndefValue::get(Trunc.getType()); in shrinkSplatShuffle()
646 Value *NarrowOp = Builder.CreateTrunc(Shuf->getOperand(0), Trunc.getType()); in shrinkSplatShuffle()
658 static Instruction *shrinkInsertElt(CastInst &Trunc, in shrinkInsertElt() argument
660 Instruction::CastOps Opcode = Trunc.getOpcode(); in shrinkInsertElt()
661 assert((Opcode == Instruction::Trunc || Opcode == Instruction::FPTrunc) && in shrinkInsertElt()
664 auto *InsElt = dyn_cast<InsertElementInst>(Trunc.getOperand(0)); in shrinkInsertElt()
668 Type *DestTy = Trunc.getType(); in shrinkInsertElt()
996 case Instruction::Trunc: // zext(trunc(x)) -> trunc(x) or zext(x) in canEvaluateZExtd()
1168 Value *Trunc = Builder.CreateTrunc(A, CI.getType()); in visitZExt() local
1170 return BinaryOperator::CreateAnd(Trunc, in visitZExt()
1171 ConstantInt::get(Trunc->getType(), in visitZExt()
1325 case Instruction::Trunc: // sext(trunc(x)) -> trunc(x) or sext(x) in canEvaluateSExtd()