[clang] [CIR] Support building vectors from smaller vectors (PR #231404)
Arseniy Obolenskiy via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 14 02:03:15 PDT 2026
================
@@ -2948,6 +2952,45 @@ mlir::Value ScalarExprEmitter::VisitMemberExpr(MemberExpr *e) {
return emitLoadOfLValue(e);
}
+mlir::Value
+ScalarExprEmitter::emitVectorInitWithSubvectors(mlir::Location loc,
+ cir::VectorType vectorType,
+ ArrayRef<mlir::Value> inits) {
+ const unsigned resElts = vectorType.getSize();
+ mlir::Value result =
+ builder.getConstant(loc, cir::PoisonAttr::get(vectorType));
+ unsigned curIdx = 0;
+ for (mlir::Value init : inits) {
----------------
aobolensk wrote:
"this should never happen" (c)
Let's add an assertion for that
https://github.com/llvm/llvm-project/pull/231404
More information about the cfe-commits
mailing list