================
@@ -1339,6 +1334,29 @@ mlir::LogicalResult
CIRToLLVMCastOpLowering::matchAndRewrite(
assert(!MissingFeatures::cxxABI());
assert(!MissingFeatures::methodType());
break;
+ case cir::CastKind::vector_to_int: {
+ mlir::Type srcType = castOp.getSrc().getType();
+ mlir::Type dstType = castOp.getType();
+ mlir::Value llvmSrcVal = adaptor.getSrc();
+ cir::IntType srcIntType =
+ mlir::cast<cir::IntType>(elementTypeIfVector(srcType));
+ cir::IntType dstIntType =
+ mlir::cast<cir::IntType>(elementTypeIfVector(dstType));
+ uint64_t numElements =
+ mlir::cast<cir::VectorType>(srcType).getSize();
+
+ auto width = numElements * srcIntType.getWidth();
----------------
Lancern wrote:
Do not use `auto` here.
https://github.com/llvm/llvm-project/pull/174318
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits