[PATCH][mips] Add more Octeon cnMips instructions

Daniel Sanders Daniel.Sanders at imgtec.com
Tue Apr 1 02:07:35 PDT 2014


Hi,

I see you've added MipsISD::BADDU but you don't use any custom lowering into that node. Instead you are using a MipsPat<> to select the standard nodes into a BADDu instruction. I don't think you need the custom SelectionDAG node. You could use a PatFrag instead like so:
  def baddu : PatFrag<(ops node:$rs, node:$rt), (and (add node:$rs, $rt), 255)>;
  def BADDu : ArithLogicR<"baddu", GPR64Opnd, 1, II_BADDU, baddu>, ...;

Similarly for cins/cins32/ext/ext32, you define a new SelectionDAG node but don't lower into it (or select an instruction with a MipsPat). I believe these could be done with PatFrag as well.

> -----Original Message-----
> From: Kai Nacke [mailto:kai.nacke at redstar.de]
> Sent: 27 March 2014 18:07
> To: llvm-commits; Daniel Sanders
> Subject: Re: [PATCH][mips] Add more Octeon cnMips instructions
> 
> Somehow the latest test case was not committed in my tree. This patch
> contains the current test case. Sorry.
> 
> Regards,
> Kai
> 
> On 27.03.2014 17:56, Kai Nacke wrote:
> > Hi all!
> >
> > This patch adds the cnMips instructions ext/ext32/cins/cins32.
> > It also changes baddud/pop/dpop to accept the two operand version and
> > adds a simple pattern to generate baddu. Test cases are included.
> >
> > Please review.
> >
> > Regards,
> > Kai
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> >





More information about the llvm-commits mailing list