This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: [PATCH GCC]Look into unnecessary conversion when checking mult_op in get_shiftadd_cost


On Wed, Sep 2, 2015 at 8:32 PM, Richard Biener
<richard.guenther@gmail.com> wrote:
> On Wed, Sep 2, 2015 at 5:50 AM, Bin Cheng <bin.cheng@arm.com> wrote:
>> Hi,
>> When calling get_shiftadd_cost, the mult_op is stripped at caller places.
>> We should look into unnecessary conversion in op1 before checking equality,
>> otherwise it computes wrong shiftadd cost.  This patch picks this small
>> issue up.
>>
>> Bootstrap and test on x86_64 and aarch64 along with other patches.  Is it
>> OK?
>
> Just do STRIP_NOPS (op1) unconditionally?  Thus
>
>   STRIP_NOPS (op1);
>   mult_in_op1 = operand_equal_p (op1, mult, 0);
>
> ok with that change.
Patch committed as suggested.

Thanks,
bin


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