[mlir] Move the assertion to a valid place.
authorHanhan Wang <hanchung@google.com>
Thu, 3 Nov 2022 01:09:46 +0000 (18:09 -0700)
committerHanhan Wang <hanchung@google.com>
Fri, 4 Nov 2022 19:14:15 +0000 (12:14 -0700)
commit8c33639aa65d0771472abb28718f178d0ffa923d
tree6d872e57449436365bf9f98e4752440358f35104
parent6edb49eee2fd05c35642110f35766584428857b7
[mlir] Move the assertion to a valid place.

The defining Op may live in an unlinked block so its parent Op may be
null. Only assert it when the parent Op is not null.

Reviewed By: mravishankar

Differential Revision: https://reviews.llvm.org/D137306
mlir/lib/Analysis/SliceAnalysis.cpp