This is an archive of the discontinued LLVM Phabricator instance.

[X86][SSE] Replace 128-bit SSE41 PMOVSX intrinsics with native IR
ClosedPublic

Authored by RKSimon on Sep 13 2015, 4:46 AM.

Details

Summary

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).

Diff Detail

Repository
rL LLVM

Event Timeline

RKSimon updated this revision to Diff 34646.Sep 13 2015, 4:46 AM
RKSimon retitled this revision from to [X86][SSE] Replace 128-bit SSE41 PMOVSX intrinsics with native IR.
RKSimon updated this object.
RKSimon added reviewers: ab, qcolombet, craig.topper, spatel.
RKSimon set the repository for this revision to rL LLVM.
RKSimon added a subscriber: cfe-commits.
qcolombet accepted this revision.Sep 15 2015, 1:20 PM
qcolombet edited edge metadata.

LGTM.

Thanks,
-Quentin

This revision is now accepted and ready to land.Sep 15 2015, 1:20 PM
This revision was automatically updated to reflect the committed changes.