[clang] [CIR] Upstream splat op for VectorType (PR #139827)
Bruno Cardoso Lopes via cfe-commits
cfe-commits at lists.llvm.org
Fri May 16 15:29:42 PDT 2025
================
@@ -2037,4 +2037,37 @@ def VecExtractOp : CIR_Op<"vec.extract", [Pure,
let hasFolder = 1;
}
+
+//===----------------------------------------------------------------------===//
+// VecSplat
+//===----------------------------------------------------------------------===//
+
+// cir.vec.splat is a separate operation from cir.vec.create because more
+// efficient LLVM IR can be generated for it, and because some optimization and
+// analysis passes can benefit from knowing that all elements of the vector
+// have the same value.
----------------
bcardosolopes wrote:
Seems like this should be part of the description proper?
https://github.com/llvm/llvm-project/pull/139827
More information about the cfe-commits
mailing list