Kugan Vivekanandarajah writes:
> +/* Return the preferred mem scale factor for accessing MEM_MODE
> + of BASE which is optimized for SPEED. */
Maybe:
/* Return the preferred index scale factor for accessing memory of mode
MEM_MODE in the address space of pointer BASE. Assume that we're
MODE (use->mem_type));
> > +
> > + if ((fact != 1)
> > + && multiple_p (poly_step, fact, _step))
>
> Should be no brackets around "fact != 1".
>
> > [...]
>
> Looks really good to me otherwise, thanks. Bin, any comments?
Revised
Kugan Vivekanandarajah writes:
> [...]
>> > +{
>> > + struct mem_address parts = {NULL_TREE, integer_one_node,
>> > + NULL_TREE, NULL_TREE, NULL_TREE};
>>
>> Might be better to use "= {}" and initialise the fields that matter by
>> assignment. As it stands
Hi Richard,
On Thu, 16 May 2019 at 21:14, Richard Biener wrote:
>
> On Wed, May 15, 2019 at 4:40 AM wrote:
> >
> > From: Kugan Vivekanandarajah
> >
> > gcc/ChangeLog:
> >
> > 2019-05-15 Kugan Vivekanandarajah
> >
> > PR target/88834
> > * tree-ssa-loop-ivopts.c
exact_div (poly_step, fact));
>
> The multiple_p mentioned above would provide this result too.
> We only need to calculate "step" if we decided to add the candidate,
> so I think it should be in the "if" below.
OK.
>
> > + parts.step = w
On Wed, May 15, 2019 at 4:40 AM wrote:
>
> From: Kugan Vivekanandarajah
>
> gcc/ChangeLog:
>
> 2019-05-15 Kugan Vivekanandarajah
>
> PR target/88834
> * tree-ssa-loop-ivopts.c (get_mem_type_for_internal_fn): Handle
> IFN_MASK_LOAD_LANES and IFN_MASK_STORE_LANES.
>
Richard Sandiford writes:
> kugan.vivekanandara...@linaro.org writes:
>> + parts.step = wide_int_to_tree (sizetype, fact);
>> + /* Addressing mode "base + index << scale". */
>> + addr = addr_for_mem_ref (, as, false);
>> + unsigned new_cost = address_cost (addr, mem_mode,
Thanks for doing this.
kugan.vivekanandara...@linaro.org writes:
> From: Kugan Vivekanandarajah
>
> gcc/ChangeLog:
>
> 2019-05-15 Kugan Vivekanandarajah
>
> PR target/88834
> * tree-ssa-loop-ivopts.c (get_mem_type_for_internal_fn): Handle
> IFN_MASK_LOAD_LANES and
From: Kugan Vivekanandarajah
gcc/ChangeLog:
2019-05-15 Kugan Vivekanandarajah
PR target/88834
* tree-ssa-loop-ivopts.c (get_mem_type_for_internal_fn): Handle
IFN_MASK_LOAD_LANES and IFN_MASK_STORE_LANES.
(find_interesting_uses_stmt): Likewise.