Lines Matching defs:Sext
1337 SExtInst &Sext) {
1350 if (In->getType() != Sext.getType())
1351 In = Builder.CreateIntCast(In, Sext.getType(), true /*SExt*/);
1353 return replaceInstUsesWith(Sext, In);
1362 KnownBits Known = computeKnownBits(Op0, 0, &Sext);
1371 ConstantInt::getAllOnesValue(Sext.getType()) :
1372 ConstantInt::getNullValue(Sext.getType());
1373 return replaceInstUsesWith(Sext, V);
1404 if (Sext.getType() == In->getType())
1405 return replaceInstUsesWith(Sext, In);
1406 return CastInst::CreateIntegerCast(In, Sext.getType(), true/*SExt*/);
1469 Instruction *InstCombinerImpl::visitSExt(SExtInst &Sext) {
1472 if (Sext.hasOneUse() && isa<TruncInst>(Sext.user_back()))
1475 if (Instruction *I = commonCastTransforms(Sext))
1478 Value *Src = Sext.getOperand(0);
1479 Type *SrcTy = Src->getType(), *DestTy = Sext.getType();
1484 if (isKnownNonNegative(Src, SQ.getWithInstruction(&Sext))) {
1496 << Sext << '\n');
1502 if (ComputeNumSignBits(Res, 0, &Sext) > DestBitSize - SrcBitSize)
1503 return replaceInstUsesWith(Sext, Res);
1516 if (ComputeNumSignBits(X, 0, &Sext) > XBitSize - SrcBitSize)
1540 return transformSExtICmp(Cmp, Sext);
1571 A = Builder.CreateShl(A, NewShAmt, Sext.getName());
1594 if (Sext.getFunction() &&
1595 Sext.getFunction()->hasFnAttribute(Attribute::VScaleRange)) {
1597 Sext.getFunction()->getFnAttribute(Attribute::VScaleRange);
1601 return replaceInstUsesWith(Sext, VScale);