[LLVMdev] NEON intrinsics preventing redundant load optimization?
James Molloy
james at jamesmolloy.co.uk
Tue Jan 13 09:28:41 PST 2015
Hi Tim,
I do hope we haven't broken that assumption with our
big-endian model...
I should rephrase. I'm concerned solely with creating vectors by
dereferencing casted pointers to scalars (and vice-versa):
uint32_t *g;
uint32x4_t f = *(uint32x4_t)g;
What you referring to works perfectly fine in big endian mode and should be
supported - they're a type like any other. The important difference is the
implicit reinterpret_cast, which can make things go wrong fast in big
endian mode (I haven't wrapped my head yet quite around whether there is an
easy scenario in which things could break...)
Cheers,
James
On Tue Jan 13 2015 at 5:23:21 PM Tim Northover <t.p.northover at gmail.com>
wrote:
> > While pointer dereference does work just as well (and better, given this
> > defect) as VLD1 it is explicitly *not supported*.
>
> I'm actually less convinced of this now. I'd argue that you shouldn't
> *create* vectors like that (e.g. by casting a pointer to another type
> and loadin), but the ACLE can't really dictate what you do with those
> vectors after they've been created, and passing around pointers to
> them (or storing them in an array, as in int8x8xN_t and so on) is
> entirely valid. I do hope we haven't broken that assumption with our
> big-endian model...
>
> Cheers.
>
> Tim.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150113/28a12b1a/attachment.html>
More information about the llvm-dev
mailing list