================
@@ -276,10 +265,10 @@ CIRGenFunction::emitAMDGPUBuiltinExpr(unsigned builtinId,
}
case AMDGPU::BI__builtin_amdgcn_logf:
case AMDGPU::BI__builtin_amdgcn_log_bf16: {
- cgm.errorNYI(expr->getSourceRange(),
- std::string("unimplemented AMDGPU builtin call: ") +
- getContext().BuiltinInfo.getName(builtinId));
- return mlir::Value{};
+ mlir::Value src = emitScalarExpr(expr->getArg(0));
+ return builder.emitIntrinsicCallOp(getLoc(expr->getExprLoc()),
+ "amdgcn.log", src.getType(),
+ mlir::ValueRange{src});
----------------
ranapratap55 wrote:
Since several open CIR AMDGPU builtin PRs share the same pattern, it may be
worth adding a small CIR-side equivalent helper and routing these cases through
it. So, the CIR structure mirrors the existing CodeGen path and reduces
repeated code.
https://github.com/llvm/llvm-project/pull/198032
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits