[Mlir-commits] [mlir] [mlir][Vector] Add patterns to lower	`vector.shuffle` (PR #157611)
    Diego Caballero 
    llvmlistbot at llvm.org
       
    Mon Sep 15 11:51:01 PDT 2025
    
    
  
================
@@ -0,0 +1,106 @@
+//===- LowerVectorShuffle.cpp - Lower 'vector.shuffle' operation ----------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// This file implements the lowering of complex `vector.shuffle` operation to a
+// set of simpler operations supported by LLVM/SPIR-V.
+//
+//===----------------------------------------------------------------------===//
+
+#include "mlir/Dialect/Arith/IR/Arith.h"
+#include "mlir/Dialect/Vector/IR/VectorOps.h"
+#include "mlir/Dialect/Vector/Transforms/LoweringPatterns.h"
+#include "mlir/IR/PatternMatch.h"
+
+#define DEBUG_TYPE "vector-shuffle-lowering"
----------------
dcaballe wrote:
We are lowering generic vector.shuffle ops into simpler/more constained versions of them (supported by LLVM/SPIR-V). We follow this approach/naming for other ops (e.g., shape_cast) so I was trying to be consistent with that pattern.
https://github.com/llvm/llvm-project/pull/157611
    
    
More information about the Mlir-commits
mailing list