================
@@ -41,6 +53,16 @@ CIRGenFunction::emitAArch64SVEBuiltinExpr(unsigned builtinID,
     return mlir::Value{};
   }
 
+  mlir::Location loc = getLoc(expr->getExprLoc());
+  // Generate vscale * scalingFactor
+  auto vscaleTimesFactor = [&](int32_t scalingFactor) {
+    StringRef intrinsicName = "vscale.i64";
+    auto vscale = emitIntrinsicCallOp(builder, loc, intrinsicName,
----------------
banach-space wrote:

> Do you think it's useful to add a cir.vscale operation to make this easier to 
> identify in transformation passes?

Yes, similar op in `Vector` 
([vector.vscale](https://mlir.llvm.org/docs/Dialects/Vector/#vectorvscale-vectorvectorscaleop))
 is widely used. That said, I'm not sure how helpful `cir.vscale` would be just 
now.

In any case, I am in favour, but I'd defer to a separate PR. Note, we still 
need to "fix" how scalable vectors are printed in CIR.

https://github.com/llvm/llvm-project/pull/172346
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to