Skip to content

Commit 2a2583c

Browse files
Fix build failure hit downstream.
1 parent 46f591f commit 2a2583c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

mlir/lib/Transforms/Utils/LoopInvariantCodeMotionUtils.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,13 @@ MatchingSubsets::populateSubsetOpsAtIterArg(LoopLikeOpInterface loopLike,
279279

280280
if (auto insertionOp =
281281
dyn_cast<SubsetInsertionOpInterface>(use.getOwner())) {
282+
// Current implementation expects that the insertionOp implement
283+
// the destinationStyleOpInterface as well. Abort if that tha is not
284+
// the case
285+
if (!isa<DestinationStyleOpInterface>(use.getOwner())) {
286+
return failure();
287+
}
288+
282289
// The value must be used as a destination. (In case of a source, the
283290
// entire tensor would be read, which would prevent any hoisting.)
284291
if (&use != &insertionOp.getDestinationOperand())

0 commit comments

Comments
 (0)