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 PR85804]Fix wrong code by correcting bump step computation in vector(1) load of single-element group access


Richard Biener <richard.guenther@gmail.com> writes:
> On Mon, May 21, 2018 at 3:14 PM Bin Cheng <Bin.Cheng@arm.com> wrote:
>
>> Hi,
>> As reported in PR85804, bump step is wrongly computed for vector(1) load
> of
>> single-element group access.  This patch fixes the issue by correcting
> bump
>> step computation for the specific VMAT_CONTIGUOUS case.
>
>> Bootstrap and test on x86_64 and AArch64 ongoing, is it OK?
>
> To me it looks like the classification as VMAT_CONTIGUOUS is bogus.
> We'd fall into the grouped_load case otherwise which should handle
> the situation correctly?
>
> Richard?

Yeah, I agree.  I mentioned to Bin privately that that was probably
a misstep and that we should instead continue to treat them as
VMAT_CONTIGUOUS_PERMUTE, but simply select the required vector
from the array of loaded vectors, instead of doing an actual permute.

(Note that VMAT_CONTIGUOUS is OK for stores, since we don't allow
gaps there.  But it might be easiest to handle both loads and stores
in the same way.)

Although it still seems weird to "vectorise" stuff to one element.
Why not leave the original scalar code in place, and put the onus on
whatever wants to produce or consume a V1 to do the appropriate
conversion?

Thanks,
Richard


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