This is an archive of the discontinued LLVM Phabricator instance.

[mlir][affine] Fix crash on -affine-loop-invariant-code-motion pass with affine.prefetch Op
ClosedPublic

Authored by anoopjs on Mar 24 2023, 11:41 AM.

Details

Summary

Affine Prefetch Op impelements AffineMapAccessInterface but does not implement
AffineReadOpInterface or AffineWriteOpInterface. Prefetch Op was cast to
AffineWriteOpinterface causing the crash.

Diff Detail

Event Timeline

anoopjs created this revision.Mar 24 2023, 11:41 AM
anoopjs requested review of this revision.Mar 24 2023, 11:41 AM
anoopjs edited the summary of this revision. (Show Details)Mar 24 2023, 11:42 AM
bondhugula accepted this revision.Apr 8 2023, 5:00 AM

LGTM - thanks.

mlir/lib/Dialect/Affine/Transforms/AffineLoopInvariantCodeMotion.cpp
102

Use variadic isa.

This revision is now accepted and ready to land.Apr 8 2023, 5:00 AM
anoopjs updated this revision to Diff 512028.Apr 9 2023, 11:51 AM

Use variadic isa

anoopjs marked an inline comment as done.Apr 9 2023, 11:52 AM

Thanks @bondhugula. I don’t have commit access, can you land this patch for me? Please use “anoop.js@icloud.com” to commit the change.