Lines Matching defs:Zext
925 ZExtInst &Zext) {
945 if (In->getType() != Zext.getType())
946 In = Builder.CreateIntCast(In, Zext.getType(), false /*ZExt*/);
948 return replaceInstUsesWith(Zext, In);
959 KnownBits Known = computeKnownBits(Cmp->getOperand(0), 0, &Zext);
963 (Zext.getType()->getScalarSizeInBits() != ShAmt + 1);
965 (Cmp->getOperand(0)->getType() == Zext.getType() ||
979 if (Zext.getType() == In->getType())
980 return replaceInstUsesWith(Zext, In);
982 Value *IntCast = Builder.CreateIntCast(In, Zext.getType(), false);
983 return replaceInstUsesWith(Zext, IntCast);
988 if (Cmp->isEquality() && Zext.getType() == Cmp->getOperand(0)->getType()) {
1000 return replaceInstUsesWith(Zext, And1);
1138 Instruction *InstCombinerImpl::visitZExt(ZExtInst &Zext) {
1141 if (Zext.hasOneUse() && isa<TruncInst>(Zext.user_back()) &&
1142 !isa<Constant>(Zext.getOperand(0)))
1146 if (Instruction *Result = commonCastTransforms(Zext))
1149 Value *Src = Zext.getOperand(0);
1150 Type *SrcTy = Src->getType(), *DestTy = Zext.getType();
1153 if (SrcTy->isIntOrIntVectorTy(1) && Zext.hasNonNeg())
1154 return replaceInstUsesWith(Zext, Constant::getNullValue(Zext.getType()));
1159 canEvaluateZExtd(Src, DestTy, BitsToClear, *this, &Zext)) {
1167 << Zext << '\n');
1174 replaceAllDbgUsesWith(*SrcOp, *Res, Zext, DT);
1184 0, &Zext))
1185 return replaceInstUsesWith(Zext, Res);
1231 return transformZExtICmp(Cmp, Zext);
1261 if (Zext.getFunction() &&
1262 Zext.getFunction()->hasFnAttribute(Attribute::VScaleRange)) {
1264 Zext.getFunction()->getFnAttribute(Attribute::VScaleRange);
1269 return replaceInstUsesWith(Zext, VScale);
1275 if (!Zext.hasNonNeg()) {
1277 if (Zext.hasOneUse() &&
1280 match(Zext.user_back(), m_Shift(m_Value(), m_Specific(&Zext)))) {
1281 Zext.setNonNeg();
1282 return &Zext;
1285 if (isKnownNonNegative(Src, SQ.getWithInstruction(&Zext))) {
1286 Zext.setNonNeg();
1287 return &Zext;