[PATCH] D20617: [X86][SSE] _mm_store1_ps/_mm_store1_pd should require an aligned pointer

Craig Topper via cfe-commits cfe-commits at lists.llvm.org
Wed May 25 08:10:34 PDT 2016


Can you double check gcc's xmmintrin.h again. I'm pretty sure _mm_store1_ps
is calling _mm_storeu_ps.

On Wed, May 25, 2016 at 3:31 AM, Simon Pilgrim <llvm-dev at redking.me.uk>
wrote:

> RKSimon created this revision.
> RKSimon added reviewers: craig.topper, spatel, andreadb.
> RKSimon added a subscriber: cfe-commits.
> RKSimon set the repository for this revision to rL LLVM.
>
> According to the gcc headers, intel intrinsics docs and msdn codegen the
> _mm_store1_ps/_mm_store1_pd (and their _mm_store_ps1/_mm_store_pd1
> analogues) should require an aligned pointer - the clang headers are the
> only implementation I can find that assume non-aligned stores (by storing
> with _mm_storeu_ps/_mm_storeu_pd).
>
> This patch raises the alignment requirements to match the other
> implementations by calling _mm_store_ps/_mm_store_pd instead.
>
> I've also added the missing _mm_store_pd1 intrinsic (which maps to
> _mm_store1_pd like _mm_store_ps1 does to _mm_store1_ps).
>
> As a followup I'll update the llvm fast-isel tests to match this codegen.
>
> Repository:
>   rL LLVM
>
> http://reviews.llvm.org/D20617
>
> Files:
>   lib/Headers/emmintrin.h
>   lib/Headers/xmmintrin.h
>   test/CodeGen/sse-builtins.c
>   test/CodeGen/sse2-builtins.c
>
>


-- 
~Craig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160525/4158f266/attachment.html>


More information about the cfe-commits mailing list