[X86] Improve the lowering of BITCAST from MVT::f64 to MVT::v4i16/MVT::v8i8.
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Thu, 22 May 2014 16:21:39 +0000 (16:21 +0000)
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Thu, 22 May 2014 16:21:39 +0000 (16:21 +0000)
commit3957d4245ffd0ce8c9e610b7fbc8430e910ddf84
treea410553ee51f9e8756b8af624f0751d8866685cc
parent634d64e3bbe1b6f793cbcf0b55e40d4dbb2be329
[X86] Improve the lowering of BITCAST from MVT::f64 to MVT::v4i16/MVT::v8i8.

This patch teaches the x86 backend how to efficiently lower ISD::BITCAST dag
nodes from MVT::f64 to MVT::v4i16 (and vice versa), and from MVT::f64 to
MVT::v8i8 (and vice versa).

This patch extends the logic from revision 208107 to also handle MVT::v4i16
and MVT::v8i8. Also, this patch correctly propagates Undef values when
performing the widening of a vector (example: when widening from v2i32 to
v4i32, the upper 64bits of the resulting vector are 'undef').

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209451 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/lower-bitcast-v2i32.ll [deleted file]
test/CodeGen/X86/lower-bitcast.ll [new file with mode: 0644]
test/CodeGen/X86/ret-mmx.ll