I’m working on my own llvm backend.
I’m trying to generate an instruction that takes a integer as an operand by using llvm asm inline.
I have something like that:
asm (“add %%r0, %%r1, %0” : : “i” (3));
And I expect llvm to generate:
add %r0, %r1, 3
But instead, llvm generates:
mov %r2, 3
add %r0, %r1, %r2
Did someone already have the same kind of issue?
What should I do in my backend to get to the expected format?