Skip to content

Commit ef32d01

Browse files
authored
[mlir] Use dyn_cast instead of cast
1 parent fd0785e commit ef32d01

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mlir/test/lib/Conversion/MathToVCIX/TestMathToVCIXConversion.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ namespace {
2525
/// according to LLVM's encoding:
2626
/// https://lists.llvm.org/pipermail/llvm-dev/2020-October/145850.html
2727
static std::pair<unsigned, VectorType> legalizeVectorType(const Type &type) {
28-
VectorType vt = cast<VectorType>(type);
28+
VectorType vt = dyn_cast<VectorType>(type);
2929
// To simplify test pass, avoid multi-dimensional vectors.
3030
if (!vt || vt.getRank() != 1)
3131
return {0, nullptr};

0 commit comments

Comments
 (0)