From 4a8bf20f2fd2217b5696169d23bf5dbb320ed659 Mon Sep 17 00:00:00 2001 From: panickal-xmos Date: Fri, 2 Aug 2024 14:59:02 +0100 Subject: [PATCH] Fix typo --- xformer/Transforms/ReplaceConcat.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xformer/Transforms/ReplaceConcat.cpp b/xformer/Transforms/ReplaceConcat.cpp index 4235f0c02..aa42958dc 100644 --- a/xformer/Transforms/ReplaceConcat.cpp +++ b/xformer/Transforms/ReplaceConcat.cpp @@ -62,8 +62,8 @@ struct SplitConcatPattern : public OpRewritePattern { auto outputType = concatOp.getOutput().getType().cast(); Type elementType = outputType.getElementType(); ArrayRef outputShape = outputType.getShape(); - int axis = concatOp.getAxis(); - axis = -1 ? outputType.getRank() - 1 : axis; + const int axis = concatOp.getAxis() == -1 ? outputType.getRank() - 1 + : concatOp.getAxis(); int axisShape = 0; for (int i = 0; i < CONCAT_OP_MAX_INPUTS; i++) {