[PATCH] Make the byte-shift SSE intrinsics emit vector shuffles which we know the backend can handle.
Filipe Cabecinhas
filcab+llvm.phabricator at gmail.com
Wed Feb 4 15:31:07 PST 2015
Hi Craig,
On Tue, Feb 3, 2015 at 8:27 PM, Craig Topper <craig.topper at gmail.com> wrote:
> 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?
>
In llvm/test/CodeGen/X86/vector-shuffle-128-v16.ll there's the
shuffle_v16i8_zz_zz_19_zz_zz_zz_zz_zz_zz_zz_zz_zz_zz_zz_zz_zz and 2 or 3
functions following it which have shuffle masks in this shape (with some
undefs). Are those enough? If now, do you want me to add some more?
Do you plan to remove the intrinsics from llvm in favor of the shuffles?
>
I'll update the patch to do it, if there's nothing else using it.
The casts inside the diagnostic pragmas seem inconsistent between the two
> macros. Was that intentional.
>
Updating the patch.
Is there already an emmintrin test file this could be added to? Maybe just
> put them in sse-builtins.c
>
There's no emmintrin test file. I started to add them outside
sse-builtins.c because two of these tests need to have optimizations on,
since they want the shufflevector to disappear (test_mm_srli_si128_0 and
test_mm_srli_si128_16). I can split them and add the last two tests
somewhere else, if you'd prefer it that way.
Thanks,
Filipe
>
>
> http://reviews.llvm.org/D7199
>
> EMAIL PREFERENCES
> http://reviews.llvm.org/settings/panel/emailpreferences/
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150204/f0f6c3a7/attachment.html>
More information about the cfe-commits
mailing list