git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256356
91177308-0d34-0410-b5e6-
96231b3b80d8
/// \brief Determine whether the passed use points to an argument operand.
bool isArgOperand(const Use *U) const {
/// \brief Determine whether the passed use points to an argument operand.
bool isArgOperand(const Use *U) const {
+ assert(getInstruction() == U->getUser());
return arg_begin() <= U && U < arg_end();
}
return arg_begin() <= U && U < arg_end();
}
/// \brief Determine whether the passed use points to a bundle operand.
bool isBundleOperand(const Use *U) const {
/// \brief Determine whether the passed use points to a bundle operand.
bool isBundleOperand(const Use *U) const {
+ assert(getInstruction() == U->getUser());
if (!hasOperandBundles())
return false;
if (!hasOperandBundles())
return false;
- unsigned OperandNo = U->getOperandNo();
+ unsigned OperandNo = U - (*this)->op_begin();
return getBundleOperandsStartIndex() <= OperandNo &&
OperandNo < getBundleOperandsEndIndex();
}
return getBundleOperandsStartIndex() <= OperandNo &&
OperandNo < getBundleOperandsEndIndex();
}