On Wed, Sep 2, 2015 at 5:50 AM, Bin Cheng <bin.ch...@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. Thanks, Richard. > Thanks, > bin > > 2015-08-31 Bin Cheng <bin.ch...@arm.com> > > * tree-ssa-loop-ivopts.c (get_shiftadd_cost): Look into > unnecessary type conversion for OP1.