This is an archive of the discontinued LLVM Phabricator instance.

[mlir][linalg] Fix FoldTensorCastConsumerOp invalid folding
ClosedPublic

Authored by Hardcode84 on Jul 21 2022, 4:11 PM.

Details

Summary

CastOp can be in conditionally reachable region, in which case this folding will be invalid.
Only conservatively fold ops in same block for now.

Fixes https://github.com/llvm/llvm-project/issues/56557

Diff Detail

Event Timeline

Hardcode84 created this revision.Jul 21 2022, 4:11 PM
Hardcode84 requested review of this revision.Jul 21 2022, 4:11 PM
mravishankar accepted this revision.Jul 21 2022, 8:52 PM

awesome! thanks for the fix!

This revision is now accepted and ready to land.Jul 21 2022, 8:52 PM