]> granicus.if.org Git - clang/commit
[X86] Use native shuffle vector for the perm2f128 intrinsics
authorCraig Topper <craig.topper@intel.com>
Fri, 15 Sep 2017 23:00:59 +0000 (23:00 +0000)
committerCraig Topper <craig.topper@intel.com>
Fri, 15 Sep 2017 23:00:59 +0000 (23:00 +0000)
commit6d55fdd9ee95cdb0e6fd34df57e044faff8fe5f0
treee198485e3c015ca18459ea9e8bd2cc29578e97c3
parent3144b244f7c6f8cc229118087e36f082b42fb6cf
[X86] Use native shuffle vector for the perm2f128 intrinsics

This patch replaces the perm2f128 intrinsics with native shuffle vectors.

This uses a pretty simple approach to allocate source 0 to the lower half input and source 1 to the upper half input. Then its just a matter of filling in the indices to use either the lower or upper half of that specific source. This can result in the same source being used by both operands. InstCombine or SelectionDAGBuilder should be able to clean that up.

Differential Revision: https://reviews.llvm.org/D37892

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@313418 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGBuiltin.cpp
test/CodeGen/avx-builtins.c
test/CodeGen/avx2-builtins.c