[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)
commitc8dd1ad85b217880fa092eeb890c703de61be007
tree222062fd89ed03d00fab50c937b9b6e22426b797
parentdad4acbc52403cf8cfc32970d8295b8191e43802
[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').

llvm-svn: 209451
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/lower-bitcast-v2i32.ll [deleted file]
llvm/test/CodeGen/X86/lower-bitcast.ll [new file with mode: 0644]
llvm/test/CodeGen/X86/ret-mmx.ll