[clang] [CIR][NEON] Add lowering for `vfmah_f16` and `vfmsh_f16` (PR #181148)

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 12 13:46:06 PST 2026


================
@@ -1508,7 +1519,17 @@ CIRGenFunction::emitAArch64BuiltinExpr(unsigned builtinID, const CallExpr *expr,
   case NEON::BI__builtin_neon_vsubh_f16:
   case NEON::BI__builtin_neon_vmulh_f16:
   case NEON::BI__builtin_neon_vdivh_f16:
+    cgm.errorNYI(expr->getSourceRange(),
+                 std::string("unimplemented AArch64 builtin call: ") +
+                     getContext().BuiltinInfo.getName(builtinID));
+    return mlir::Value{};
   case NEON::BI__builtin_neon_vfmah_f16:
+    ops.push_back(emitScalarExpr(expr->getArg(1)));
+    ops.push_back(emitScalarExpr(expr->getArg(2)));
+    ops.push_back(emitScalarExpr(expr->getArg(0)));
----------------
andykaylor wrote:

Do `ops[1]`, `ops[2]`, and `ops[0]` not already contain the `expr->getArg[n]` results? I see that classic codegen calls `getArg` for 1 and 2, but uses `ops[0]` directly. It looks like an artifact from an earlier state.

https://github.com/llvm/llvm-project/pull/181148


More information about the cfe-commits mailing list