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

Simon Pilgrim via cfe-commits cfe-commits at lists.llvm.org
Wed May 25 03:31:51 PDT 2016


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20617.58397.patch
Type: text/x-patch
Size: 4019 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160525/ad8ddbeb/attachment.bin>


More information about the cfe-commits mailing list