• Home
  • Raw
  • Download

Lines Matching refs:LHSI

1539                                                           Instruction *LHSI,  in visitICmpInstWithInstAndIntCst()  argument
1543 switch (LHSI->getOpcode()) { in visitICmpInstWithInstAndIntCst()
1549 match(LHSI->getOperand(0), m_Signum(m_Value(V)))) in visitICmpInstWithInstAndIntCst()
1553 if (ICI.isEquality() && LHSI->hasOneUse()) { in visitICmpInstWithInstAndIntCst()
1556 unsigned DstBits = LHSI->getType()->getPrimitiveSizeInBits(), in visitICmpInstWithInstAndIntCst()
1557 SrcBits = LHSI->getOperand(0)->getType()->getPrimitiveSizeInBits(); in visitICmpInstWithInstAndIntCst()
1559 computeKnownBits(LHSI->getOperand(0), KnownZero, KnownOne, 0, &ICI); in visitICmpInstWithInstAndIntCst()
1566 return new ICmpInst(ICI.getPredicate(), LHSI->getOperand(0), in visitICmpInstWithInstAndIntCst()
1573 if (ConstantInt *XorCst = dyn_cast<ConstantInt>(LHSI->getOperand(1))) { in visitICmpInstWithInstAndIntCst()
1578 Value *CompareVal = LHSI->getOperand(0); in visitICmpInstWithInstAndIntCst()
1584 Worklist.Add(LHSI); in visitICmpInstWithInstAndIntCst()
1602 if (LHSI->hasOneUse()) { in visitICmpInstWithInstAndIntCst()
1609 return new ICmpInst(Pred, LHSI->getOperand(0), in visitICmpInstWithInstAndIntCst()
1620 return new ICmpInst(Pred, LHSI->getOperand(0), in visitICmpInstWithInstAndIntCst()
1629 return new ICmpInst(ICmpInst::ICMP_ULT, LHSI->getOperand(0), XorCst); in visitICmpInstWithInstAndIntCst()
1635 return new ICmpInst(ICmpInst::ICMP_UGE, LHSI->getOperand(0), XorCst); in visitICmpInstWithInstAndIntCst()
1639 if (LHSI->hasOneUse() && isa<ConstantInt>(LHSI->getOperand(1)) && in visitICmpInstWithInstAndIntCst()
1640 LHSI->getOperand(0)->hasOneUse()) { in visitICmpInstWithInstAndIntCst()
1641 ConstantInt *AndCst = cast<ConstantInt>(LHSI->getOperand(1)); in visitICmpInstWithInstAndIntCst()
1646 if (TruncInst *Cast = dyn_cast<TruncInst>(LHSI->getOperand(0))) { in visitICmpInstWithInstAndIntCst()
1656 NewAnd->takeName(LHSI); in visitICmpInstWithInstAndIntCst()
1664 if (ZExtInst *Cast = dyn_cast<ZExtInst>(LHSI->getOperand(0))) { in visitICmpInstWithInstAndIntCst()
1672 NewAnd->takeName(LHSI); in visitICmpInstWithInstAndIntCst()
1682 BinaryOperator *Shift = dyn_cast<BinaryOperator>(LHSI->getOperand(0)); in visitICmpInstWithInstAndIntCst()
1750 LHSI->setOperand(1, NewAndCst); in visitICmpInstWithInstAndIntCst()
1751 LHSI->setOperand(0, Shift->getOperand(0)); in visitICmpInstWithInstAndIntCst()
1775 Builder->CreateAnd(Shift->getOperand(0), NS, LHSI->getName()); in visitICmpInstWithInstAndIntCst()
1788 if (match(LHSI->getOperand(1), m_One())) { in visitICmpInstWithInstAndIntCst()
1789 Constant *One = cast<Constant>(LHSI->getOperand(1)); in visitICmpInstWithInstAndIntCst()
1790 Value *Or = LHSI->getOperand(0); in visitICmpInstWithInstAndIntCst()
1794 if (LHSI->hasOneUse()) in visitICmpInstWithInstAndIntCst()
1814 Value *NewAnd = Builder->CreateAnd(X, NewOr, LHSI->getName()); in visitICmpInstWithInstAndIntCst()
1829 return new ICmpInst(ICmpInst::ICMP_NE, LHSI, in visitICmpInstWithInstAndIntCst()
1835 if (LoadInst *LI = dyn_cast<LoadInst>(LHSI->getOperand(0))) { in visitICmpInstWithInstAndIntCst()
1840 !LI->isVolatile() && isa<ConstantInt>(LHSI->getOperand(1))) { in visitICmpInstWithInstAndIntCst()
1841 ConstantInt *C = cast<ConstantInt>(LHSI->getOperand(1)); in visitICmpInstWithInstAndIntCst()
1850 if (ICI.isEquality() && RHS == LHSI->getOperand(1) && (-RHSV).isPowerOf2()) in visitICmpInstWithInstAndIntCst()
1854 LHSI->getOperand(0), SubOne(RHS)); in visitICmpInstWithInstAndIntCst()
1858 if (ICI.isEquality() && LHSI->hasOneUse() && match(RHS, m_Zero())) { in visitICmpInstWithInstAndIntCst()
1859 if (auto *CI = dyn_cast<ConstantInt>(LHSI->getOperand(1))) { in visitICmpInstWithInstAndIntCst()
1864 Value *Trunc = Builder->CreateTrunc(LHSI->getOperand(0), NTy); in visitICmpInstWithInstAndIntCst()
1879 match(LHSI, m_Signum(m_Value(V)))) in visitICmpInstWithInstAndIntCst()
1884 if (!ICI.isEquality() || !RHS->isNullValue() || !LHSI->hasOneUse()) in visitICmpInstWithInstAndIntCst()
1887 if (match(LHSI, m_Or(m_PtrToInt(m_Value(P)), m_PtrToInt(m_Value(Q))))) { in visitICmpInstWithInstAndIntCst()
1905 ConstantInt *Val = dyn_cast<ConstantInt>(LHSI->getOperand(1)); in visitICmpInstWithInstAndIntCst()
1912 cast<BinaryOperator>(LHSI)->hasNoSignedWrap()) in visitICmpInstWithInstAndIntCst()
1915 LHSI->getOperand(0), in visitICmpInstWithInstAndIntCst()
1923 ConstantInt *ShAmt = dyn_cast<ConstantInt>(LHSI->getOperand(1)); in visitICmpInstWithInstAndIntCst()
1927 if (match(LHSI, m_Shl(m_One(), m_Value(X)))) { in visitICmpInstWithInstAndIntCst()
2007 if (cast<BinaryOperator>(LHSI)->hasNoUnsignedWrap()) in visitICmpInstWithInstAndIntCst()
2008 return new ICmpInst(ICI.getPredicate(), LHSI->getOperand(0), in visitICmpInstWithInstAndIntCst()
2013 if (cast<BinaryOperator>(LHSI)->hasNoSignedWrap() && RHSV == 0) in visitICmpInstWithInstAndIntCst()
2014 return new ICmpInst(ICI.getPredicate(), LHSI->getOperand(0), in visitICmpInstWithInstAndIntCst()
2017 if (LHSI->hasOneUse()) { in visitICmpInstWithInstAndIntCst()
2024 Builder->CreateAnd(LHSI->getOperand(0),Mask, LHSI->getName()+".mask"); in visitICmpInstWithInstAndIntCst()
2034 cast<BinaryOperator>(LHSI)->hasNoSignedWrap()) in visitICmpInstWithInstAndIntCst()
2036 LHSI->getOperand(0), in visitICmpInstWithInstAndIntCst()
2041 if (LHSI->hasOneUse() && in visitICmpInstWithInstAndIntCst()
2044 Constant *Mask = ConstantInt::get(LHSI->getOperand(0)->getType(), in visitICmpInstWithInstAndIntCst()
2048 Builder->CreateAnd(LHSI->getOperand(0), Mask, LHSI->getName()+".mask"); in visitICmpInstWithInstAndIntCst()
2060 if (LHSI->hasOneUse() && in visitICmpInstWithInstAndIntCst()
2068 Builder->CreateTrunc(LHSI->getOperand(0), NTy), in visitICmpInstWithInstAndIntCst()
2078 BinaryOperator *BO = cast<BinaryOperator>(LHSI); in visitICmpInstWithInstAndIntCst()
2079 if (ConstantInt *ShAmt = dyn_cast<ConstantInt>(LHSI->getOperand(1))) { in visitICmpInstWithInstAndIntCst()
2093 if (ConstantInt *DivLHS = dyn_cast<ConstantInt>(LHSI->getOperand(0))) { in visitICmpInstWithInstAndIntCst()
2094 Value *X = LHSI->getOperand(1); in visitICmpInstWithInstAndIntCst()
2120 if (ConstantInt *DivRHS = dyn_cast<ConstantInt>(LHSI->getOperand(1))) in visitICmpInstWithInstAndIntCst()
2121 if (Instruction *R = FoldICmpDivCst(ICI, cast<BinaryOperator>(LHSI), in visitICmpInstWithInstAndIntCst()
2127 ConstantInt *LHSC = dyn_cast<ConstantInt>(LHSI->getOperand(0)); in visitICmpInstWithInstAndIntCst()
2134 if (ICI.getPredicate() == ICmpInst::ICMP_ULT && LHSI->hasOneUse() && in visitICmpInstWithInstAndIntCst()
2137 Builder->CreateOr(LHSI->getOperand(1), RHSV - 1), in visitICmpInstWithInstAndIntCst()
2143 if (ICI.getPredicate() == ICmpInst::ICMP_UGT && LHSI->hasOneUse() && in visitICmpInstWithInstAndIntCst()
2146 Builder->CreateOr(LHSI->getOperand(1), RHSV), LHSC); in visitICmpInstWithInstAndIntCst()
2153 ConstantInt *LHSC = dyn_cast<ConstantInt>(LHSI->getOperand(1)); in visitICmpInstWithInstAndIntCst()
2162 return new ICmpInst(ICmpInst::ICMP_SLT, LHSI->getOperand(0), in visitICmpInstWithInstAndIntCst()
2165 return new ICmpInst(ICmpInst::ICMP_SGE, LHSI->getOperand(0), in visitICmpInstWithInstAndIntCst()
2170 return new ICmpInst(ICmpInst::ICMP_ULT, LHSI->getOperand(0), in visitICmpInstWithInstAndIntCst()
2173 return new ICmpInst(ICmpInst::ICMP_UGE, LHSI->getOperand(0), in visitICmpInstWithInstAndIntCst()
2181 if (ICI.getPredicate() == ICmpInst::ICMP_ULT && LHSI->hasOneUse() && in visitICmpInstWithInstAndIntCst()
2184 Builder->CreateAnd(LHSI->getOperand(0), -RHSV), in visitICmpInstWithInstAndIntCst()
2190 if (ICI.getPredicate() == ICmpInst::ICMP_UGT && LHSI->hasOneUse() && in visitICmpInstWithInstAndIntCst()
2193 Builder->CreateAnd(LHSI->getOperand(0), ~RHSV), in visitICmpInstWithInstAndIntCst()
2205 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(LHSI)) { in visitICmpInstWithInstAndIntCst()
2298 ICmpInst::ICMP_NE, LHSI, in visitICmpInstWithInstAndIntCst()
2338 } else if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(LHSI)) { in visitICmpInstWithInstAndIntCst()
3624 if (Instruction *LHSI = dyn_cast<Instruction>(Op0)) in visitICmpInst() local
3625 if (Instruction *Res = visitICmpInstWithInstAndIntCst(I, LHSI, CI)) in visitICmpInst()
3640 if (Instruction *LHSI = dyn_cast<Instruction>(Op0)) in visitICmpInst() local
3641 switch (LHSI->getOpcode()) { in visitICmpInst()
3645 cast<GetElementPtrInst>(LHSI)->hasAllZeroIndices()) in visitICmpInst()
3646 return new ICmpInst(I.getPredicate(), LHSI->getOperand(0), in visitICmpInst()
3647 Constant::getNullValue(LHSI->getOperand(0)->getType())); in visitICmpInst()
3653 if (LHSI->getParent() == I.getParent()) in visitICmpInst()
3663 if (Constant *C = dyn_cast<Constant>(LHSI->getOperand(1))) { in visitICmpInst()
3667 if (Constant *C = dyn_cast<Constant>(LHSI->getOperand(2))) { in visitICmpInst()
3684 if (LHSI->hasOneUse()) in visitICmpInst()
3691 Transform = replacedSelectWithOperand(cast<SelectInst>(LHSI), &I, in visitICmpInst()
3696 Op1 = Builder->CreateICmp(I.getPredicate(), LHSI->getOperand(1), in visitICmpInst()
3699 Op2 = Builder->CreateICmp(I.getPredicate(), LHSI->getOperand(2), in visitICmpInst()
3701 return SelectInst::Create(LHSI->getOperand(0), Op1, Op2); in visitICmpInst()
3708 DL.getIntPtrType(RHSC->getType()) == LHSI->getOperand(0)->getType()) in visitICmpInst()
3709 return new ICmpInst(I.getPredicate(), LHSI->getOperand(0), in visitICmpInst()
3710 Constant::getNullValue(LHSI->getOperand(0)->getType())); in visitICmpInst()
3716 dyn_cast<GetElementPtrInst>(LHSI->getOperand(0))) { in visitICmpInst()
3719 !cast<LoadInst>(LHSI)->isVolatile()) in visitICmpInst()
4298 Instruction *LHSI, in FoldFCmp_IntToFP_Cst() argument
4305 int MantissaWidth = LHSI->getType()->getFPMantissaWidth(); in FoldFCmp_IntToFP_Cst()
4308 IntegerType *IntTy = cast<IntegerType>(LHSI->getOperand(0)->getType()); in FoldFCmp_IntToFP_Cst()
4310 bool LHSUnsigned = isa<UIToFPInst>(LHSI); in FoldFCmp_IntToFP_Cst()
4533 return new ICmpInst(Pred, LHSI->getOperand(0), RHSInt); in FoldFCmp_IntToFP_Cst()
4592 if (Instruction *LHSI = dyn_cast<Instruction>(Op0)) in visitFCmpInst() local
4593 switch (LHSI->getOpcode()) { in visitFCmpInst()
4596 FPExtInst *LHSExt = cast<FPExtInst>(LHSI); in visitFCmpInst()
4638 if (LHSI->getParent() == I.getParent()) in visitFCmpInst()
4644 if (Instruction *NV = FoldFCmp_IntToFP_Cst(I, LHSI, RHSC)) in visitFCmpInst()
4650 if (match(LHSI, m_FNeg(m_Value(Op)))) in visitFCmpInst()
4657 dyn_cast<GetElementPtrInst>(LHSI->getOperand(0))) { in visitFCmpInst()
4660 !cast<LoadInst>(LHSI)->isVolatile()) in visitFCmpInst()
4669 CallInst *CI = cast<CallInst>(LHSI); in visitFCmpInst()