[LLVMdev] NEON intrinsics preventing redundant load optimization?

Simon Taylor simontaylor1 at ntlworld.com
Wed Jan 14 05:58:05 PST 2015


> On 13 Jan 2015, at 17:28, James Molloy <james at jamesmolloy.co.uk> wrote:
> 
> 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;

To correct my previous correction, this does indeed cause all the important instructions to get stripped with the android NDK’s gcc 4.8, when optimisation is set to -O2. With -O3 for whatever reason this doesn’t happen. So I’d definitely agree with the general consensus to only create vectors with the official intrinsics and steer well clear of my nasty hacky attempt at a workaround.

Simon



More information about the llvm-dev mailing list