'LLVM - Create jump intrinsic

I'm trying to add my intrinsic to generate a jump on constant value.

I did:

Added jmp intrinsics description to Intrinsics.td

// Intrinsic for jump on constant
def int_jmp : Intrinsic<[], [llvm_ptr_ty], [IntrReadMem]>;

Created a pattern in X86InstrControl.td

def : Pat<(int_jmp addr:$src), (JMP64m_NT addr:$src)>;

Now it is generated in intinsics.inc, but the codogen skips this and no instructions are generated. What should I do?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source