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 | 7431c2ba79cbf7019aafac2ebafa259621726be2 (patch) | |
tree | 0a22bdc9b4944b7bd215ae812c8bca6fb3b676e2 /lib/Bitcode | |
parent | 1afab9c1e0ae2d145ce01718aa14065393117e70 (diff) |
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