================
@@ -677,7 +678,20 @@ static mlir::Value emitCommonNeonBuiltinExpr(
   case NEON::BI__builtin_neon_vext_v:
   case NEON::BI__builtin_neon_vextq_v:
   case NEON::BI__builtin_neon_vfma_v:
-  case NEON::BI__builtin_neon_vfmaq_v:
+    cgf.cgm.errorNYI(expr->getSourceRange(),
+                     std::string("unimplemented AArch64 builtin call: ") +
+                         ctx.BuiltinInfo.getName(builtinID));
+    return mlir::Value{};
+  case NEON::BI__builtin_neon_vfmaq_v: {
+    mlir::Value op0 = cgf.getBuilder().createBitcast(ops[0], ty);
+    mlir::Value op1 = cgf.getBuilder().createBitcast(ops[1], ty);
+    mlir::Value op2 = cgf.getBuilder().createBitcast(ops[2], ty);
+    llvm::SmallVector<mlir::Value> fmaOps = {op1, op2, op0};
----------------
banach-space wrote:

Please add a comment with rationale for re-ordering the arguments. That's 
already available in ARM.cpp and in the incubator, e.g.:

>  // NEON intrinsic puts accumulator first, unlike the LLVM fma.

or 

> // NEON intrinsic: vfmaq(accumulator, multiplicand1, multiplicand2)
> // LLVM intrinsic: fma(multiplicand1, multiplicand2, accumulator)
> // Reorder arguments to match LLVM fma signature

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

Reply via email to