This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: CPROP and spec2000 slowdown in mid february
- To: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- Subject: Re: CPROP and spec2000 slowdown in mid february
- From: Joern Rennecke <amylaar at redhat dot com>
- Date: Mon, 4 Jun 2001 21:33:51 +0100 (BST)
- Cc: amylaar at redhat dot com, gcc at gcc dot gnu dot org
> (define_insn "and_shl_scratch"
> [(set (match_operand:SI 0 "register_operand" "=r,&r")
> (lshiftrt:SI
> (ashift:SI
> (and:SI
> (lshiftrt:SI (match_operand:SI 1 "register_operand" "r,0")
> (match_operand:SI 2 "const_int_operand" "N,n"))
> (match_operand:SI 3 "" "0,r"))
> (match_operand:SI 4 "const_int_operand" "n,n"))
> (match_operand:SI 5 "const_int_operand" "n,n")))
> (clobber (reg:SI T_REG))]
>
> And why couldn't this be written using the appropriate simplified form with
> the constants adjusted as appropriate?
The instruction is actually performed as it is written in this pattern.
I.e. the constant costs have to be based on the actual values, not on
values in the 'simplified' form. Moreover, observe that operand three
needs to be forced into a register by reload, if it hasn't already been
put into one by an earlyer optimization.
And finally, we use a different alternative when operand two is zero:
we use a matching constraint for operand three rather than an earlyclobber
of operand 0.