fix a pipeline issue

This commit is contained in:
Yan Da
2022-05-16 19:38:40 +08:00
parent c3c4ac3733
commit 79298d61bc
2 changed files with 11 additions and 11 deletions

View File

@@ -269,7 +269,9 @@ scf::ForOp LoopPipeliner::createNewForOp() {
Value newMask = builder.create<arith::AndIOp>(mask.getLoc(),
splatCond,
nextMapping.lookupOrDefault(mask));
nextMapping.map(mask, newMask);
// if mask is defined outside the loop, don't update the map more than once
if (!(forOp.isDefinedOutsideOfLoop(mask) && nextMapping.contains(mask)))
nextMapping.map(mask, newMask);
}
Operation *nextOp = builder.clone(*op, nextMapping);
// update mapping of results