On Tue, Oct 22, 2019 at 3:32 PM Jakub Jelinek wrote:
>
> On Mon, Oct 21, 2019 at 01:24:30PM +0200, Jakub Jelinek wrote:
> > So I wonder if for correctness I don't need to add:
> >
> > if (!use->iv->no_overflow
> > && !cand->iv->no_overflow
> > && !integer_pow2p (cstep))
> > retur
On Mon, Oct 21, 2019 at 01:24:30PM +0200, Jakub Jelinek wrote:
> So I wonder if for correctness I don't need to add:
>
> if (!use->iv->no_overflow
> && !cand->iv->no_overflow
> && !integer_pow2p (cstep))
> return NULL_TREE;
>
> with some of the above as comment explaining why.
>
On Mon, Oct 21, 2019 at 06:41:46PM +0800, Bin.Cheng wrote:
> The overflow check is difficult, IIUC, checks on bit precision in the
> patch is not enough? Considering an unsigned 64-bit candidate with
I think it can cover some cases, especially on 64-bit targets, but will
leave other cases out.
I
On Sat, Oct 19, 2019 at 2:27 PM Jakub Jelinek wrote:
>
> Hi!
>
> As mentioned in the PR, the following patch attempts to address two issues.
> In remove_unused_ivs we first find the best iv_cand (we prefer primarily the
> same step, next same mode and lastly constant base) and only then call
> get
On Sat, Oct 19, 2019 at 08:27:31AM +0200, Jakub Jelinek wrote:
> And as questioned in the PR, are there other cases where we can safely
> assume no wrap (e.g. use it if use->iv->no_overflow && cand->iv->no_overflow
> without those extra precision checks)?
Like, is there a way to find out if an iv_
Hi!
As mentioned in the PR, the following patch attempts to address two issues.
In remove_unused_ivs we first find the best iv_cand (we prefer primarily the
same step, next same mode and lastly constant base) and only then call
get_computation_at to determine the replacement expression. Unfortuna