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 | 8e6a8f984cfd23049acdaea900c5f473f5bf7fc4 (patch) | |
tree | 7e7d6f0b006597bc2835686f6332ef9c3fd2ce30 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
parent | 6a6b3fb62b4f1f0a1d6153da4a5453746e3b3034 (diff) | |
download | llvm-8e6a8f984cfd23049acdaea900c5f473f5bf7fc4.zip llvm-8e6a8f984cfd23049acdaea900c5f473f5bf7fc4.tar.gz llvm-8e6a8f984cfd23049acdaea900c5f473f5bf7fc4.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
llvm-svn: 44856
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions