This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: CPROP and spec2000 slowdown in mid february


>     (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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]