Lines Matching refs:Trunc

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