https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90270

--- Comment #6 from bin cheng <amker at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #5)
> (In reply to bin cheng from comment #4)
> > On AArch64, iovpts generates following code:
> >   <bb 3> [local count: 954449108]:
> >   # crc_20 = PHI <crc_7(D)(2), crc_12(5)>
> >   # ivtmp.5_18 = PHI <1(2), ivtmp.5_17(5)>
> >   _19 = &final_counts + 18446744073709551612;
> >   _1 = MEM[base: _19, index: ivtmp.5_18, step: 4, offset: 0B];
> >   crc_10 = crcu32 (_1, crc_20);
> >   _5 = &track_counts + 18446744073709551612;
> 
> I thought we had decided &final_counts + 18446744073709551612 would be
> invalid gimple anyways as we are taking the address of one element before.

Could you direct me to the discussion about this decision?  I remember once
raised this question (probably in private).  In this case, we need to revision
ivopts to avoid adding candidates which could violates this.

Anyway, it's an independent issue because the iv_cand could be one element
forwarded as:

> >   <bb 3> [local count: 954449108]:
> >   # crc_20 = PHI <crc_7(D)(2), crc_12(5)>
> >   # ivtmp.5_18 = PHI <0(2), ivtmp.5_17(5)>
> >   _19 = &final_counts;
> >   _1 = MEM[base: _19, index: ivtmp.5_18, step: 4, offset: 0B];
> >   crc_10 = crcu32 (_1, crc_20);
> >   _5 = &track_counts;
> 

Unfortunately, cost computation still has problem to generate this code.

Reply via email to