[llvm-dev] Using a stack slot as a destination register for cmov

Craig Topper via llvm-dev llvm-dev at lists.llvm.org
Mon Mar 23 16:30:31 PDT 2020

You would need to make a MachineInstr that takes an address to store to as
input and has no def operands. The address will the stack slot you wish to
write. Have you already added a new version of CMOV to X86Instr*.td?


On Mon, Mar 23, 2020 at 4:18 PM Genoveva Fossas via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> Hello,
> I'm a computer science student experimenting with the X86 back end for
> llvm. I'm currently attempting to emit a cmov with the
> MachineInstructionBuilder, but I'm a little unclear on how I could emit a
> cmov that writes to a stack slot when its condition is true. I see several
> usages when there are virtual registers as the destination, but not one
> that writes to a stack slot. At least that I am able to discern.
> In summary: how would I emit a cmov with the machine instruction builder
> that writes to a stack slot when true?
> Thank you in advance,
> Genoveva Fossas
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200323/9c5c44cc/attachment.html>

More information about the llvm-dev mailing list