[PATCH[[mips] Add octeon branch instructions bbit0/bbit032/bbit1/bbit132

Daniel Sanders Daniel.Sanders at imgtec.com
Mon Jan 12 02:59:42 PST 2015


Hi Kai,

LGTM with a couple nits:
* The indentation on the lines after each of the CBranchImm/CBranchImm32 def is incorrect.
* Could you rename CBranchImm? The current name implies it's more generic than the pattern really is. CBranchBitNum is one possibility I can think of.
* In the testcase, could you fill out the registers in the MIPS64 case too? You can use FileCheck variables for the ones that are unpredictable.

Not needed for this patch since the addi64 and mul tests do the same thing but it would be good to use multiple -check-prefixes so that we can just specify 'ALL-LABEL: bbit0:' once rather than for each case.

Also a question:
BBIT0, BBIT1, and PowerOf2LO look like they'd be fine for i32 and smaller too. Do you intend to implement the char/short/int cases later?

> -----Original Message-----
> From: Kai Nacke [mailto:kai.nacke at redstar.de]
> Sent: 11 January 2015 18:07
> To: llvm-commits; Daniel Sanders
> Subject: Re: [PATCH[[mips] Add octeon branch instructions
> bbit0/bbit032/bbit1/bbit132
> 
> Hi Daniel!
> 
> I refined the patch a bit: there was a bug in the instruction pattern.
> I also added new patterns with the result that the instructions are now
> selected for C code like
> 
> if (a & 0x08) { .. }
> 
> Test cases are included.
> 
> Please review.
> 
> Regards,
> Kai
> 
> On 06.01.2015 07:12, Kai Nacke wrote:
> > Hi Daniel,
> >
> > the attached patch adds the octeon branch instructions
> > bbit0/bbit032/bbit1/bbit132. Test case is included. Please review.
> >
> > BTW: I did not implement the automatic change of the instruction if the
> > constant does not fit (e.g. bbit0 $22, 42, foo -> bbit032 $22, 10, foo).
> > Do you have an suggestion where to implement this? Thanks.
> >
> > 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