[Mlir-commits] [mlir] [MLIR] Fix -Wunused-variable (PR #192698)

Aiden Grossman llvmlistbot at llvm.org
Fri Apr 17 09:53:44 PDT 2026


https://github.com/boomanaiden154 created https://github.com/llvm/llvm-project/pull/192698

Inline the variable given the call does not have side effects and the
variable name does not add any clarity.

>From 8bd1b64db927b4411bd20ce313bcf6bddf76ad18 Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Fri, 17 Apr 2026 16:48:21 +0000
Subject: [PATCH] [MLIR] Fix -Wunused-variable

Inline the variable given the call does not have side effects and the
variable name does not add any clarity.
---
 mlir/lib/Dialect/Vector/IR/VectorOps.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/mlir/lib/Dialect/Vector/IR/VectorOps.cpp b/mlir/lib/Dialect/Vector/IR/VectorOps.cpp
index 2ae9491f7c15f..8d8658ddda33d 100644
--- a/mlir/lib/Dialect/Vector/IR/VectorOps.cpp
+++ b/mlir/lib/Dialect/Vector/IR/VectorOps.cpp
@@ -3453,9 +3453,8 @@ static OpFoldResult foldShuffleConstantInputs(ShuffleOp op, Attribute v1Attr,
 
 OpFoldResult vector::ShuffleOp::fold(FoldAdaptor adaptor) {
   auto v1Type = getV1VectorType();
-  auto v2Type = getV2VectorType();
 
-  assert(!v1Type.isScalable() && !v2Type.isScalable() &&
+  assert(!v1Type.isScalable() && !getV2VectorType.isScalable() &&
          "Vector shuffle does not support scalable vectors");
 
   // For consistency: 0-D shuffle return type is 1-D, this cannot be a folding



More information about the Mlir-commits mailing list