[patch] ppc ccX splitters
Gabriel Paubert
paubert@iram.es
Mon Feb 21 08:18:00 GMT 2000
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.
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 ?
Gabriel.
More information about the Gcc-patches
mailing list