[clang] [CIR] Upstream ShuffleDynamicOp for VectorType (PR #141411)
Amr Hesham via cfe-commits
cfe-commits at lists.llvm.org
Wed May 28 10:45:17 PDT 2025
================
@@ -1548,6 +1548,20 @@ OpFoldResult cir::VecExtractOp::fold(FoldAdaptor adaptor) {
return elements[index];
}
+//===----------------------------------------------------------------------===//
+// VecShuffleDynamicOp
+//===----------------------------------------------------------------------===//
+
+LogicalResult cir::VecShuffleDynamicOp::verify() {
+ // The number of elements in the two input vectors must match.
+ if (getVec().getType().getSize() !=
+ mlir::cast<cir::VectorType>(getIndices().getType()).getSize()) {
+ return emitOpError() << ": the number of elements in " << getVec().getType()
+ << " and " << getIndices().getType() << " don't match";
+ }
----------------
AmrDeveloper wrote:
Done, thanks
https://github.com/llvm/llvm-project/pull/141411
More information about the cfe-commits
mailing list