On Sat, Apr 11, 2015 at 12:43 AM, Max Filippov <jcmvb...@gmail.com> wrote:
> On Sat, Apr 11, 2015 at 2:16 AM, augustine.sterl...@gmail.com
> <augustine.sterl...@gmail.com> wrote:
>> On Fri, Apr 10, 2015 at 1:18 PM, Max Filippov <jcmvb...@gmail.com> wrote:
>>> How can we have a mulsi3 pattern that don't get expanded until it's
>>> optimized, and only gets expanded to a call if it couldn't be optimized?
>>
>> I'm not completely sure, but I think you want to use OPTAB_LIB as you
>> described above, and eliminate the TARGET_MUL32 condition in the
>> pattern.
>
> In that case mull is emitted for normal uses of multiplication.

You will have to play around with it then.

One possibility is to catch the simple cases when the instruction is
originally expanded. That is, generate shifts there. You won't get all
of the performance you would from the optimizer, but simple cases like
even powers of two one shouldn't be too bad.

Reply via email to