Creating a new custom intrinsic

Hi, I am an LLVM noobie who has recently started to study the backend implementation of LLVM for academic purposes.
I am currently trying to understand the process of creating a custom defined intrinsic function.
I am following this guide (Extending LLVM: Adding instructions, intrinsics, types, etc. — LLVM 19.0.0git documentation) but I am stuck on the following procedure:
Add support to the .td file for the chosen targets in lib/Target/*/*.td.
This is usually a matter of adding a template to the .td file that matches the intrinsic, although of course you may also need to add the instructions you want to generate. There are many examples to follow in the PowerPC and X86 backend.

Does anyone know of any good resources that explain this step or can provide a trivial implementation of an intrinsic to grasp the essential concepts?
Other than that, what are the next steps to be able to use the intrinsic function in IR code.

Thank you in advance.