[llvm-dev] how to implement an instruction that does not exist in instruction set

Matt Arsenault via llvm-dev llvm-dev at lists.llvm.org
Mon Jun 15 06:28:06 PDT 2020



> On Jun 13, 2020, at 09:31, 林政宗 via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> 
> Hi, there
> 
> I am writing an new backend. And I don't have vsge(vector set when larger than or equal to) instruction in the instruction set.
> How could I implement the instruction? I have vslt(vector set when less than) instruction, vseq(vector set when equal to), vneg(vector negate), vand(vector and), vor(vector or) and vxor(vector xor) in the instruction set.
> Should I consider the situation when one of the operand of vsge is nan(not a number)?
> Where should I implement the vsge operation? Should it be implemented in the SelectionDAG lowering step or the pseudo instruction expansion step?

Look at setCondCodeAction. Most of the expansions for different available compare types should be implemented already

-Matt

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200615/474db4d5/attachment.html>


More information about the llvm-dev mailing list