[PATCH] D12835: [X86][SSE] Replace 128-bit SSE41 PMOVSX intrinsics with native IR

Simon Pilgrim via cfe-commits cfe-commits at lists.llvm.org
Sun Sep 13 04:46:45 PDT 2015


RKSimon created this revision.
RKSimon added reviewers: ab, qcolombet, craig.topper, spatel.
RKSimon added a subscriber: cfe-commits.
RKSimon set the repository for this revision to rL LLVM.

128-bit vector integer sign extensions correctly lower to the pmovsx instructions even for debug builds.

This patch removes the builtins and reimplements the _mm_cvtepi*_epi* intrinsics using __builtin_shufflevector (to extract the bottom most subvector) and __builtin_convertvector (to actually perform the sign extension).

After this I'll add a patch for the removal/upgrade of the pmovsx intrinsics on the llvm side.

Note: AVX2 256-bit vector integer sign extensions currently don't lower correctly in debug builds if they need the __builtin_shufflevector stage (although I could add the ones that don't need this straightaway).

Repository:
  rL LLVM

http://reviews.llvm.org/D12835

Files:
  include/clang/Basic/BuiltinsX86.def
  lib/Headers/smmintrin.h
  test/CodeGen/builtins-x86.c
  test/CodeGen/sse41-builtins.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12835.34646.patch
Type: text/x-patch
Size: 5610 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150913/f0eabc7c/attachment-0001.bin>


More information about the cfe-commits mailing list