This is an archive of the discontinued LLVM Phabricator instance.

Make the byte-shift SSE intrinsics emit vector shuffles which we know the backend can handle.
ClosedPublic

Authored by filcab on Jan 27 2015, 8:19 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

filcab updated this revision to Diff 18818.Jan 27 2015, 8:19 AM
filcab retitled this revision from to Make the byte-shift SSE intrinsics emit vector shuffles which we know the backend can handle..
filcab updated this object.
filcab edited the test plan for this revision. (Show Details)
filcab added reviewers: craig.topper, nadav.
filcab added a subscriber: Unknown Object (MLST).
craig.topper edited edge metadata.Feb 3 2015, 8:27 PM

Sorry I missed this earlier.

I'm all for removing unnecessary builtins. Does the backend lower these shuffles to the same instruction the builtin does? Do we have tests for that in the llvm side?

Do you plan to remove the intrinsics from llvm in favor of the shuffles?

The casts inside the diagnostic pragmas seem inconsistent between the two macros. Was that intentional.

Is there already an emmintrin test file this could be added to? Maybe just put them in sse-builtins.c

filcab updated this revision to Diff 19359.Feb 4 2015, 3:42 PM
filcab edited edge metadata.

Fixed types in macros.
Removed unused intrinsics.

filcab updated this revision to Diff 19362.Feb 4 2015, 3:53 PM

Sorry about the noise. This one additionaly removes a test that used the __builtin_ function.

Can you put the '__extension' back on the same line as the macro name? Other than that LGTM.

alexr added a subscriber: alexr.Feb 5 2015, 7:29 AM

Please note that the original patch was developed by Andrea when you land it.

RKSimon added a subscriber: RKSimon.Feb 5 2015, 9:04 AM

Alex: Thanks for reminding me! He prepared this patch with me and I forgot
to include that in the commit message. Adding it.

Craig: I just want to double-check: clang-format formatted it that way.
Still want me to format it closer to what it was? (since it's an installed
header, you might prefer not strictly following llvm's format)

Thanks,

Filipe

This revision was automatically updated to reflect the committed changes.