[llvm-dev] Encode method for basic block

Tim Northover via llvm-dev llvm-dev at lists.llvm.org
Thu Oct 24 09:17:33 PDT 2019

Hi Mahesh,

On Wed, 23 Oct 2019 at 23:20, Mahesh Bodapati via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> def : Pat<(brcond (setcc (i32 GR32:$L), (i32 0), SETEQ), bb:$T),
>           (BEI GR32:$L, brtarget:$T)>;
> def brtarget    : Operand<OtherVT> {
>    let EncoderMethod = "getPCRel";
> }

> Added getPCRel encoder method but it is not been picked by BEI ..
> could you help me in setting up encoder method..

I believe EncoderMethods have to be attached to the (ins) in the
instruction's definitions, they're not picked up from individual Pats.



More information about the llvm-dev mailing list