Lines Matching defs:AddrInst

3538   bool matchOperationAddr(User *AddrInst, unsigned Opcode, unsigned Depth,
4804 /// not AddrInst has to be folded into the addressing mode on success.
4805 /// If \p MovedAway == true, \p AddrInst will not be part of the addressing
4807 /// Thus AddrInst must not be added in the matched instructions.
4808 /// This state can happen when AddrInst is a sext, since it may be moved away.
4809 /// Therefore, AddrInst may not be valid when MovedAway is true and it must
4811 bool AddressingModeMatcher::matchOperationAddr(User *AddrInst, unsigned Opcode,
4825 return matchAddr(AddrInst->getOperand(0), Depth);
4827 auto AS = AddrInst->getType()->getPointerAddressSpace();
4830 if (TLI.getValueType(DL, AddrInst->getOperand(0)->getType()) == PtrTy)
4831 return matchAddr(AddrInst->getOperand(0), Depth);
4837 if (AddrInst->getOperand(0)->getType()->isIntOrPtrTy() &&
4841 AddrInst->getOperand(0)->getType() != AddrInst->getType())
4842 return matchAddr(AddrInst->getOperand(0), Depth);
4846 AddrInst->getOperand(0)->getType()->getPointerAddressSpace();
4847 unsigned DestAS = AddrInst->getType()->getPointerAddressSpace();
4849 return matchAddr(AddrInst->getOperand(0), Depth);
4867 if (isa<ConstantInt>(AddrInst->getOperand(First))
4868 && !isa<ConstantInt>(AddrInst->getOperand(Second)))
4871 if (matchAddr(AddrInst->getOperand(First), Depth + 1) &&
4872 matchAddr(AddrInst->getOperand(Second), Depth + 1))
4882 if (matchAddr(AddrInst->getOperand(Second), Depth + 1) &&
4883 matchAddr(AddrInst->getOperand(First), Depth + 1))
4899 ConstantInt *RHS = dyn_cast<ConstantInt>(AddrInst->getOperand(1));
4906 return matchScaledValue(AddrInst->getOperand(0), Scale, Depth);
4915 gep_type_iterator GTI = gep_type_begin(AddrInst);
4916 for (unsigned i = 1, e = AddrInst->getNumOperands(); i != e; ++i, ++GTI) {
4920 cast<ConstantInt>(AddrInst->getOperand(i))->getZExtValue();
4930 dyn_cast<ConstantInt>(AddrInst->getOperand(i))) {
4952 if (matchAddr(AddrInst->getOperand(0), Depth + 1)) {
4953 if (!cast<GEPOperator>(AddrInst)->isInBounds())
4959 if (EnableGEPOffsetSplit && isa<GetElementPtrInst>(AddrInst) &&
4966 Value *Base = AddrInst->getOperand(0);
4968 auto *GEP = cast<GetElementPtrInst>(AddrInst);
4990 if (!cast<GEPOperator>(AddrInst)->isInBounds())
4994 if (!matchAddr(AddrInst->getOperand(0), Depth + 1)) {
5002 AddrMode.BaseReg = AddrInst->getOperand(0);
5006 if (!matchScaledValue(AddrInst->getOperand(VariableOperand), VariableScale,
5015 AddrMode.BaseReg = AddrInst->getOperand(0);
5017 if (!matchScaledValue(AddrInst->getOperand(VariableOperand),
5030 Instruction *Ext = dyn_cast<Instruction>(AddrInst);
5084 if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(AddrInst)) {
5088 return matchAddr(AddrInst->getOperand(0), Depth);