diff options
author | Vladislav Vinogradov <v.vinogradov@yadro.com> | 2022-11-10 13:23:44 +0300 |
---|---|---|
committer | Vladislav Vinogradov <v.vinogradov@yadro.com> | 2022-11-16 12:19:16 +0300 |
commit | 2ada5cbea47bdf7d8df70981315f352237cc2222 (patch) | |
tree | dbfb9f5043dec095c569b158e1ac7ed76f75bece /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | |
parent | 981dac8bd6fef375847e81ea5df19d4e760532b8 (diff) | |
download | llvm-2ada5cbea47bdf7d8df70981315f352237cc2222.zip llvm-2ada5cbea47bdf7d8df70981315f352237cc2222.tar.gz llvm-2ada5cbea47bdf7d8df70981315f352237cc2222.tar.bz2 |
[mlir][linalg] Fix bug in InferStaticShapeOfOperands pattern
The pattern tries to deduce static shape from `tensor.cast` producer of linalg operation operands.
The original code unconditionally casts type of the `tensor.cast` source to `RankedTensorType`.
But the `tensor.cast` can also operate on `UnrankedTensorType`, so this cast either fail on assertion
in debug build or introduce UB in release build.
The patch replaces unconditional cast with `dyn_cast` and check for the cast result.
Reviewed By: mravishankar
Differential Revision: https://reviews.llvm.org/D137775
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
0 files changed, 0 insertions, 0 deletions