diff options
author | Chris Lattner <sabre@nondot.org> | 2007-12-11 07:49:37 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-12-11 07:49:37 +0000 |
commit | b93bdf6e2e9f024f504f10c4f01cc54bf1a7ca80 (patch) | |
tree | 0a22bdc9b4944b7bd215ae812c8bca6fb3b676e2 /lib/Bitcode | |
parent | 09d481bdf44c730f8eb60633dc636e48e4ccd6c3 (diff) | |
download | external_llvm-b93bdf6e2e9f024f504f10c4f01cc54bf1a7ca80.zip external_llvm-b93bdf6e2e9f024f504f10c4f01cc54bf1a7ca80.tar.gz external_llvm-b93bdf6e2e9f024f504f10c4f01cc54bf1a7ca80.tar.bz2 |
Teach VMCore to constant fold shufflevectors with constant operands.
This allows us to compile:
#include <emmintrin.h>
typedef __m128i VSInt16;
typedef short vSInt16 __attribute__ ((__vector_size__ (16)));
VSInt16 t3() {
return (VSInt16)((vSInt16)_mm_set1_epi16(6518));
}
into:
_t3:
movaps LCPI1_0, %xmm0
ret
instead of:
_t3:
movl $6518, %eax
movd %eax, %xmm0
pextrw $0, %xmm0, %eax
xorps %xmm0, %xmm0
pinsrw $0, %eax, %xmm0
punpcklwd %xmm0, %xmm0
pshufd $0, %xmm0, %xmm0
ret
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44856 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode')
0 files changed, 0 insertions, 0 deletions