[LLVMdev] Implementing select_cc without cmov
richard at xmos.com
Sun Mar 22 07:44:31 CDT 2009
> Hi All,
> I need to implement select_cc as a "cmp; mov rX,1; brcond cnd, END;
> mov rX,0; END:" sequence.
> Chris mentioned that the PPC code (as well as the x86 SSE code) does
> this, but I can't seem to find it.
> What I really need to kmow is how to insert the branch/label pair at
> instruction selection phase.
> Anyone have an example of this?
Add a pseudo instruction for the select with usesCustomDAGSchedInsteter
= 1. Replace the pseudo instruction with the required control flow in
the EmitInstrWithCustomInserter member of your ISelLowering class. There
are examples of this in the MIPS or XCore backends.
More information about the LLVMdev