This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] ppc ccX splitters
On Mon, Feb 21, 2000 at 05:22:10PM +0100, Gabriel Paubert wrote:
>
>
> On Mon, 21 Feb 2000, Clinton Popetz wrote:
>
> > Just when you thought rs6000.md was big enough...here's a patch to do the
> > following: for each pattern that has an 'x' constraint but no 'y' constraint,
> > add an alternitave which has a (disparaged) y constraint, which forces
> > a split. Then add a define split to turn this into the an op and a straight
> > compare. For instance:
> >
> > (define_insn ""
> > [(set (match_operand:CC 0 "cc_reg_operand" "=x")
> > (compare:CC (zero_extend:DI (match_operand:QI 1 "gpc_reg_operand" "r"))
> > (const_int 0)))
> > (clobber (match_scratch:DI 2 "=r"))]
> > "TARGET_POWERPC64"
> > "rldicl. %2,%1,0,56"
> > [(set_attr "type" "compare")])
>
> I thought that in this precise case `andi.' was better since on some
> machines it could be faster than `rldicl.', but that the converse was
> never true.
Someone else will have to pick up that question; I didn't change the existing
patterns; I only augmented them with alternatives/splits.
> BTW, I also believe that the attributes are wrong after this patch is
> applied. Shouldn't a length attribute, something like (set_attr "length"
> "4,8"), be added to the new patterns ?
Yes, thanks. I've added that to the script, and the new cc0 patch is attached.
Since I received no other comments, and Geoff approved it verbally, I'll wait a
day and then check it in...
-Clint
new-cc0.patch.gz