memref.expand_shape has verification logic to make sure
src type is compatible with the result type.
Cast folding might add/remove static information for the src operand
of memref.expand_shape which will change operation to be invalid.
The only case where it's legal to fold the memref cast is actually
when the cast doesn't change the type info. This case is handled by
memref.cast folder already.
Details
Details
- Reviewers
nicolasvasilache silvas herhut mravishankar
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
The idea here of preventing invalid ops makes sense to me, but @herhut probably is more knowledgeable about this code for a detailed review.
Comment Actions
This was recently fixed in https://reviews.llvm.org/D114391. If you rebase, you should pick up that change.
Would be great to land those tests, though!