Allow implicit defs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274402
91177308-0d34-0410-b5e6-
96231b3b80d8
assert(Def && "This method needs a valid definition");
assert(
- (DefIdx < Def->getDesc().getNumDefs() || Def->getDesc().isVariadic()) &&
- Def->getOperand(DefIdx).isDef() && "Invalid DefIdx");
+ (Def->getOperand(DefIdx).isDef() &&
+ (DefIdx < Def->getDesc().getNumDefs() || Def->getDesc().isVariadic()) ||
+ Def->getOperand(DefIdx).isImplicit()) &&
+ "Invalid DefIdx");
if (Def->isCopy())
return getNextSourceFromCopy();
if (Def->isBitcast())