[llvm-dev] Reg: Adding immediate operand as part of Intrinsic

Sai Venkata Krishnan V via llvm-dev llvm-dev at lists.llvm.org
Wed May 5 02:42:53 PDT 2021


Hello Everyone
   I am trying to add an custom Intrinsic to the RISCV backend, which
operates on a *simm12 *operand. I figured the steps to add it to
*lib/llvm/Target/RISCV/RISCVInstrInfo.td
*& *lib/llvm/Target/RISCV/RISCVInstrFormats.td. *But I am not sure how to
declare the intrinsic in *llvm/include/IR/IntrinsicsRISCV.td *.
Specifically, since I require a *imm12 *operand, how should I specify that
in intrinsic declaration? Is there a corresponding *llvm_i12_ty *which I
can specify and make use of *ImmArg<> *to specify that the operand is an
immediate, or should I just use the nearest size type, i.e. *llvm_i16_ty *and
make use of the *ImmArg<>* ?

Please guide me on this

Thanking you
Sai
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210505/24de6d06/attachment.html>


More information about the llvm-dev mailing list